Enabling Mods on a Dedicated Server: Difference between revisions

From Official Barotrauma Wiki
Jump to: navigation, search
BTGamepedia>PhatDOS
(Created a Page simply explaining how to enable mods on the latest version of the dedicated server)
 
BTGamepedia>Threeblade38977
m (Spelling and grammar)
Line 1: Line 1:
As of the recent [[Version_history/Alpha#0.9.9.0|Alpha 0.9.9.0]] release the way mods were previously activated has been 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.
''As of the [[Version_history/Alpha#0.9.9.0|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.''
 
<br />
==Procedure==
==Procedure==
One of the easiest ways to have you client and dedicated server running the same set of mods is to first enable the mods you wish to use in your client (your pc). This method is simple and does not rely on steamcmd mod subscription.
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===
===Enabling Mods on Client===
Firstly go the the steam workshop and subscribe to the mods you wish to use. Make sure that steam has finished downloading the mods before relaunching Barotrauma.
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 select settings -> Under the content packages, enable each of the mods you would like to use on your server, some mods may require a game restart, '''do this now'''.
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.
<br />
[[File:ModSettings.png|none|thumb]]
[[File:ModSettings.png|none|thumb]]


=== 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), this will reside in the steamapps folder -> common, if you're unsure where you installed Barotrauma, right click the game on steam -> properties -> local files tab -> then click on browse local game files, which will drop you in the games root directory.
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.
[[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,locally etc, depending on your server setup.
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.
[[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, navigate to Barotraumas root game directory '''on the client''' (which you found before). 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, 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).


Scroll until you find the line <contentpackage
Scroll until you find the line:
<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]]


   path="Data/ContentPackages/Vanilla 0.9.xml" />


You should see multiple <contentpackage/> entries each representing mods that are currently enabled. On the server, in the games root directory, open the '''config_player.xml''' and compare these entries, only the vanilla package should be enabled on your unmodded server.
Run the server with the executable (windows) or shell script (nix).
[[File:Config player.png|none|thumb|500x500px]]
Copy these entries into the '''config_player.xml on the server''' - this will enable the modifications for next launch.
 
Run the server with the executable (windows) or shell script (nix).  
<br />

Revision as of 08:54, 24 April 2020

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, 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).

Scroll until you find the line:

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


Run the server with the executable (windows) or shell script (nix).