Mod Installation in Dont Starve Together
You add the mods for your server in the dashboard under Configuration Files, not via FTP. The platform rewrites these files every time the server starts, so a version changed via FTP is lost.
1. Add mods
Under Configuration Files, open the file dedicated_server_mods_setup.lua (folder mods) and add one line per mod:
ServerModSetup("345692228")
ServerModSetup("346968521")
ServerModSetup("352373173")
You can find the ID in the URL of the mod in the Steam Workshop.
2. Enable mods
There are two ways to enable mods.
Without settings
Add the mods to mods/modsettings.lua. They then start with their default settings. This example enables three mods from the Workshop:
ForceEnableMod("workshop-345692228")
ForceEnableMod("workshop-346968521")
ForceEnableMod("workshop-352373173")
With settings
With modoverrides.lua (MyDediServer/Master) you enable mods and define their settings. If you use caves, add the same mods to modoverrides.lua (MyDediServer/Caves) as well. An example of the content:
return {
["workshop-350811795"] = { enabled = true },
["workshop-387028143"] = { enabled = true },
["workshop-361336115"] = { enabled = true,
configuration_options =
{
hunt_time = 6,
["String Phrase Option Name"] = "some value",
}
},
["workshop-336882447"] = { enabled = true }
}
The available settings of a mod are in its modinfo.lua file in the configuration_options table. Copy this table into modoverrides.lua and adjust the values as you like. If there is no configuration_options table, the mod has no settings.
3. Restart the server
Once you have saved all files, restart the server. The platform writes the files to the server when it starts.
Note: Only use FTP to upload mods that are not available in the Steam Workshop. They belong in the mods folder on the Gameserver FTP.