Jump to content

Modders, a call to arms!


Recommended Posts

Hello everyone.

I would like to create a set of basic tutorials based around some simple example mods, to make it easier for newcomers to see how everything fits together when making, e.g., non-equippable, HANDS, HEAD or BODY items for the first time. I have my Cactus Armor mod, which works, but it is incomplete and I don't have the "exported" folder for it.

Alas, I don't quite understand how the whole banks, builds and animation setup works, and it seems to be different for each type of item. Hats don't have a separate swap build, but weapons do, etc. (why?). The tutorials we have are out-dated and/or lackluster, so we end up getting the same questions again and again, especially about invisible items. It's difficult (impossible?) to reverse engineer an existing mod and the game files, since they usually don't include the "exported" folder with the Spriter files. (EDIT: this is possible using Krane. Thanks for that info, @Wolf_EX)

It is entirely possible that I'm an idiot and have missed some hub of information about these things, and if so, please point me to them :) I will continue to look for tutorials. Perhaps there are some better ones on Youtube?

I tried messing around with a hat today, using a mod from someone else which included the "exported" folder, which worked fine when moving in all directions using three images (no idea how that works), but I couldn't for the life of me get it to use the fourth image for when the hat was lying on the ground (an image with a nice shadow on the ground). I've searched all over for how to set this up properly, but can't find anything that works.

What you can do to help me (and the community) is to do 1, and if you have time, 2 and 3:

  1. Make the simplest example mod you can for one of these slots, using the newest game code as reference (e.g., many older mods do not include some of the AnimState:Hide/Show calls), and upload it here, including the exported folder. Just make the graphics work and the equippable part for equippable items. I can take care of functionality (weapon/armor components, recipes, etc.) if you like. Make it neat. Same naming conventions as the game would be nice, so it's familiar and easy to compare with the game files. Also, try not to call different things the same, so references are easily traceable.
  2. Preferably put comments in the code, like, what do you put for bank, build and animation, and where those names come from (one is a file name, another is the name of the animation in file X, etc.).
  3. Do a write-up about how you did it and how things fit together, which files do what, etc.. Long, short, doesn't matter. As long as the key points of the structure are covered. I can embellish on what you've written.

If you aren't good at 2 and/or 3, or can't be bothered, I'll try to do that myself. It's just much easier to decipher things, when you have something that works :) Don't worry about putting in armor and weapon components etc.. I know how to do that, and will put in some nice examples.

Thanks in advance!

Sincerely, Ultroman the Tacoman

P.S. If someone can make an updated tutorial for the Extended Character Template, that would also be amazing. An up-to-date Spriter tutorial would also be neat. Those two have comprehensive tutorials, but they are out-dated.

Edited by Ultroman
Link to comment
Share on other sites

I was considering making an in depth weapon and maybe character mod tutorial on youtube.  I never done anything like that before though so not sure.

Quote

 It's difficult (impossible?) to reverse engineer an existing mod and the game files, since they usually don't include the "exported" folder with the Spriter files.

you get decompile an anim file to get the scml file/images using krane

 

Quote

I tried messing around with a hat today, using a mod from someone else which included the "exported" folder, which worked fine when moving in all directions using three images (no idea how that works), but I couldn't for the life of me get it to use the fourth image for when the hat was lying on the ground (an image with a nice shadow on the ground). I've searched all over for how to set this up properly, but can't find anything that works.

The ground image is a seperate spriter file from the equipped image.  It's the anim file that goes into setBank and SetBuild.

 

Quote

which worked fine when moving in all directions using three images (no idea how that works)

It's really weird how hats and amulets works to get them in 4 directions.  iirc the images have to have a specific name and in spriter you have to drag each image into the window, then delete it. If you open the scml file in a text editor, you will see the images in there and can edit the x/y values to get them positioned right.  There might be an easier way of doing it but It took me days messing with that to figure it out and I never want to make an item like that again lol.  I can upload my amulet mod with the exported folder if you want to mess with it.

Edited by Wolf_EX
Link to comment
Share on other sites

All swappables follow the same concept.

They have symbols that correlate to the symbol's they will override in the player animations.
However they also are items, which is where they have their spriter file containing their ground idle animations.

It is important to have the enough symbols to match those in the player animations, otherwise you'll have missing or incorrect symbols show up during animations when equipped. You'll pretty much never get this to work by dragging symbols into spriter, so I prefer manually opening up spriter into a text editor. Attached below you'll see the tin armor and conquistador hat from hamlet I have prepared for use in dst. I strongly recommend opening the spriter files in notepad++ to see the symbol id's it is important they match the ones that are used in the player symbols. For better idea what symbols are used in player animations. See the

The actual ground animation symbol can be made separately and doesn't have to be part of these symbols, but its often lumped into there for convenience.

For example I have attached a custom item I made called dynamite, which is designed to spin when thrown. It uses two separate folders mostly for organization than anything as it is completely possible to merge them into one file.

I can talk about coding later when I get some more time, as I don't really want to share my personal mod entirely.

I also just realized its been 5 month's since I worked on modding don't starve.

I will try to update this post with a actual mini mod with the items.

My mod has been criticized by @Warbucks for being difficult to read.

armor_steel.rar

hat_steel.rar

dynamite.rar

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

Thanks a lot, guys! That's a good start :) I'll take a look at the things you've posted. This won't be a high priority at first, because I have to find a job and a new apartment, like, now. I just wanted to get the ball rolling. Hopefully, we can get some nice templates up and running. Btw, since Hamlet is blowing up right now, we should also cater to the DS part of the community, so we also need to either have a different set of template mods for DS, or merge the DS and DST templates if it's possible without too much confusion. AFAIK the differences for items are only AddNetwork() and where to put the ismastersim check. Correct me if I'm wrong.

I will also redo the newcomer post I keep linking to, and make it a separate thread so we can pin it. It'd be nice to have an entry-point for newcomers to get a good start, and have a sort of hub for the other great information lying around on the forum.

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...