Justintime235 Posted April 27, 2015 Share Posted April 27, 2015 So I wanted to transfer my custom character from Don't Starve to DST. The mod includes a custom character and a sword. The character and the sword work fine when playing DST, but the images for both the original anim .zip (katana.zip) and the swap .zip (swap_katana.zip) do not show. The inventory image is there in the hot bar, but when I equip the sword it is invisible. When looking into the log, it says "could not find anim bank for katana". I have the anim files and I have in the katana prefab that states this:local assets={ Asset("ANIM", "anim/katana.zip"), Asset("ANIM", "anim/swap_katana.zip"), Asset("ATLAS", "images/inventoryimages/katana.xml"), Asset("IMAGE", "images/inventoryimages/katana.tex"),}I am not all that great with lua but I can't find the problem. Thank you! Link to comment Share on other sites More sharing options...
DarkXero Posted April 27, 2015 Share Posted April 27, 2015 Do you have:local function onequip(inst, owner) owner.AnimState:OverrideSymbol("swap_object", "swap_katana", "swap_katana") owner.AnimState:Show("ARM_carry") owner.AnimState:Hide("ARM_normal")endlocal function onunequip(inst, owner) owner.AnimState:Hide("ARM_carry") owner.AnimState:Show("ARM_normal")end-- inside the fn(), after the AddComponent("equippable")inst.components.equippable:SetOnEquip(onequip)inst.components.equippable:SetOnUnequip(onunequip)in the prefab lua file? Link to comment Share on other sites More sharing options...
Justintime235 Posted April 27, 2015 Author Share Posted April 27, 2015 Do you have:local function onequip(inst, owner) owner.AnimState:OverrideSymbol("swap_object", "swap_katana", "swap_katana") owner.AnimState:Show("ARM_carry") owner.AnimState:Hide("ARM_normal")endlocal function onunequip(inst, owner) owner.AnimState:Hide("ARM_carry") owner.AnimState:Show("ARM_normal")end-- inside the fn(), after the AddComponent("equippable")inst.components.equippable:SetOnEquip(onequip)inst.components.equippable:SetOnUnequip(onunequip)in the prefab lua file?Yes I do.local function Onequip(inst, owner) owner.AnimState:OverrideSymbol("swap_object", "swap_katana", "swap_katana") owner.AnimState:Show("ARM_carry") owner.AnimState:Hide("ARM_normal")end local function Onunequip(inst, owner) owner.AnimState:Hide("ARM_carry") owner.AnimState:Show("ARM_normal")endlocal function fn() inst:AddComponent("equippable") inst.components.equippable:SetOnEquip( Onequip ) inst.components.equippable:SetOnUnequip( Onunequip )endWithin the function fn() I also have the attributes of the katana. Link to comment Share on other sites More sharing options...
DarkXero Posted April 28, 2015 Share Posted April 28, 2015 Can you upload your katana.zip and swap_katana.zip? There's probably a name issue, since using the katana.zip for the asset is generating an animation bank of another name. Link to comment Share on other sites More sharing options...
Justintime235 Posted April 28, 2015 Author Share Posted April 28, 2015 Can you upload your katana.zip and swap_katana.zip? There's probably a name issue, since using the katana.zip for the asset is generating an animation bank of another name.Here they are:katana.zipand:swap_katana.zipCould it be the postion/size of the atlas-0? Link to comment Share on other sites More sharing options...
DarkXero Posted April 28, 2015 Share Posted April 28, 2015 It's just naming issues. Using:owner.AnimState:OverrideSymbol("swap_object", "swap_katana", "swap_sandai")in the onequip and: inst.AnimState:SetBank("sandai") inst.AnimState:SetBuild("katana") inst.AnimState:PlayAnimation("idle")for the animstate makes it appear. Link to comment Share on other sites More sharing options...
Justintime235 Posted April 28, 2015 Author Share Posted April 28, 2015 It's just naming issues. Using:owner.AnimState:OverrideSymbol("swap_object", "swap_katana", "swap_sandai")in the onequip and: inst.AnimState:SetBank("sandai") inst.AnimState:SetBuild("katana") inst.AnimState:PlayAnimation("idle")for the animstate makes it appear.Thank you very much!! Link to comment Share on other sites More sharing options...
FortisVenaliter Posted September 3, 2015 Share Posted September 3, 2015 Sorry to dredge up an old thread, but can someone explain how they found "sandai"? I don't see that in anything the other guy uploaded... Where did they look? Link to comment Share on other sites More sharing options...
DarkXero Posted September 3, 2015 Share Posted September 3, 2015 (edited) @FortisVenaliter, I uncompressed the swap_katana.zip.I opened with notepad the anim.bin file.I looked for symbol names nearing the timeline_0.swap_sandai was the symbol name found. Alternatively, you can use krane http://forums.kleientertainment.com/files/file/583-ktools-cross-platform-modding-tools-for-dont-starve/The spriter project will decompile everything and you will get the anim bank. I did the same for katana.zip, the name of the bank was sandai. Edited September 3, 2015 by DarkXero Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now