Jump to content

Custom Character's Item not Showing


Recommended Posts

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

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

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 )end

Within the function fn() I also have the attributes of the katana.

Link to comment
Share on other sites

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

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

@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 by DarkXero
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...