Silentdarkness1

  • Content Count

    3997
  • Joined

  • Last visited

 Content Type 

Profiles

Forums

Downloads

Klei Bug Tracker

Game Updates

Hot Lava Bug Reporter

Posts posted by Silentdarkness1


  1. 13 minutes ago, Ultroman said:

    Press CTRL to switch to REMOTE console, and type: c_godmode( )
    Some people say you need to include the space between the parentheses, but I haven't tested. Keep typing it until it works. There's some intermittent bug, where you have to turn it off, on and then off again for it to work.

    You think I haven't tried that? I tried supergodmode too, local and remote. No dice. Additionally, the doesn't fix the root of the problem. It shouldn't be on in the first place.

    EDIT: Also I just tested it with vanilla, and it isn't happening. So this is absolutely a mod problem.


  2. So i'm setting up a modded DST server, and I managed to get it to not crash, but now i'm running into a mysterious problem, and I feel like I mentioned this before, but I can't seem to find the thread.

     

    Creative mode and god mode are both enabled for players at the start. I have no earthly idea why this would be happening, at all. Also I can fiddle-fart around in the console and turn off the creative mode, but not god mode.

    Mod List:

    Multi Rocks


    Auto Open Skins Mod
    Additional Equipslots
    AFK Detection Clever
    Alternative Spells
    Apothecary Medicamento
    Armor Repair Kit
    Automatic Health Adjust
    Beefalo Horns Without Harm
    Beefalo Milk
    Beefalo Settings
    Birdcage Feather Drop Fixed
    Breakable Ice
    Carnassial Teeth
    Configurable Diggable and Craftable Reeds
    Configurable Marble Shrubs
    Craftable Butter
    Craftable Twigs and Logs
    Custom Farming
    Damage Indicators Together
    Deluxe Campfires 2.11
    Deluxe Cooking Pot
    Enhanced Houndius Shootius
    Epic Healthbar
    Fishing Buddy
    Food Allergies
    Food Values
    Fueled Lazy Deserter
    Global Positions
    Health Regeneration
    Ice Maker 3000
    Leafy Meat Crockpot Ingredient
    Less Placement Blocking
    Mining Machine[DST]
    Mining Pigs(DST)
    Moon Amulet
    More Actions
    Moving Box
    Mycelium
    Natural Respawn
    New Old Bell
    Notebook
    Omnivorous Beefalo
    Pageable Containers
    PartyHUD
    Refillable Bucket
    Repairable Fur Roll
    Rocks and Flints
    Setpiece Config
    Simple Health Bar DST
    Summon Bosses
    Sleepy Time
    Take Your Time
    The Gorge Port
    Thirsty For Tea
    Throwable Spears
    Trinket Variety
    Tweak Abigail
    Tweak Those Tools, Re-Tweaked
    Twiggier Trees
    Useless Junk
    Wall Health Regen
    Your Grave 1.1.2

    None of these mods have any reason to be essentially forcing cheats on.


  3. 12 minutes ago, Ricoom said:

    it seems event is never caught. I am not that familiar yet with the event system but could you try 

    
    inst.components.inventoryitem.owner:ListenForEvent("armorbroke", onbreak)

    instead of 

    
    inst:ListenForEvent("armorbroke", onbreak)

     

    [00:01:20]: [string "../mods/Shields - Unfinished/scripts/prefab..."]:104: attempt to index field 'owner' (a nil value) LUA ERROR stack traceback: ../mods/Shields - Unfinished/scripts/prefabs/lightshield.lua:104 in (field) fn (Lua) <48-118> scripts/mainfunctions.lua:206 in () ? (Lua) <195-237> =[C]:-1 in (method) SpawnPrefab (C) <-1--1> scripts/mainfunctions.lua:254 in (global) SpawnPrefab (Lua) <248-256> scripts/util.lua:24 in (global) DebugSpawn (Lua) <20-31> scripts/consolecommands.lua:365 in (global) c_give (Lua) <361-376> c_give("lightshield"):1 in () ? (main) <0-0> =[C]:-1 in (global) pcall (C) <-1--1> scripts/mainfunctions.lua:1409 in (global) ExecuteConsoleCommand (Lua) <1401-1418> scripts/screens/consolescreen.lua:146 in (method) Run (Lua) <133-148> scripts/screens/consolescreen.lua:159 in (field) fn (Lua) <157-164> scripts/scheduler.lua:177 in (method) OnTick (Lua) <155-207> scripts/scheduler.lua:371 in (global) RunScheduler (Lua) <369-377> scripts/update.lua:170 in () ? (Lua) <149-228>

    We added this to the code....

    inst:DoPeriodicTask(5, function() if inst.components.inventoryitem.owner ~= nil then inst.components.inventoryitem.owner:ListenForEvent("armorbroke", onbreak) end end)

     

    And got this instead:

    [00:01:58]: [string "../mods/Shields - Unfinished/scripts/prefab..."]:14: attempt to index field 'Transform' (a nil value) LUA ERROR stack traceback: ../mods/Shields - Unfinished/scripts/prefabs/lightshield.lua:14 in (local) fn (Lua) <13-17> scripts/entityscript.lua:1035 in (method) PushEvent (Lua) <1022-1049> scripts/components/armor.lua:7 in (local) fn (Lua) <1-10> scripts/entityscript.lua:1035 in (method) PushEvent (Lua) <1022-1049> scripts/components/armor.lua:77 in (method) SetCondition (Lua) <71-90> scripts/components/armor.lua:133 in (method) TakeDamage (Lua) <132-138> scripts/components/inventory.lua:285 in (method) ApplyDamage (Lua) <252-290> scripts/components/combat.lua:417 in (method) GetAttacked (Lua) <405-480> scripts/components/combat.lua:843 in (method) DoAttack (Lua) <793-867> scripts/stategraphs/SGhound.lua:72 in (field) fn (Lua) <72-72> scripts/stategraph.lua:568 in (method) UpdateState (Lua) <536-580> scripts/stategraph.lua:607 in (method) Update (Lua) <599-627> scripts/stategraph.lua:125 in (method) Update (Lua) <109-148> scripts/update.lua:218 in () ? (Lua) <149-228>

     

    EDIT: We fixed it. Had to use inst instead of owner.


  4. 	local assets =
    {
        Asset("ANIM", "anim/lightshield.zip"),
        Asset("ANIM", "anim/swap_lightshield.zip"),
    }
    	local prefabs =
    {
        "opalpreciousgem"
    }
    	
    local function onbreak(inst, owner)
        local x,y,z = owner.Transform:GetWorldPosition()
        local opal = SpawnPrefab("opalpreciousgem")
        opal.Transform:SetPosition(x,y,z)
    end
    	local function OnBlocked(owner, attacker) 
        owner.SoundEmitter:PlaySound("dontstarve/wilson/hit_marble")
    end
    	local function onequip(inst, owner)
        owner.AnimState:OverrideSymbol("swap_object", "swap_lightshield", "swap_lightshield")
        owner.AnimState:SetMultiSymbolExchange("swap_object", "hand")
        owner.AnimState:Show("ARM_carry")
        owner.AnimState:Hide("ARM_normal")
        inst:ListenForEvent("blocked", OnBlocked, owner)
        owner:AddTag("holdingshield")
        inst.Light:Enable(true)
    end
    	local function onunequip(inst, owner)
        owner.AnimState:ClearSymbolExchanges()
        owner.AnimState:Hide("ARM_carry")
        owner.AnimState:Show("ARM_normal")
        inst:RemoveEventCallback("blocked", OnBlocked, owner)
        owner:RemoveTag("holdingshield")
        inst.Light:Enable(false)
    end
    	--[[local function absorptionamount(inst, dt)
        if inst.components.armor.condition < inst.components.armor.maxcondition then
            inst.components.armor:SetAbsorption(inst.components.armor.condition/inst.components.armor.maxcondition)
        end
    end]]--
    	local function fn()
        local inst = CreateEntity()
    	    inst.entity:AddTransform()
        inst.entity:AddAnimState()
        inst.entity:AddNetwork()
        inst.entity:AddSoundEmitter()
        inst.entity:AddLight()
    	    MakeInventoryPhysics(inst)
    	    inst.AnimState:SetBank("lightshield")
        inst.AnimState:SetBuild("lightshield")
        inst.AnimState:PlayAnimation("idle")
    	    inst.entity:SetPristine()
        
        
        if not TheWorld.ismastersim then
            return inst
        end
    	    inst:AddComponent("inspectable")
    	    -------
    	
        -------
        MakeHauntableLaunch(inst)
        -------
    	
        inst:AddComponent("inventoryitem")
        inst.components.inventoryitem.imagename = "lightshield"
        inst.components.inventoryitem.atlasname = "images/inventoryimages/InventoryShieldLight.xml"
        
        inst:AddComponent("armor")
        inst.components.armor:InitCondition(DURABILITYLIGHT, 0.95)
        --[[if DURABILITYLIGHT == "150" then
            inst.components.armor:InitCondition(150, 1)
        elseif DURABILITYLIGHT == "200" then
            inst.components.armor:InitCondition(200, 1)
        elseif DURABILITYLIGHT == "250" then
            inst.components.armor:InitCondition(250, 1)
        elseif DURABILITYLIGHT == "300" then
            inst.components.armor:InitCondition(300, 1)
        elseif DURABILITYLIGHT == "350" then
            inst.components.armor:InitCondition(350, 1)
        end]]--
        inst:AddTag("metal")
        inst:AddTag("ruins")
        inst:AddComponent("equippable")
        inst.components.equippable:SetOnEquip(onequip)
        inst.components.equippable:SetOnUnequip(onunequip)
        inst:ListenForEvent("armorbroke", onbreak)
        
        inst:AddComponent("weapon")
        inst.components.weapon:SetDamage(0)
        
        --inst:DoPeriodicTask(1, function() absorptionamount(inst, 1) end)
        inst.Light:SetIntensity(.75)
        inst.Light:SetColour(252 / 255, 251 / 255, 237 / 255)
        inst.Light:SetFalloff(.6)
        inst.Light:SetRadius(10)
        inst.Light:Enable(true)
        
    	    return inst
    end
    return Prefab("common/inventory/lightshield", fn, assets, prefabs)
    


  5. So, we're trying to make a tool for the player to use, that, when it hits 0% durability, instead of breaking, will go in the player inventory and stay there, unusable until it gets repaired.

    I'm aware that we'd need to add a repair action, but we're struggling to actually work out how to make this happen. I did find an old thread with some code from w00tydood, but it didn't actually work. Could use a hand here on figuring out how to make this work.


  6. UPDATE:

    So, after having gotten someone else to pitch in and help on Discord, we managed to make a great deal of progress:

     

    unknown.png

     

    Many thanks to @PeterA for the piece of code that helped us get this far!

    However, there is now a new problem after unequipping.

    unknown.png

    The hand animations seem to be permanently borked after unequipping the shield.

    local function onequip(inst, owner)
        owner.AnimState:OverrideSymbol("swap_object", "swap_buckler", "swap_buckler")
        owner.AnimState:SetMultiSymbolExchange("swap_object", "hand")
        owner.AnimState:Show("ARM_carry")
        owner.AnimState:Hide("ARM_normal")
        inst:ListenForEvent("blocked", OnBlocked, owner)
    
    end
    
    local function onunequip(inst, owner)
        owner.AnimState:SetMultiSymbolExchange("hand", "swap_object")
        owner.AnimState:Hide("ARM_carry")
        owner.AnimState:Show("ARM_normal")
        inst:RemoveEventCallback("blocked", OnBlocked, owner)
    end

    This is in the shield prefab file, not modmain. We're still trying to figure out why this isn't working out. We know about the build name, but that shouldn't be doing this. Any ideas would be appreciated.


  7. 2 minutes ago, spideswine said:

    I don't think there's a way to swap the so called(by me) "sub symbols", you just need to make swap_buckler contain all these smaller ones.

    So the asset bundle needs to simply have all the hands and such placed inside it? Or is it more involved than that?

    Sorry, we've never really had to deal with something as complex as this before.


  8. 9 minutes ago, spideswine said:

    The way this thing works is that the symbols also have "sub symbols", for example the hand folder in the extended character template looks like:

    https://imgur.com/a/3uCM0

    you're interested in hand 1 and hand 4, so the leave the rest the same.

    So you're saying that we need to specify a specific subsymbol, then? Like...

    owner.AnimState:OverrideSymbol("Hand-1", "swap_buckler", "swap_buckler") ?


  9. We can't seem to find the symbol to override to make hand disappear. More instruction needed.

    We've gotten both hands to become shield, we've gotten hands to become invisible, but no shield.

    We've gotten Wilson to just become shield. We've also made armless Wilson move shield with telepathy. Can't make carry hand disappear.