Modding Tools, Tutorials & Examples

83 files

  1. Sample mod: Savable Infinity

    This sample mod provides a file, savable_infinity.lua, which when modimport'ed allows storing correctly the following numerical values as savedata:
    Plus and minus infinity (i.e., math.huge and -math.huge);
    NaN (Not a Number, i.e., the result of invalid arithmetical operations, such as 0/0).
    The game's save system is patched transparently, so other than modimport'ing savable_infinity.lua no other steps need to be taken: simply feel free to store the above values in savedata.
    The patching of the game's DataDumper function uses the fact that Don't Starve's savedata is simply Lua code to store these values as arithmetical expressions: plus infinity is saved as 1/0, negative infinity as -1/0 and NaN as 0/0. The method used for the patching is more hackish than I would like (making heavy use of Lua's debug library), but it is the cleanest method of doing so I could think of, other than simply overriding vanilla's dumper.lua.
    The rest of the mode code, beyond savable_infinity.lua, is just a test suite to see the added functionality in action.
    The file savable_infinity.lua is modimport'ed in modworldgenmain.lua, so that all savedata is stored correctly (but it can safely be modimport'ed in modmain.lua instead, if worldgen savedata is not a concern).
    In modmain.lua, the global variable ENCODE_SAVES is set to false, causing save files to be stored as plain Lua instead of zip compressed Lua, allowing visual inspection of the saves' contents. Furthermore, modmain.lua adds the included infinitysavetest component to the world entity: this component simply returns the mentioned values in its OnSave method and checks the validity of the loaded savedata in its OnLoad method, which prints the following to log.txt:

    ../mods/SavableInfinity/scripts/components/infinitysavetest.lua(17,1) Running InfinitySaveTest:OnLoad() for [100013 - cave] ../mods/SavableInfinity/scripts/components/infinitysavetest.lua(28,1) Testing savedata entry 'positive infinity'... PASSED ../mods/SavableInfinity/scripts/components/infinitysavetest.lua(28,1) Testing savedata entry 'negative infinity'... PASSED ../mods/SavableInfinity/scripts/components/infinitysavetest.lua(28,1) Testing savedata entry 'NaN'... PASSED ../mods/SavableInfinity/scripts/components/infinitysavetest.lua(30,1) Ran InfinitySaveTest:OnLoad()

    202 downloads

    8 comments

    Updated

  2. Sample Tech Branch (RoG compatible)

    Sample mod showing how to add a custom tech branch. In this example, the fire pit is used as the prototyper for a recipe of rocks (in the Magic tab).
    Due to a game change made to have recipes not requiring a prototyping structure cease to be prototypable (see this), unfortunately it was necessary to override the method Builder:KnowsRecipe() from the Builder component. More generally, the hardcoded logic in the Builder component prevented this implementation from being as clean and simple as I'd like. It is functional, nevertheless.
    Thanks to Heavenfall for originally looking into this.

    220 downloads

    7 comments

    Updated

  3. Creature Mod Tutorial 4 - Locomotion

    This tutorial will show you how to make your character run through the world!
    Instructions on using the tutorial:
    1. Download and extract the mod to your mods folder.
    2. Open and follow the instructions in 'readme_tutorial_4.txt'.
    Happy modding!

    924 downloads

    1 comment

    Updated

  4. FutaraDragon DS Tex To AtlasXml Converter

    For Don't Starve Modder Quick Build Xml from tex file for Don't Starve Update
    FutaraDragon DS Tex To AtlasXml Converter V0.0.0.26
    Create By FutaraDragon
    Installation
    when your download finish your must rename to the original file name.
    example when your download finish the file name is "1704-fddstextoatlasxmlconverter.part1.rar " your must rename to "fddstextoatlasxmlconverter.part1.rar " and other part must rename before extract it
    - Download All File and Extract by part 1
    - None Install (Can use when unrar)
    How To Use
    1. Open Program.
    2. Select Folder has tex file inside.
    3. Press Convert Button
    4. The Program Will Create xml for all of file name with format ".tex"
    5. Start Write your code again -0- (I HAVE ALL XML FILE ALREADY!!)
    AboutProgram
    For Build xml file only support for u1="0" u2="1" v1="0" v2="1" image picture
    What I'm doing https://www.facebook.com/FutaraDragonSoftware
    My FaceBook Here https://www.facebook.com/FutaraDragon
    DiscussHere if found bug or talk about this tool >>

    1,532 downloads

    1 comment

    Updated

  5. Example: Code Tips and Tricks

    A working example of the tips/tricks detailed in this thread: http://forums.kleientertainment.com/index.php?/topic/29599-code-tips-and-tricks/

    469 downloads

    2 comments

    Updated

  6. blow darts 50 remod

    this is a version remod of liao
    http://steamcommunity.com/profiles/76561198133238113/myworkshopfiles/?appid=322330

    790 downloads

    5 comments

    Submitted

  7. Weapon and Item tutorial

    Downloads for the weapon tutorial

    425 downloads

    0 comments

    Submitted

  8. [Tool] Thomas's Mod Manager V.1.0 [Rel]

    Thomas


    Don't Starve Mod Manager

    (Originally Known as Don't Starve Mod Installer, But I Did a complete Rewrite)
    Ladies and Gentle Starvers, I Present to You..

    Cool logo and all, but what Does this do you say? Well...
    Install Mod From .zip
    Install Mod From Normal Folder
    Uninstall Mod -- Currently Unavaliable
    Check Mods are Compatible -- Currently Unavaliable
    Run Don't Starve from Program
    Open Don't Starve Forums in Default browser
    (Only Compatible With Steam and Windows due to How Finding File Works and I have no idea if Visual Basic programs work on Linux or Mac.)
    Is that all you say? Well for now yes. But Not forever. Some when I will be adding new features based on suggestions and feedback, so if you have any then I want it!!!


    How To Use

    The Layout of the program is pretty Simple (as shown in the spoiler)



    Forum Thread Here >>

    610 downloads

    0 comments

    Submitted

  9. Creature Mod Tutorial 3 - Importing Animation

    This tutorial shows you how to import a new creature from Spriter!
    Instructions on using the tutorial:
    1. Download and extract the mod to your mods folder.
    2. Open and follow the instructions in 'readme_tutorial_3.txt'.
    Happy modding!

    1,092 downloads

    1 comment

    Updated

  10. Dig

    A modding tool for looking at the GLOBAL variable in this game. Simply eat anything with the console open (use the ` key) and it will print out the first 15 variables eat again and it prints out the next 15.
    To change the variable you are looking at change the modmain.lua file which has comments explaining what to change.

    111 downloads

    0 comments

    Updated

  11. TEXTools: Mac Port

    These are Mac versions of Handsome Matt's mod tools, TEXCreator and TEXTool. All I have done to them is wrap them in Wine and added icons. They work on my machine, and hopefully they will work on yours.
    The wrapping process unfortunately makes the files very large (~400mb unzipped), so I have compressed and split the files to be able to make them available here. If you would rather make wrappers yourself instead of download them, the process is very easy.
    1. Download and open Wineskin Winery as well as Matt's tools (above).
    2. Create a new blank wrapper using the latest engine (I used WS9Wine1.9.21). For simplicity's sake, you can only run one file per wrapper, so name it TEXCreator or TEXTool depending on what you're after.
    3. When prompted, say YES to installing Mono (which emulates the Microsoft.NET framework necessary to run the programs, and is why the files are so large) and NO to installing Gecko.
    4. When done, open the resulting wrapper. You should get a dialogue that has an "Install Software" button on it. (If you don't, option-click on the wrapper, select "Show Package Contents," and click on Wineskin.app.
    5. In the next dialogue, click "Move a Folder Inside," browse to the folder containing Matt's tools, and select it.
    6. When prompted, pick the appropriate EXE for the wrapper you are creating.
    7. Close all Wine dialogue buttons, and try opening your app. If all is well, the programs should run and behave the same way they do on Windows. I know very little about Wine and if you have problems, I cannot help you resolve them.
    I hope you find these programs useful!

    510 downloads

    0 comments

    Updated

  12. Creature Mod Tutorial 7 - Importing Sound

    This tutorial shows you how to add custom sound to your creature!
    Instructions on using the tutorial:
    1. Download and extract the mod to your mods folder.
    2. Open and follow the instructions in 'readme_tutorial_7.txt'.
    Happy modding!

    663 downloads

    0 comments

    Updated

  13. use(): a require() for mods

    Based on this thread, I decided to write a version of require() for mods. The use() function works just like require(), but looks for files taking the (root) mod directory as a base and runs them inside the mod environment.
    Feel free to just drop use.lua into your mods. Below is some documentation on its behaviour, and I attached a simple sample mod ("usage") to show how to use it in practice.
    Basic usage:
    Advanced usage:
    Why "use" and not "modrequire"?

    183 downloads

    0 comments

    Submitted

  14. Creature Mod Tutorial 6 - Brains

    This tutorial shows you how to add a brain to your creature!
    Instructions on using the tutorial:
    1. Download and extract the mod to your mods folder.
    2. Open and follow the instructions in 'readme_tutorial_6.txt'.
    Happy modding!

    829 downloads

    0 comments

    Updated

  15. Tiled - tileset

    Updated version of Kzisor's tileset for the modding program "Tiled". Usage is explained thoroughly in Jack Slender's (outdated) tutorial thread. Keep in mind that this tileset is 64x64 before creating your setpiece and importing it!
    Explanation:
    All tiles up until the first "wall" are basegame surface. All tiles after the first "wall" and before "fake" are basegame caves. All tiles from "fake" on are shipwrecked (not available in DST). "WALL" tiles are invalid, as they aren't meant for flooring. "FAKE (DST)" is the fake floor in DST (used in Atrium), but the beach sand in sW. "Lava" is defined as volcano lava, but doesn't actually exist. The empty purple frames are undefined and thus invalid. The tiles should all be recognisable, feel free to ask if unsure.

    163 downloads

    1 comment

    Updated

  16. Creature Mod Tutorial 5 - Stategraphs

    This tutorial shows you how to control your creature's animation using a stategraph!
    Instructions on using the tutorial:
    1. Download and extract the mod to your mods folder.
    2. Open and follow the instructions in 'readme_tutorial_5.txt'.
    Happy modding!

    816 downloads

    0 comments

    Updated

  17. HUD Hotkey

    Feel almighty as you toggle the GUI at the push of a button.
    Configurable in-game to set your own shortcut.

    101 downloads

    0 comments

    Submitted

  18. Custom Tile Adder

    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. 

    75 downloads

    2 comments

    Updated

  19. Character custom voice tutorial and custom item sounds

    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:
     

    170 downloads

    0 comments

    Updated

  20. Speech Template

    This is a speech template compatible with DS (with or without RoG) and DST.
    Remember to rename the file!
    You can set the speech file using: STRINGS.CHARACTERS.CHARNAME = require "speech_charname"
    Pro Tip: You can "comment" specific lines "out" by putting -- before them. You can also comment several lines out by putting --[[ before and ]] after them.
    I assembled this in less that 15 minutes, so it's likely there's some redundant strings left (as in, the same key being set twice). Don't blame me, should that be the case, I just copied Wilson's file from Together and ran a simple script over it to empty the quotations.

    106 downloads

    4 comments

    Submitted

  21. Spider Companion Animation Fail Sample

    Do not download unless you're trying to help me, haha. There is a steam version of this currently working if you are interested. This one is not for entertainment purposes.

    115 downloads

    1 comment

    Submitted

  22. Wod Renamer

    There may be a lot of unforeseen bugs with this. I hope not, but if you want to use it to refactor a previously code-named character, please BACK EVERYTHING UP.
    The primary purpose of this tool is to rename all the character identifier WODs and wods in the sample character template to a codename picked by you. This isn't the descriptive name, just the identifier used to reference your character. Occasionally, if you discover your name isn't unique, you may need to use this to alter the internal codename to not interfere with another modder's mod.
    STEPS:
    1) Download the Sample Character ( I like to use the steam workshop version )
    2) rename (or copy-rename) the folder from workshop-169568662 to taste.
    3) run WodRenamer
    4a) "Open!" the modmain.lua within the previously renamed folder.
    4bOi) If you're not refactoring the character detected, and instead refactoring a different prefab: type the prefab's internal name into the lower inputbox.
    4bOii) In the case of item, uncheck "character prefab" and check "item prefab"
    4bOiii) Click "Override!" (Right side text dump should show what files fit the pattern.)
    4c) If it looks like it found the right files, Type the desired codename in the lower input box, and click "Rename!"
    Known issues:
    Issue that just occurred to me: When using override -> rename WodRenamer won't check the lua files that reference, but don't include the name submitted. I'll have to fix that.

    123 downloads

    0 comments

    Submitted

  23. Test Mod

    modinfo.lua
    modmain.lua

    31 downloads

    0 comments

    Updated

  24. Speech Mod Template -- v1.3 -- WINTER UPDATE

    WrathOf
    Provides an "english_master.lua" version of my "english.lua" template file based on the "strings.lua" organization with a lot more string settings listed for all characters.
    This can be used as a starting point for creating speech mods without changing the game's "strings.lua" file and enables you to define more character specific speech than what is provided in the "strings.lua" file.
    Notes:
    ** This is now designed to use the new mod loading system without you needing to change your existing speech file based on my previous template.
    ** Refer to the "Speech Changes for DS Winter Update.txt" file for the new items you can copy/paste to your existing file in order to upgrade it for the Winter Update
    See discussion thread below for more information.

    Features:
    * Complete list of all available speech settings for all characters.
    ( and you thought you had enough already! )
    * A few "corrections" to some speech settings for consistency across all characters
    * Comments in the file on how to add more pigman talk, tombstone epitaphs and pigman names
    * Now includes speech from A Winter's Tale Update
    Game Version:
    Revision 73662 2013-02-26_10-21-53
    Use:
    Read top portion of the provided README, modmain.lua and english_master.lua files for current information.
    In the file, remove the "--" comment characters in front of any speech setting you want to activate.
    When you are done you might make a copy of the file for distribution and remove all of the commented out lines in it. That way other players can see what you have changed more easily.
    Please revise the top comment block in the file to reflect your mod's information but do leave a credit to me and the version of my template you used for support purposes. Thanks!
    Changelog:


    Support:
    Discuss this Mod

    139 downloads

    0 comments

    Submitted

  25. Mod Music Manager

    This is a component for managing special mod music. Try to use it if you can. If you need a practical example, check out Soulful Alchemy.
    Don't mind the DirectorNode stuff, I was just too lazy to remove it.
    If you have any questions or concerns, tell me please!

    86 downloads

    0 comments

    Updated