Jump to content

Reusing existing tools' animations?


Recommended Posts

I've been trying to create a mod that uses slightly modified (simple color changes for the moment) textures with the same animations as existing tools, but not having any luck. I thought based on a guide I saw about reskinning mobs I could just modify and replace the texture files in existing animation packs, rename them, and use those, but that's not just not working, it's actually causing Don't Starve to CTD without even throwing an error when I even try to enable the mod. It's definitely the animation packs causing this, because the mod doesn't cause a CTD if I don't reference those files. I'm taking this as "it's not this simple", but I'm not sure how to go about this properly. Any clues?

Link to comment
Share on other sites

Any ideas? I guess what I need to do is decompile the existing textures and animations for the tool with krane, replace the texture images, and recompile with Spriter, but I don't actually know what files I need to use with tools' swap files to get what I need. A tool's basic animation package and its swap package don't seem to be the winning combination.

Link to comment
Share on other sites

You need to convert build.bin to text file.

You can use DontStarveBinaryConverter.

In the text change on the top "root" name to your new zip file name.

(If you won't change zip file name, it will take vanilla files instead.)

(If you change just zip file name, it will crash cuz build.bin have other name directory.)

E.g these parts in PrefabFiles item_name.lua

Asset("ANIM", "anim/swap_backpack.zip"),

owner.AnimState:OverrideSymbol("swap_body", "swap_backpack", "swap_body")

inst.AnimState:SetBuild("swap_backpack")

to

Asset("ANIM", "anim/new_swap_backpack.zip"),

owner.AnimState:OverrideSymbol("swap_body", "new_swap_backpack", "swap_body")

inst.AnimState:SetBuild("new_swap_backpack")

Then you put in the new_name.zip changed build  bin and changed texture.

 

It works for me, I don't know nothing about Spriter and scml but I made it work anyway. XD

 

EDIT:

Yet you need to do these: (PrefabFiles item_name.lua)

    local minimap = inst.entity:AddMiniMapEntity()

    minimap:SetIcon("texture_name.tex")

and (modmian.lua)

Asset('ATLAS', "images/minimap/texture_name.xml"),

AddMinimapAtlas("images/minimap/texture_name.xml")

To have icon on map if item is droped.

Link to comment
Share on other sites

Well, at least now I understand why the crash. Unfortunately

14 hours ago, zetake said:

You need to convert build.bin to text file.

You can use DontStarveBinaryConverter.

You mean this file here? I gave this a shot, but sadly it opened and read the build.bin file but didn't produce a text file from it. Not sure if maybe there's something new/different about Hamlet's files.

Link to comment
Share on other sites

Yes, this one.

It needs tex file too, to work.

It's working for me in hamlet...

 

input > build.bin & atlas-0.tex > run_input_precise

intermediate > build.txt > edit root name

run_output > output > your new build.bin

 

Link to comment
Share on other sites

1 hour ago, zetake said:

[snip]

Well I attempted this first on the contents of the shears.zip archive and it failed, but it looks like it works fine on the swap_shears.zip file for whatever reason. Wish I could figure out what the problem is with the former so I don't have to fool with Spriter and these very poorly documented official mod tools.

Link to comment
Share on other sites

I guess, you need to convert with klei tools to scml.

Then edit scml file in text editor:

<entity id="0" name="file_name"

And name that scml file to same name.

And now you can compile it.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...