Enabling Mods on a Dedicated Server: Difference between revisions

From Official Barotrauma Wiki
Jump to: navigation, search
m (4 revisions imported)
(Update instructions for enabling mods on servers.)
Line 17: Line 17:


=== Enabling the Mods on the Server ===
=== Enabling the Mods on the Server ===
Now that the mod files have been copied to the server, navigate back to Barotrauma's root game directory '''on''' '''your PC'''. Open the file '''config_player.xml''' with your favorite text editor (Notepad/NP++/Sublime).
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).


Scroll until you find the line:
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.
<contentpackage
   path="Data/ContentPackages/Vanilla 0.9.xml" />
You should see a '''<contentpackage/>''' entry for the vanilla game and one for each mod that is currently enabled. On the server, in the games root directory, open the '''config_player.xml''' and copy the relevant entries across.[[File:Config player.png|none|thumb|500x500px]]


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


Run the server with the executable (windows) or shell script (nix).
Run the server again. The mods should now be enabled.
[[Category:Guides]]
[[Category:Guides]]

Revision as of 19:30, 4 August 2021

As of the Alpha 0.9.9.0 release, the way mods get activated was changed. This guide assumes that you have a working Barotrauma dedicated server, with access either via RDP/FTP and some kind of text file editor.


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.

Enabling Mods on Client

Go the the Steam Workshop and subscribe to the mods you wish to use. Make sure that Steam has finished downloading the mods and then launch/relaunch Barotrauma.

From the main menu go to settings, then under content packages, enable each of the mods you wish to use on your server. Some mods may require a game restart so do this before moving on to the next step.

Navigate and Copy the Mod Folders

The Mods folder (where the mods are stored) is located in the root game directory (Barotrauma\Mods), this will reside in the steamapps -> common. If you're unsure where you installed Barotrauma, right click on the game in your Steam library and click properties -> local files -> browse local game files. 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 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.