Modding Tools, Tutorials & Examples

80 files

Simple Java application that allows its user to split the contents of Klei's TEX files using their respective XML atlases. In other words...
Using it is simple:
- The first text field is for the XML file. It usually has the same name as the TEX file and is found in the same folder.
- The second text field is for the PNG file. The tool will accept TEX files if it is put in the same folder as simplex's ktools.
- The third field is for the output folder. All images contained in the PNG/TEX will be put there when they're extracted.

As I've previously mentioned, this tool does NOT convert TEX files to PNG. It will make ktech from ktools do so if they are in the same folder. The second field's label will change from to if ktech.exe is detected.

This is a music mod guide for Don't Starve Together that can also be used for Don't Starve. It is created by me, and contains links to other files needed. This is a current guide and should help more than the extremely outdated one from 2011.

Search me up on Steam to see my music mods. My Steam name is TheScraps

These are some super simple tools I made for Don't Starve years ago, recently updated and re-uploaded myself seeing how popular they were. I still believe you should use the official tools for texture creation, but for simply viewing and exploring assets this tool should work great for you.
Source code and latest releases are always available on GitHub.

library that sends data between the clients without server code. This is very useful when you want to create a client mod and send something to other players with your mod. You can find how to use it here:

IMPORTANT: Starting with version 4.3.0, the Windows binary release requires Microsoft's Visual C++ 2013 Redistributable Package (previously, the 2010 one was required). See the bottom of this description for more information.

ktools is a set of cross-platform (Linux, Mac and Windows) modding tools for Don't Starve. It consists of the following command-line tools:
ktech: a bidirectional converter between TEX texture and PNG;
krane: a anim.bin/build.bin decompiler, whose output is a Spriter project.
More detailed information about these tools may be found in the README, in the project's GitHub repository.
ktools primary release format is as source code, compilable under every platform using CMake, as per the instructions in the README. A Windows binary release is also included (the ZIP ending with "-win32").
When compiling from source, if libzip is found then the ktools are compiled with zip support, so that zip archives may be given as input in the same way directories may. The binary Windows release does not have zip support.
If you have issues running the Windows binary release, make sure you have Microsoft's Visual C++ 2013 Redistributable Package (the 32 bit version, that is, download the file called vcredist_x86.exe). It's very likely already installed, but in case of any errors first make sure that is in fact the case.

These are official sample mods developed by Klei. They are very small and barebones, in order to get you started with modding. These are meant to serve as a starting point only and are not complete mods on their own!
Sample Prefab
This mod demonstrates adding a new object to the world which can also be put in the player's inventory. For testing purposes, one is added to the player's pockets every time the game starts.
Sample Character
Use this as a starting place for your own characters! Contains template artwork for character animations, saveslot portraits, and more! Note: This will require TEX tools in order to create .tex files from the provided .png images.
Also note that the template for the bigportrait is in it's own zip file for download size reasons, but both samplecharacter.zip and samplecharacter_bigportrait.zip together make the Sample Character mod and templates.
Sample Mod
A demonstration of very basic mod setup, including attaching a custom components and setting tuning variables.

A character mod template for Don't Starve and Don't Starve Together.
There are multiple versions.
V1.0.4 - Don't Starve and Don't Starve Reign of Giants
V1.2.4.2 - Don't Starve Together
V1.3.1 - Don't Starve Shipwrecked
The full tutorial can be found here.
Features:
Basic coding for a character mod
All sprites and symbols to build a character
Extended drawing areas for custom art
Reign of Giants, Shipwrecked, and Don't Starve Together versions
This requires Don't Starve Mod Tools to autocompile .png files that are modified.
The .scml is built in a way that you can use Spriter (included with Don't Starve Mod Tools) to preview the changes you make. The .scml file is not intended to be changed itself, and changes may not correctly reflect how it appears in-game.
A folder of cleared sprites has been included to easily remove unwanted parts from your character.
Also on Github

Hello Guys so i was working on a project which allows you to convert animation to scml with one file
it creates scml,textures and back ups the anim in the .zip
The Pack Includes Following Things: FMOD Studio,Texmod,Krane Converter,Spriter and some of my old scripts including old throne
Folders on Screenshot: Textures - Extracted Textures
Input - Put .zip files in here
Output - Has the converted scml ready to open with spriter
Texmod - Creating of .tex and Viewing it
FMOD Studio - Allows to edit audio to make it work with klei games
Spriter - Studio for Animating
And don't forget about reading ReadMe.txt
Newest Version Can be found here
https://gitlab.com/CliffW/Klei-Dough-Tools

This is an example I was asked to provide for a reader on the subreddit. It is a bit starved for power approaching the late game but otherwise demonstrates some management and automation concepts, as well as a solid format for a modular base. Download, critique, whatever.

This is an example of an equippable item made in Spriter. This example requires the pc version of the Steam Workshop 'Don't Starve Mod Tools' to be installed.
Big thanks to the Waverly Mod Team for letting me use their art!

This is Klei's internal tool for converting textures into our in-game format.
NOTE:
This tool comes with a big Buyer Beware! This is a development tool and not end user friendly. As you've discovered there is virtually no error checking because we use it in a very narrow set of circumstances and those are well debugged.
Also please note the game engine only supports ARGB/DXT1/3/5.
Hey all,
I see that many of you are looking to create .tex files for the game to load. I've discussed it with the team, and we're releasing our own Texture Converter for you to use.
Have fun!
USAGE:

This is the download page for Domo's Don't Starve Character Creator tool. It is a plugin for Adobe Flash, and requires that you have Adobe Extension Manager installed. Instructions on its use can be found here. Enjoy!

This mod demonstrates how to set up a language pack to be compatible with the mod system and with Steam Workshop. Language packs distributed this way will be easier to everyone to install and update!
For more information on creating a language pack, please read this thread.

This mod can be used as a template for custom ground tiles for Don't Starve Together. I use it in the Green World. The main logic implemented in two files:
tileadder.lua — provides two functions: AddTiles() and AddMinimap();
tiledescription.lua — contains parameteres for new tiles.
Function AddTiles() should be called from the modworldgen.lua, function AddMinimap() should be called from the the modmain.lua. Ground ID is not required, the tile adder calculates it automatically; this provides high compability with any other custom tile mods. Turf prefab is also generated by the tile adder, but you need to set build/icon/anim/any other prefab data with AddPrefabPostInit() function in the modmain file.
Five steps to add new tile:
Pick the name for you tile;
Place ground texture (resolution 512x512, name «noise_yourtilename») and minimap texture (resolution 256x256, name «mini_noise_yourtilename») in the «images/textures» folder;
Add string «yourtilename = { }» to the tiledescription.lua file;
Add AddPrefabPostInit() function to set inventory images for your tile;
Test it!
More information you can find in the tiledescription.lua file. As an example, two custom ground tiles (Jungle and Tech) are added.

Save this html file to your desktop and open it in a browser. It will automatically generate a calendar of Don't Starves moon cycles going out to day 200. Input whatever day you want moon cycles calculated out to.
Notes:
I don't actually care if you put the file on your desktop or not, just put it somewhere that you can find it and open it.
Pigs will turn into werepigs on a full moon. Werepigs are very bad piggies and will likely attack you and kill you for no reason. This is also when woody becomes the doom incarnate of all vegetation.
The latest day I tested successfully was day 50,000. It was a very long calendar and the scroll-bar thingy was very small. If you intend to not starve for longer then 50k days then you may need a longer calender.
Internet Explorer may block content from the lunar calendar. It's blocking Javascript which is the programming language used to generate the calendar. I promise it won't hack your computer and install pop-up advertisements for "Over 100 horney chicks in your area can't wait to chat with you right now!"
This script won't hack anything at all actually. It's not a hack, it just makes a calendar. Just go ahead and hit "run script" or open it in Firefox instead.
While transformed into a werebeaver, you should refrain from eating the berry bushes you planted earlier that day. Bad Werebeaver! bad. bad. bad. You go back to the firepit and starve back into Woody right now!
Leave comments if there's some functionality you would like added to this calendar. Making it was kinda fun.
Don't Starve.

This code is designed for Don't Starve Together to allow for critical hits and items with critical hit properties.
By design this allows all mobs the potential to be able to crit if they have crit chance greater than 0
Using inst.components.combat:SetCrit(critchance, critdmg, critfn) we can define a basic crit settings for a mob.
Currently equipment have crit variables as inst.variables rather than component ones.
Some fun examples if you have a hat that has crit chance, we can give it to a pigman and he'll be able to crit.
Currently tested on a caves enabled server and works as advertised.

Note: this file will not run as a independent mod, its more of a toolbox if anything. Also its recommended to have some modding experience as the tutorial isn't beginner friendly.
This file is a tool box and template for making custom character voices and other item sounds as well. It contains a few common armor, structure, and weapon sounds that the base game uses, along with notes about them that may prove useful. The code is preset to follow the lua files stored inside so its less of a hassle trying to start from scratch. Last this file is subject to updates to keep up with don't starve together adding more types of voices like emotes, pose, and ghost voice.
Tutorial:

This program can be used to create a single texture and atlas file from multiple images.
VirusTotal: Here
Unpack Function:
The unpack function allows the end user to break down Texture (.tex) files into their base image into a Portable Network Graphics (.png) file.
HOW TO USE EXPORT FUNCTION:
When adding files instead of adding Image Files, select 'Texture Files' from the drop down. Add the Texture (.tex) files you wish to unpack and click the Unpack button. If you press the Unpack button and no Texture (.tex) files are in the list, it will skip operations. If a Texture (.tex) file is in the list and you press the Pack button, the pack function will skip the Texture (.tex) file.
NOTE 1:
This required .NET Frameworks 4.6 in order to run it correctly. Please download it from the Microsoft Website if you're not running Windows 10.
Regards,
Kzisor/Ysovuka