Jump to content

How does .scml file in the exported->[character's name] catalog actually work and what's the trick in making it from scratch?


Recommended Posts

Recently, I took my interest in modificating Don't Starve. It is my first time playing with mods and I tried as hard as I could to search for answers instead of making a new topic, but there is an answer I really want to know and can't find it anywhere. I got stuck at assembling sprites in spriter and compiling it to anim catalog. It seems that there are no animations in it, the position of body parts is of no significance (character looks the same in-game despite changes made in .scml file) and you can't just (what should be obvious at this point) make a new project with similarly assembled body parts and hope it to work. When opening buld.scml from ds_assets_master in notepad it doesn't seem to be anything special in there. The only solution I can think of is drawing a character with identical proportions to one of the original Don't Starve characters and using .scml file from ds assets, but it is very limiting and unsatisfying. So here are my questions.

1) How does complier even make animated character with this mess

2) Is it possible to make this file yourself without using the ones already in game files. If yes, how do you even do it?

When a spriter file is compiled it is split into 3 files.

Atlas

The atlas is the textures of the animation assembled into a sprite sheet read by the build. Texture packs simply change this to make it appear differently.

Build

Is the structure that allows the animation to find the right texture for a symbol. It is a nicely organized list. Build swapping is a common term where we switch the paths for the textures to another texture atlas. This is how skins and wolfgang works. To change their appearance dynamically. By swapping out the path for a symbol.

Bank

Is a list of animations, for example the default bank for all player characters is wilson and has a ton of animations split up over multiple bank files. They all internally share the same animation bank of wilson despite their external file name being player_attack.zip or something.

Animation dictate where a arrangement of symbols appears on screen. As such changing stuff in the esctemplate does nothing because all it is a texture and build. The animation bank is not used and can be deleted. This is because it is overidden by in game animations and to make what you did in spriter translate into the game you will have to play that animation in game.

This is usually where a lot of people have a hard time as animating is difficult and because there are so many default animations it is difficult to make custom ones for a character be compatible. At least in the sense of making your own bank.

A tutorial template is stickied on this forum for making your own animation to add to the wilson bank.

 

It is possible to make your own animation from scratch. Just remember that you also need to understand basic code of the animstate to make it appear in game properly. I suggest looking into making your own custom simple prefab.

You set the build and bank and play your animation.

Lots of examples in the game files.

 

Edit:

It is also important to name your internal symbols, bank name, animation names etc. Something that would be compatible with existing files. E.g. if you are adding to a existing bank like the wilson one. Your bank name would be wilson but you would not use animation names the same as existing ones like eat or idle_loop. You would also need to make sure symbol names are the same as other builds.

Edited by IronHunter

Thank you for your reply. It was really helpful in many ways. I am constantly making progress on understanding how this game works. Anim.bin is file that contains animations and I can even play them using ktools. You've explained what build.bin is, and that I can make my own animations for characters. However, there is one final thing that bugs me. How do you create build.bin file? Or, to be more precise, how do you create .scml file that complies into properly working build.bin?

When you make a spriter animation say for a idle anim for a item on the floor. It is just a symbol which is what the builds are a list of symbols that link to textures. You don't compile and make just one file you make all 3 when the compiler compiles it, you can choose to delete the uneeded ones. Like for example the esctemplate you can delete the anim.bin as its not used and only the build and atlas are. If you are using the wilson anim tutorial stickied on the forum, you can delete the atlas and build as they aren't needed only the anim is actually used in game. Saving a ton of file size. This is why when you look in .zips you'll see many files split up.

You can pretty much just take a blank spriter file, drag a symbol onto the animation stage, and that is all you really need to do to make a idle anim for a item on the ground for example. Just need to name the symbol, bank, and anim appropriately.

Symbol:

The folder structure is very important when doing this, when you decompile animations using ktools, you'll see the folders are named a specific way. These folder names are the default symbol names, but if you right click and edit a scml file in a text editor you can see after folder id there is a folder name which is what the symbol name will be. When you use symbol overides to equip weapons, hats etc. this is why the name is important.

Bank:

Is the entity id in the scml file when editing it via a text editor or assigning it in spriter. For player animations its called wilson, and wilsonbeefalo respectively. If the bank is the same name as another they will be merged into one large bank ingame.

animation name is pretty straightforward, you know when you call to play a animation inst.Animstate:PlayAnimation("idle") well that name is what the animation is. So just name you animations for your bank something non conflicting. So obviously if you are using a existing bank like wilson, you probably don't want to use the same name as a existing animation. But if you are making your own bank for your own custom player animations, then go ahead and use w.e. you want.

 

 

Edited by IronHunter
hyperlink

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
×
  • Create New...