Enabling Mods on a Dedicated Server: Difference between revisions

From Official Barotrauma Wiki
Jump to: navigation, search
(Further update guide)
m (Use monowidth font for files and directories.)
Line 10: Line 10:


=== Navigate and Copy the Mod Folders ===
=== Navigate and Copy the Mod Folders ===
The Mods folder (where the mods are stored) is located in the root game directory (Barotrauma/Mods), which in turn is in '''steamapps/common''' where Steam is installed.
The Mods folder (where the mods are stored) is located in the root game directory (<samp>Barotrauma/Mods</samp>), which in turn is in <samp>steamapps/common</samp> where Steam is installed.
If you're unsure where you installed Barotrauma, right click on the game in your Steam library and click '''Properties...''' -> '''LOCAL FILES''' -> '''Browse...'''.
If you're unsure where you installed Barotrauma, right click on the game in your Steam library and click '''Properties...''' -> '''LOCAL FILES''' -> '''Browse...'''.
This will open the game's root directory.
This will open the game's root directory.
[[File:BrowseLocalFiles.png|none|thumb|500x500px]]
[[File:BrowseLocalFiles.png|none|thumb|500x500px]]
You will need to copy the mods you wish to have activated to your dedicated server Barotrauma/Mods directory, via RDP/FTP/SMB/SSH etc. depending on your server setup.
You will need to copy the mods you wish to have activated to your dedicated server <samp>Barotrauma/Mods directory</samp>, via RDP/FTP/SMB/SSH etc. depending on your server setup.
[[File:Copying files2.png|none|thumb|883x883px]]
[[File:Copying files2.png|none|thumb|883x883px]]


=== Enabling the Mods on the Server ===
=== Enabling the Mods on the Server ===
Now that the mod files have been copied to the server, start the server.
Now that the mod files have been copied to the server, start the server.
This will update the configuration file used for mods (`config_player.xml`).
This will update the configuration file used for mods (<samp>config_player.xml</samp>).
Stop the server immediately after starting it, then edit the contents of `config_player.xml` with a text editor (such as Notepad, Notepad++, Visual Studio Code, Sublime Text, Vim).
Stop the server immediately after starting it, then edit the contents of <samp>config_player.xml</samp> with a text editor (such as Notepad, Notepad++, Visual Studio Code, Sublime Text, Vim).


Find the content packages section of the file, and enable each content package you want to enable by adding the attribute `enabled="true"` to them.
Find the content packages section of the file, and enable each content package you want to enable by adding the attribute <samp>enabled="true"</samp> to them.


[[File:EnabledContentPackages.png|frame|The attribute `enabled="true"` has been added to each of the desired content packages.]]
[[File:EnabledContentPackages.png|frame|The attribute enabled="true" has been added to each of the desired content packages.]]


Run the server again. The mods should now be enabled.
Run the server again. The mods should now be enabled.
[[Category:Guides]]
[[Category:Guides]]

Revision as of 20:08, 4 August 2021

Procedure

To enable mods on a dedicated server, you will need to subscribe to the mods you wish to use on your own client (your PC) then copy the files to your server and enable them in the config_player.xml. This method is simple and does not rely on SteamCMD mod subscription. You can also acquire mods on the server side using SteamCMD, however the names of the folders SteamCMD downloads are incorrect and require manual renaming.

Downloading mods

Go the the Steam Workshop and subscribe to the mods you wish to use. Launch Barotrauma. It will download the mods and save them on your PC.

Navigate and Copy the Mod Folders

The Mods folder (where the mods are stored) is located in the root game directory (Barotrauma/Mods), which in turn is in steamapps/common where Steam is installed. If you're unsure where you installed Barotrauma, right click on the game in your Steam library and click Properties... -> LOCAL FILES -> Browse.... This will open the game's root directory.

You will need to copy the mods you wish to have activated to your dedicated server Barotrauma/Mods directory, via RDP/FTP/SMB/SSH etc. depending on your server setup.

Enabling the Mods on the Server

Now that the mod files have been copied to the server, start the server. This will update the configuration file used for mods (config_player.xml). Stop the server immediately after starting it, then edit the contents of config_player.xml with a text editor (such as Notepad, Notepad++, Visual Studio Code, Sublime Text, Vim).

Find the content packages section of the file, and enable each content package you want to enable by adding the attribute enabled="true" to them.

The attribute enabled="true" has been added to each of the desired content packages.

Run the server again. The mods should now be enabled.