Assets

I know little about this part for now. I will write all I will learn about these things here.

Assets are declared in modmain.lua, by writing

See: Modmain.lua

Asset types
"ASSET_TYPE" should be a string with ones of specific values. I saw next types of assets:
 * "ATLAS"
 * "IMAGE"
 * "ANIM"
 * "SOUND"

Image
These are in TEX format. To create it you will need special software, see: Tools

They are used for icons, such as on the minimap, in your inventory, on a crafting tab, on a crafting recipe, or as the icon for the mod itself on the mods page. Note that they must be 64x64 pixels and 32-bit, or they'll cause errors.

Atlas
An XML file must accompany all of your images. Just copy the following XML code and replace the all caps parts with the name of each image.

Animation
These are animations used for real objects that are out in the world - ie everything that isn't an icon. You can use still images if you want, but they're still called anims because they can be animated.

To create these, you need the Don't Starve Together Mod Tools. First, go on Steam and install the Mod Tools. Then, use Spriter (at C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Mod Tools\mod_tools\Spriter\Spriter.exe) to turn your images into an animation file (a .scml file). Note that your images must be 32-bit, or the next step won't work. Name the entity after your prefab name and give sensible names to each animation - for a single still image, the standard practice is to call it "idle", but anything is fine as long as it's easy to remember since you'll be using those animation names in the code. These animations can be any size, unlike the 64x64 icons earlier. The size of the animation corresponds to the size of the object in game.

Once you have that, use the scml compiler (at C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Mod Tools\mod_tools\scml.exe) to compile your animation into the zip file format used in the game. You can run it on the command line, and the first argument is the path to your .scml file and the second argument is the path to your mod folder. This will automatically create the anim zip file in the correct location.

Sound
TODO