Adding Mods to Your Dont Starve Together Server

From 4netplayers Support Wiki
Jump to: navigation, search
Rent a Don't starve Together server
Rent your own Don't Starve Together server at 4Netplayers.com

You have to install mods via FTP. You can use FileZilla for this. The mods have to be put onto the FTP upload in the mods folder. Then you will need to create and edit the dedicated_server_mods_setup.lua and list the mods:

e.g.

ServerModSetup("345692228")
ServerModSetup("346968521")
ServerModSetup("352373173")

and so on. You will get the ID from the mod folder and the Workshop URL.

To enable mods, there are two ways.

The first is to force-enable the mods. While simpler, it does not allow you to configure the mod's settings and all mods will use default configuration. To do this, the file modsettings.lua (mods/modsettings.lua) will need to be modified to force enable the mods they desire. For example, this would enable three mods from the Workshop.

ForceEnableMod("workshop-345692228")
ForceEnableMod("workshop-346968521")
ForceEnableMod("workshop-352373173")

The second option is using a modoverrides.lua file. Dedicated servers can now enable mods and set mod configurations via a file in the configuration directory named modoverrides.lua (\Klei\DoNotStarveTogether\modoverrides.lua). An example of the contents of this file is

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

In order to retrieve the configuration_options for the mod, you will need to browse to the mod directory and open the modinfo.lua file. Copy the entire configuration_options table and paste in your modoverrides.lua. Then configure to your liking. If there is no configuration_options table, then the mod is not configurable.

After you have done that, you simply start the server and it will load both files and therefore use the mods.