Jump to content

[SOLVED] Renaming Animations


Recommended Posts

Allow me to preface this by saying I have absolutely no experience with Spriter or animations, nor do I know how any of this is actually used in DST. Couldn't find a tutorial for it (feel free to link one).

I have made a copy of "firefighter_placement.zip" from DST's animations, recolored "atlas-0.tex" inside it (used TexTool to turn it into a png, paint.net to recolor, TexCreator to resave it as a .tex), and renamed my copy of the zip. I know that AnimState has :SetBank(string) and :SetBuild(string), where string is "firefighter_placement". I did not change them and attempted to load a world, DST crashed. I changed them to use the new zip name, and DST also crashed.

The crash is "..\source\animlib\animmanager.cpp(584) :: Tried to add build [firefighter_placement] from file [anim/firefighter_placement.zip] but we've already added a build with that name!"

Any suggestions?

 

Edited by penguin0616
  • Like 1
Link to comment
Share on other sites

I also have no experience with this, but what I'd try to do is:(I am not sure this will work but I think it's worth a try)

1. Get ktools and use it to convert the original .zip animation into a Spriter project.

2. Open your .scml copy of the project, and swap assets (it should work just to change the appropriate files)

You should now have your desired version of the animation in a .scml project; now to insert it into the game.

3. Rename the animation build (in the lower right panel) so it does not crash with the game animation build.

4. Insert code into your mod to force the object to use your build instead of the game. (This depends on what object you're trying to alter, and is the tricky part of this)

5. Put your desired .scml file with the right folder structure in [yourmod]/exported.

6. After your copy of Don't Starve has the updated version of your mod, run the game once (or run the autocompiler in modtools) to compile the animation.

I think any solution which would work without code would require manual file swapping inside the game folder (which is not shareable) I might be wrong on this, though.

Have two tutorial links as well.

https://forums.kleientertainment.com/forums/topic/29427-tutorial-creating-a-handslot-equippable-item-from-scratch/

https://forums.kleientertainment.com/forums/topic/95354-tutorial-how-to-use-krane-from-ktools/

 

  • Like 1
Link to comment
Share on other sites

Is your goal to make a clone of a animation bank if so you can use the build renamer tool from handsome matts tools. (this seems to be what you are asking for, don't forget to rename the file name as well to match.)

If you goal is to make custom animation names, then you'll have to do so with a custom spriter file or a modified decompiled spriter file.
When decompiling spriter files its important to remember that the .png's might not always look right in the spriter but as long as the pivots are intact it can look correct in game. Which is why anything involving spriter requires extensive trial and error to make it look right in game.

edit:

 

Edited by IronHunter
attached link to the mod tools
  • Like 2
Link to comment
Share on other sites

@IronHunter The build rename did not work. It said "Done!" However, it does not show up in game still. I have no intention of changing the "idle" animation name, but I am trying to remove "firefighter_placement" from the "Bank" and "Build" method calls.

My goal: Recolor the .tex file being used (completed)
Change the build and bank name so I can use it. (incomplete) (what is the difference between them?) (How do I know what strings to use?)

(Client log reveals "Could not find anim bank [range]")

 

@thomas4846

atlas-0[1].png

Edited by penguin0616
  • Like 1
Link to comment
Share on other sites

I tried making the animation myself with the asset, adapting from

but it also fails to load. At this point, I am quite lost. I have attached the created animation from that in case it helps to shed light.

Using Asset("ANIM", "anim/myitem.zip")
:SetBank("myitem")
:SetBuild("myitem")
:PlayAnimation("idle")

Results in 
Could not find anim build FROMNUM
Could not find anim bank [FROMNUM]

myitem.zip

Edited by penguin0616
  • Like 1
Link to comment
Share on other sites

4 hours ago, penguin0616 said:

My goal: Recolor the .tex file being used (completed)
Change the build and bank name so I can use it. (incomplete) (what is the difference between them?) (How do I know what strings to use?)

(Client log reveals "Could not find anim bank [range]")

Bank is the list of animations, build is the references for the atlas.

It is quite common for builds to be with the atlas without .anim at all such as in characters. Similarly its quite common for the .anim to be on its own for a lot .zip files.

Are you reusing the firefighter animations entirely? If so you can delete the .anim file from your .zip after you renamed the build and .zip this way you can make a skin of sorts for the firefighter and have identical animations with your own textures. You would be using the firefighter bank in animstate with your own custom build animstate.

  • Like 2
Link to comment
Share on other sites

You have caused me to realize why my zip was wrong. The guide neglected to mention where the proper animations were generated. I tried the generated one, had the same effect as yours. Time to give it another shot.

Edited by penguin0616
  • Like 1
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...