Modding Tools, Tutorials & Examples

83 files

  1. Creature Mod Tutorial 1 - Creating a Mod

    This tutorial shows you how to create your very own mod!
    Instructions on using the tutorial:
    1. Download and extract the mod to your mods folder.
    2. Open and follow the instructions in 'readme_tutorial_1.txt'.
    Happy modding!

    1,602 downloads

    0 comments

    Updated

  2. Don't Starve Calendar

    English
    By: SITUVN
    Language: HTML, Javascipt, CSS.
    First, I created it for myself, not for public.
    But I think I should share it, now.
    You need the newest browser version or atleast supported HTML5.
    Leave a comment. Let me know what you think about this. Or when you found a bug.
    Extrac and run "Don't Starve Calendar.htm" file with a web browser.
    Thanks, Don't Starve and don't forget Werepigs.
    SITUVN
    Tiếng Việt
    Bởi: SITUVN
    Ngôn ngữ: HTML, Javascipt, CSS.
    Ban đầu, Tôi chỉ tạo cho mình tôi, không sẻ chia.
    Nhưng giờ tôi nghĩ tôi nên chia sẻ nó.
    Bạn cần phiên bản mới nhất của trình duyệt hoặc ít nhất hỗ trợ HTML5.
    Hãy bình luận. Cho tôi biết bạn nghĩ gì về thứ này. Hoặc khi bạn gặp bọ (lỗi).
    Giải nén và chạy tập tin "Don't Starve Calendar.htm" với trình duyệt.
    Cảm ơn, Đừng Đói và đừng quên Ma lợn (Werepigs).
    SITUVN

    689 downloads

    1 comment

    Submitted

  3. Easy Character Art Template

    This is a template character for Don't Starve. Instructions on how to use this template can be found here.

    3,853 downloads

    4 comments

    Updated

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

    162 downloads

    1 comment

    Updated

  5. Sample Animation

    This is an example of how to create a custom character animation. Instructions on how to use this example can be found here:
    Tutorial: Adding a Custom Idle Animation

    1,885 downloads

    5 comments

    Updated

  6. Sample - Mr Smiley

    This is just a sample of a spriter file which creates an anim that is compatible with hats.

    399 downloads

    1 comment

    Submitted

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

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

    815 downloads

    0 comments

    Updated

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

    828 downloads

    0 comments

    Updated

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

  11. Sound Mod Tutorial

    This tutorial will teach you how to create a mod which replaces a sound in 'Don't Starve'. For this tutorial, we're going to replace the 'rabbit scream' with a 'bird scream'.
    To follow this tutorial, download and extract this mod to your 'mods' folder and jump to the tutorial page here.

    958 downloads

    2 comments

    Updated

  12. Expert Tools

    This mod is just a life quality improvement for those who find themselves typing redundant code on the console.
    It doesn't really change the game in any way other than adding some handy console commands.
    In case of any questions about how stuff works, just take a look at the code.
    Just install this mod on the SERVER and it's ready to be used.
    Command list:
    shutdown(bool save)
    Same as c_shutdown()
    reset(bool save)
    Same as c_reset()
    restart(bool save)
    Same as c_reset(), for those who just like me think that the word "restart" is nice and smooth to type.
    modList(int index)
    Prints a table-like list of all the mods active on the server, containing the following information:
    ID: just for organizing the list better and to be used as a parameter;
    Name: workshop name of the mod;
    c_requires: whether or not the client needs to download the mod in order to join the server;
    Version: the mod version;
    Fancy Name: The way the mod is called, such as "expert tools".
    Parameters:
    int index: [optional] This parameter allows you to see information about the specific mod instead the whole list.
    count(str prefab)
    Uses c_announce() to display a count of the prefab on the world. See parameters for more info.
    Parameters:
    str prefab:
    "beefalo": counts and specifies beefalo and baby beefalo.
    "gears": counts gears on the world, including those that are still inside the mobs, just waiting to be killed.
    You can also input any prefab to have a generic message with a count of that prefab.
    revive(int playerIndex)
    Revives players, specific or all.
    Parameters:
    int playerIndex: [optional] specifies the player to revive by the number you get with c_listallplayers(). If absent, revives all dead players.
    kill(int playerIndex)
    Works just like revive(), but kills instead of reviving.
    creative(int playerIndex)
    Toggles creative mode on playerIndex.
    Parameters:
    int playerIndex: specifies the player.
    isCreative(int playerIndex, bool noPrint)
    Returns whether or not the player is on creative mode.
    Parameters:
    int playerIndex: [optional] specifies the player.
    bool noPrint: [optional] suppresses the print.
    If used with no parameters, a list showing all players and their creative status will be displayed.
    say(str message)
    Allows you to send chat messages from the console easier.
    Parameters:
    str message: the message.
    kick(int playerIndex)
    Kicks a player and drops its inventory.
    Parameters:
    int playerIndex: specifies the player.
    ban(int playerIndex)
    Bans a player and drops its inventory.
    Parameters:
    int playerIndex: specifies the player.
    tp(int p1, int p2)
    Teleports player 2 to player 1. Specify only player1 to teleport all to p1.
    If you get confused on who goes to who, just remember that p1 never moves.
    Parameters:
    int p1: specifies the final location of the teleport.
    int p2: [optional] specifies the player that is going to be teleported.
    If p2 is absent, all players will be teleported to p1.
    p1 and p2 work just like playerIndex on the other functions.
    heal(int playerIndex, noPrint)
    Heals health, sanity, hunger, moisture, temperature and removes revival penalties.
    Parameters:
    int playerIndex: specifies the player.
    bool noPrint: [optional] suppresses the print.
    god(int playerIndex, noPrint, god)
    Applies heal() and makes the player a god, invulnerable to everything.
    Parameters:
    int playerIndex: specifies the player.
    bool noPrint: [optional] suppresses the print.
    bool god: [optional] forces god state to be false or true, instead of toggling it.
    isGod(int playerIndex)
    Returns whether or not the player is on GodMode. Works in a similar way to isCreative().
    Parameters:
    int playerIndex: [optional] specifies the player.
    bool noPrint: [optional] suppresses the print.
    If used with no parameters, a list showing all players and their GodMode status will be displayed.
    silentBan(int playerIndex)
    Silently bans a player, without kicking from the server.
    Parameters:
    int playerIndex: specifies the player.
    unban(int playerIndex)
    Removes a player from the ban list, allowing him to join the server again.
    Parameters:
    int playerIndex: specifies the player. This player here is not a player that is on the server, its a player from the banlist()
    banlist()
    Displays a list with all the banned players, does not display user names.
    serverTime()
    Prints for how long the server has been running.
    goNext(str prefab, int ...)
    Teleports how many players needed to the nearest specified prefab.
    Parameters:
    str prefab: this is the prefab that is going to be the teleport target.
    int ...: [optional] this means that you could specify how many number of playerIndex'es you wish. Example: goNext("beefalo",1,3,7,4). This would teleport players 1,3,4 and 7 to the closest beefalo. If used with no parameters, teleports all players to the prefab.
    player()
    Displays a list with all the players. Lists player indexes, name, character and if they are admin.
    invisible(int playerIndex, bool noPrint, bool invis)
    Makes the player invisible.
    Parameters:
    int playerIndex: specifies the player.
    bool noPrint: [optional] suppresses the print.
    bool invis: [optional] forces invisible state to be false or true, instead of toggling it.
    isInvisible(int playerIndex, bool noPrint)
    Returns whether or not the player is invisible.
    Parameters:
    int playerIndex: [optional] specifies the player.
    bool noPrint: [optional] suppresses the print.
    If used with no parameters, a list showing all players and their invisible status will be displayed.
    I'm currently working on adding other functions and improving the mod.
    Please leave a comment to say something you think should be different or just that the mod helps you. Show some love!
    You may request a feature that you would like to see in this mod.

    504 downloads

    1 comment

    Updated

  13. Music Mod Tutorial

    This tutorial will teach you how to create a mod which replaces the music in 'Don't Starve'. For this tutorial, we're going to replace the main menu music.
    To follow this tutorial, download and extract this mod to your 'mods' folder and jump to the tutorial page here.

    1,052 downloads

    1 comment

    Updated

  14. Melon on a Stick Cursor Pack

    Step up your Melon on a Stick game with the official Melon on a Stick Cursor Pack!
    Including 14 unique Melon on a Stick themed cursors for Windows!
    How to install: 
    http://forums.kleientertainment.com/topic/68711-how-to-install-your-own-cursor-pack-eng
     
    Also check out my other cursor packs:
    Webber-Themed Animated Cursor Pack
    Animated "Don't Starve"-Themed Cursor Pack

    225 downloads

    0 comments

    Updated

  15. Season Calendar

    As I found Lunar Calendar from darkestaxe some days ago I found it very useful. But I couldn't find any calendar, table, chart or whatever for the season cycles, neither here nor elsewhere on the net. So I decided to write my own in MS Excel.
    Feel free to change the worksheet and the script to your needs.
    Update:
    Thanx for the nice comments.
    F... this voting system. I accidentally gave myself 2 stars and can't adjust this anymore Please could some users who like my tool vote for it?
    Update 2:
    Hopefully this version is the final one.
    Thanx for voting.
    LAST update:
    Due to the amazing Season Clock mod my tool is obsolete:
    http://forums.kleientertainment.com/files/file/862-season-clock
    Thanx again for all your feedback.

    880 downloads

    6 comments

    Updated

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

  17. Working Body Heat

    "Work keeps you warm, but makes you peckish."
    This mod considers strong physical activity such as mining or chopping trees and increases your body temperature when doing so. However, this comes at an increased calories burn rate.
    You can tune the exact values in-game.
    As suggested by _Sips[1] (warning: swear words)

    323 downloads

    3 comments

    Submitted

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

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

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

  21. Example: Follow the Leader

    This script example makes all creatures you come across in the world follow you.

    1,404 downloads

    9 comments

    Updated

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

    468 downloads

    2 comments

    Updated

  23. Minimap Icon Sample

    This is a simple sample mod for adding your custom minimap icons. Nothing fancy, but the more samples the better.. I guess.

    2,973 downloads

    6 comments

    Submitted

  24. Mod Testing Toolbox (RoG compatible)

    The mod formerly known as "simplex testing".
    Its goal is to aid in mod testing (being aimed at modders), focusing on being extensible through custom code to suit a particular purpose.
    To add custom code, place it in a file inside submodules/ and add that file's name (minus the ".lua" extension) to the Submodules.Include call in modmain.lua. Such code will have access to the variable imports performed in imports.lua and the conveniences defined in conveniences.lua, alongside the usual mod environment capabilities.
    The default submodules do (at least) the following:
    Enable debug keys.
    Add a new row of buttons to error screens, with a button for reloading the game state (like the previous mod) and another one for going straight to the main menu (without any saving).
    Run consolecommands.lua and export a few additional console utilities, listed below.
    Export an utility function called regen_level(), which regens the current level (erasing it).
    The additional console functions are:
    This mod will be listed as outdated in the Steam version. This is necessary to keep compatibility with standalone.

    1,189 downloads

    5 comments

    Updated

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