Configure DST Server World Generation
This guide walks you through setting up custom world generation for a Don’t Starve Together dedicated server, letting you control everything from the season length to the number of spiders. You’ll edit configuration files before starting the server, and the changes apply to newly generated worlds. You’ll need access to your server’s files, either through a hosting panel or directly on the machine, and a text editor.
What You’ll Need
- Access to your DST server’s files (via FTP, a hosting control panel, or local file system).
- A text editor (Notepad++, Visual Studio Code, or even Notepad on Windows).
- Basic knowledge of your server’s directory structure.
- Optionally, the Don’t Starve Together game client to test settings locally.
Step-by-Step
- Locate the world configuration files. The files you need are usually in the
Worldfolder inside your server’s main directory. If you’re using a hosting panel, look for a file manager or a “World Settings” section. The key files areworldgenoverride.lua(for the world shape and resources) andsettings.ini(for game mode and season settings). If these files don’t exist, you can create them. - Back up existing files. Before making any changes, copy the current
worldgenoverride.luaandsettings.inito a safe location. This lets you revert if something goes wrong. - Edit
worldgenoverride.lua. This file controls the world generation itself. Open it in your text editor. You’ll see a Lua table with settings. If the file is empty, you’ll start with a basic structure. For example, to change the world size, use:return {
override_enabled = true,
worldgen = {
world_size = "medium",
},
}
Replace"medium"with"small","large", or"huge". - Adjust resource and creature settings. Inside
worldgenoverride.lua, you can set the abundance of resources like flint, grass, or trees. For example, to make flint more common, add:flint = "often",under theworldgentable. Valid values arenever,rare,default,often, andalways. Similarly, you can adjust creature spawns likespiderorbeefalo. - Set season lengths and game mode. Open
settings.ini. Look for a section called[NETWORK]and setgame_mode = survival,endless, orwilderness. For season lengths, find the[GAMEPLAY]section. Add or modify lines like:season_length = long
Valid options areshort,default,long, andverylong. You can also setday_length = longto make days longer. - Save and close the files. Ensure you save with the correct file names and extensions. If you’re using a hosting panel, save the changes there.
- Restart your server. For the changes to take effect, you must restart the server. If you’re modifying an existing world, the changes will only apply to a newly generated world. To generate a new world, you may need to delete the existing world data (usually in the
savefolder) or use the server’s “regenerate world” option if available. - Verify the changes. Once the server is back up, join the game and check if the settings are as intended. For example, if you set flint to
often, you should see more flint on the ground.
Common Mistakes
- Editing the wrong file. Make sure you’re editing
worldgenoverride.luafor world generation andsettings.inifor gameplay settings. Confusing them leads to no changes. - Syntax errors in Lua. A missing comma, extra bracket, or a typo in a setting name will cause the server to ignore the file or crash. Double-check your syntax.
- Using invalid values. Values like
veryoftenorsometimesare not valid. Stick tonever,rare,default,often,always. - Not restarting the server. Changes won’t apply until the server restarts.
- Expecting changes on an existing world. World generation settings only apply to new worlds. You must regenerate the world.
Tips
- Test locally. Use the game client to create a world with your desired settings first. This lets you see the results instantly without restarting the server.
- Use a template. Start with a known-good
worldgenoverride.luafrom the DST wiki or a community forum, then modify it. - Keep a backup. Always have a backup of your working configuration so you can quickly revert if a change breaks something.
- Be specific. You can set individual resources, not just global abundance. For example, set
flint = "often"andgrass = "rare"in the same file. - Check logs. If the server fails to start, check the server log (usually
log.txtin the server directory) for Lua errors. It will tell you the exact line number of the problem.
Troubleshooting
- Server won’t start after editing. This is almost always a syntax error in
worldgenoverride.lua. Check the log file for the line number and correct the issue. If you can’t find it, restore your backup. - Changes not applied. If you restarted but see no difference, you’re likely editing the wrong file, or the world wasn’t regenerated. Confirm the file path and that you’ve deleted the old world save or used the regenerate option.
- Settings reset to default. Some hosting panels have their own world settings UI that overrides the files. Check if your panel has a “world settings” section and make changes there instead, or disable the panel’s override.
- Game crashes on join. This can happen if you set a creature to
alwaysand the game can’t handle the load. Try lowering the value or reverting todefault. - Season length not working. Ensure you’re editing the
[GAMEPLAY]section insettings.ini, notworldgenoverride.lua. Also, check that the value is spelled correctly (e.g.,long, notlonger).
Frequently Asked Questions
Can I change world generation on an existing server without losing progress?
No, world generation settings only affect newly generated worlds. To apply them, you must create a new world, which means starting over. You can keep your character and some items by using the “world hop” feature (if enabled), but the world itself will be new.
What’s the difference between worldgenoverride.lua and settings.ini?
worldgenoverride.lua controls the terrain, resources, and creature spawns during world generation. settings.ini controls gameplay rules like season length, day length, and game mode (survival, endless, etc.).
How do I set the world size to “huge”?
In worldgenoverride.lua, under the worldgen table, set world_size = "huge". Note that huge worlds require more server resources and may cause lag on lower-end hardware.
Can I make all resources spawn in abundance?
Yes, you can set each resource to always individually. However, doing so for all resources may make the game too easy and can cause performance issues due to the sheer number of items on the ground.
Why does my server ignore the worldgenoverride.lua file?
This usually happens if the file is not in the correct directory or has a syntax error. Ensure it’s in the World folder (not Master or Caves unless you want separate settings for each). Also, check that the file starts with return { and ends with }.
Do I need to configure both the Master and Caves worlds separately?
Yes, if your server runs a caves world, it has its own worldgenoverride.lua in the Caves folder. You’ll need to edit that separately if you want different settings for the caves.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.