Difference between revisions of "Adding Mods to Your Dont Starve Together Server"

From 4netplayers Support Wiki
Jump to: navigation, search
(Created page with "you have to install mods via FTP. You can use FileZilla for this. You can download it at https://filezilla-project.org/ The mods have to be put onto the FTP upload in the mods...")
 
Line 1: Line 1:
you have to install mods via FTP. You can use FileZilla for this. You can download it at https://filezilla-project.org/
+
you have to install mods via FTP. You can use [https://filezilla-project.org/ 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:
+
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.
 
e.g.
Line 12: Line 12:
 
To enable mods, there are two ways.
 
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.
+
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.
 
<pre>
 
<pre>
 
ForceEnableMod("workshop-345692228")
 
ForceEnableMod("workshop-345692228")
Line 18: Line 18:
 
ForceEnableMod("workshop-352373173")
 
ForceEnableMod("workshop-352373173")
 
</pre>
 
</pre>
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
+
 
 +
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
 
<pre>
 
<pre>
 
return {
 
return {
Line 33: Line 34:
 
}
 
}
 
</pre>
 
</pre>
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.
+
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 <code>configuration_options</code> 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.
 
After you have done that, you simply start the server and it will load both files and therefore use the mods.

Revision as of 12:53, 2 August 2020

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.