Sign in to follow this  
Kzisor

[Guide] Modding Practices: Before Beginning

Recommended Posts

Kzisor    1061
Chapter 01: Before Beginning

 

Introduction

 

This will be a series of guides to teach new modders how to properly create mods in Don't Starve and Don't Starve Together. It will give the do's and don'ts when making mods and will give easy to follow steps to help alleviate any confusion that one might experience.

 

In this chapter you will learn how to set up your workstation to create the best work conditions for modding Don't Starve and Don't Starve Together. You will learn how to create links between folders to reduce the frustrations of maintaining multiple instances of the same mod. You will learn how to download the official modding tools and which text editors are the most recommended for modding Don't Starve and Don't Starve Together. Finally at the end of this guide you will be able to take your first steps into creating your first mod.

 

Now that I've finished with the introductions to this guide, let's begin with the first steps.

 

 

Creating our Development Work Area

 

The first step to creating a great working environment is to set up our development work area. This folder is going to maintain our mod projects that we will be creating in the future. It will also contain all workshop downloads that you subscribe to in the future.

 

We do this by choosing a location on our workstation and creating a folder called Don't Starve or Don't Starve Together, dependant on which game you want to mod. Inside this folder we will create a new folder called projects. The projects folder is going to be our development work area.

 

After we've created these folders we need to make sure to remember where they are located for the next step.

 

 

Creating Symbolic Links

 

The next step with creating a better workng environment is to set up symbolic links between our Don't Starve or Don't Starve Together mod folder and our development work area. This will require a little computer knowledge, however, we will take it step by step so don't get discouraged if you don't understand.

 

Please obtain the location of the installation folder for your Steam games.

 

Default Directory:

Linux: ~/.local/share/Steam/SteamApps/common/ or ~/.steam/steam/SteamApps/common

Windows 32 Bit: C:\Program Files\Steam\steamapps\

Windows 64 Bit: C:\Program Files (x86)\Steam\steamapps\common

 

Note:

Before we go to the next step please delete the mods folder located in the installation directory of the game you wish to mod.

 

Windows

  1. Press Windows Key + R and type cmd.exe; press run.
  2. In the command prompt type; mklink / j "%path target%\%game%\mods" "%path source%\projects"
  3. Press enter to run the above command.
 

Linux

  1. Open up the terminal app.
  2. In the terminal prompt type; ln -s %path source%/projects %path target%/%game%/mods
  3. Press enter to run the above command.
 

Notes:

Replace %path target% with the installation folder path.

Replace %game% with dont_starve for Don't Starve or Don't Starve Together Beta for Don't Starve Together

Replace %path source% with the development work area path.

 

Congratulations, we've now successfully merged our development work area with our mods folder. This reduces the redundancy in the amount of instances of our mod stored on our workstation.

 

 

Downloading the Official Mods and Tools

 

Now that we've gotten our development work area set up on our workstation, it's time to download the official modding tools. The great news here is that these tools are simple and easy to download.

 

  1. Open your Steam client.
  2. Click/Hover on Library; from the dropdown menu select Tools.
  3. Scroll until you find Don't Starve Mod Tools.
  4. Install the Don't Starve Mod Tools.
 

List of Official Mod Tools:

Don't Starve Mod Tools

Don't Starve Mod Tools is the sotware you will use to upload your mods to the Steam workshop of your chosen game.

 

Spriter

Spriter is used to create animations which are used in Don't Starve and Don't Starve Together.

 

FMOD Designer

FMOD Designer is used to create sounds files which are used in Don't Starve and Don't Starve Together.

 

Tiled

Tiled is used to create terrain environments which are used by Don't Starve and Don't Starve Together.

 

Sublime

Sublime is a lua integrated development environment (IDE) which can be used to develop mods for Don't Stave and Don't Starve Together.

 

Congratulations, we've just obtained the official Don't Starve Mod Tools.

 

Recommended Text Editors

Please remember that these are in no way the best text editors in the world, they simply are the most recommended by modders.

 

1. Notepad++

This software is recommended due to it's find in files feature which allows you to search files for a specific phrase.

 

2. Sublime

This software is recommended as it was provided by Klei as their main go to IDE for creating Don't Starve.

 

The actual text editor doesn't matter as long as you are comfortable using the editor of your choice. Remember that files must be saved as a .lua file so having a compatible text editor will help greatly to reduce additional frustration while debugging your code.

 

Conclusion

 

Now you're ready to begin modding Don't Starve and Don't Starve Together.

 

Before beginning your modding journey it is recommended that you read Chapters 1 - 2.7 on the following webpage: http://www.lua.org/manual/5.1/manual.html

This will give you an extrdianry amount of information which will save you time down the road when you are trying to write and/or debug your code.

 

The next chapter in Modding Practices will be the introduction to modding. Please post any questions or concerns about this guide below.

 

Thanks for reading.

 

~Kzisor/Ysovuka

 

Edit:

Fixed some typo's in the guide.

 

Edit 2:

Added some additional information based on feedback from Jjmarco.

 

Edit 3:

Updated the symbolic link command for Linux based on simplex's knowledge.

Edited by Kzisor

Share this post


Link to post
Share on other sites
Jjmarco    54

Creating Symbolic Links

 
The next step with creating a better workng environment is to set up symbolic links between our Don't Starve or Don't Starve Together mod folder and our development work area. This will require a little computer knowledge, however, we will take it step by step so don't get discouraged if you don't understand.

 

Very useful, especially for testing mods on a dedicated server without having to copy/paste the mod's folder. :grin:

 

The actual text editor doesn't matter as long as you are comfortable using the editor of your choice.

 

You should also mention that, while you can use any text editor for modding, files must be saved in the .lua file extension. So it might be useful to have file extension revelation enabled (on Windows) if it's not already the case.

 

Great guide!

  • Health 1

Share this post


Link to post
Share on other sites
PeterA    7738
This software is recommended as it was provided by Klei as their main go to IDE for creating Don't Starve.

 

Some of us are stuck in our ways and still use Visual Studio for everything ;)

 

Great guide! Pinned it. 

Share this post


Link to post
Share on other sites
simplex    2618

Linux

  • Open up the terminal app.
  • In the terminal prompt type; ln -s %path target%\%game%\mods %path source%\projects
  • Press enter to run the above command.

You should s/\\/\//g those paths :razz:.

And the order of arguments is reversed (because ln's argument order is reversed compared to Windows's mklink). 'ln [options] a b' creates 'b' as a link pointing to 'a', so your snippet would create 'projects' as a symbolic link to 'mods', which I'm fairly certain is the opposite of what you intended.

Share this post


Link to post
Share on other sites
Kzisor    1061

@simplex, thanks simplex, I have no prior knowledge to Linux so I was going off what I read on Stack Overflow about it. I will change that immediately to reflect your knowledge.

Share this post


Link to post
Share on other sites
simplex    2618

@simplex, thanks simplex, I have no prior knowledge to Linux so I was going off what I read on Stack Overflow about it. I will change that immediately to reflect your knowledge.

Great! Though my first remark was that under Linux (and Mac) filesystem paths must use forward slashes ('/') instead of backslashes ('\'). I should've made it more obvious, since my remark assumes knowlege of sed-like regexes and wasn't too clear anyway :razz:.

EDIT: If you're interested, this if the manual page for the 'ln' command. If you have access to a Unix environment, this is the same you'll get from entering 'man ln' in a terminal (well, the manual page I linked to includes Linux-specific extensions; this is the man page for the behaviour common to all Unix OSes).

Edited by simplex

Share this post


Link to post
Share on other sites
Kzisor    1061

@simplex, heh, I actually forgot to update that section, I just copy and pasted to reverse it. I've updated the actual syntax; although if you're using linux you'd obviously see that mistake and probably correct it without thinking.  :hopelessness:  

 

Thanks again simplex!

Share this post


Link to post
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
Sign in to follow this