Enabling Mods on a Dedicated Server: Difference between revisions

From Official Barotrauma Wiki
Jump to: navigation, search
m (I cannot remember the game's current version number)
No edit summary
Tag: visualeditor-switched
Line 1: Line 1:
{{version|0.14.6.0}}
{{version|0.17.15.0}}
 
==Procedure==
==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'''.
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.
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.
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===
===Downloading mods===
Go the the Steam Workshop and subscribe to the mods you wish to use.
Go the the Steam Workshop and subscribe to the mods you wish to use.
Launch Barotrauma.
Launch Barotrauma.
It will download the mods and save them on your PC.
It will download the mods and save them on your PC.
=== 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 (<samp>Barotrauma/Mods</samp>), which in turn is in <samp>steamapps/common</samp> where Steam is installed.
The Workshop Mods folder (where the mods installed from the Steam Workshop are stored) is located in the AppData folder, the same place in which the game stores the save files. The location of this folder depends on your OS:
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.
[[File:BrowseLocalFiles.png|none|thumb|500x500px]]
You will need to copy the mods you wish to have activated to your dedicated server <samp>Barotrauma/Mods</samp> directory, via RDP/FTP/SMB/SSH etc. depending on your server setup.
[[File:Copying files2.png|none|thumb|883x883px]]


=== Enabling the Mods on the Server ===
Windows: <samp>C:/Users/[username]/AppData/Local/Daedalic Entertainment GmbH/Barotrauma/WorkshopMods/Installed/</samp>
Now that the mod files have been copied to the server, start the server.
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 <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 <samp>enabled="true"</samp> to them.
Linux: <samp>/home/[username]/.local/share/Daedalic Entertainment GmbH/Barotrauma/WorkshopMods/Installed/</samp>


[[File:EnabledContentPackages.png|frame|The attribute enabled="true" has been added to each of the desired content packages.]]
OSX: <samp>/Users/[USERNAME]/Library/Application Support/Daedalic Entertainment GmbH/Barotrauma/WorkshopMods/Installed/</samp>


You will need to copy the mods you wish to have activated to the corresponding folder on your dedicated server, via RDP/FTP/SMB/SSH etc. depending on your server setup.
=== Enabling the Mods on the Server ===
After the mod files have been copied to the server, you still need to enable them.
This can by done by editing the configuration file (<samp>config_player.xml</samp>) in the game's installation folder with a text editor (such as Notepad, Notepad++, Visual Studio Code, Sublime Text, Vim).
The easiest way to do this is by configuration opening the file from your Barotrauma installation folder, finding the content packages section of the file, and copying it to the configuration file in the server's installation folder.
[[File:Contentpackageconfigexample.png|alt=|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 12:59, 9 May 2022

Data is potentially outdated
Last updated for version 0.17.15.0
The current game version is 1.4.6.0

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 Workshop Mods folder (where the mods installed from the Steam Workshop are stored) is located in the AppData folder, the same place in which the game stores the save files. The location of this folder depends on your OS:

Windows: C:/Users/[username]/AppData/Local/Daedalic Entertainment GmbH/Barotrauma/WorkshopMods/Installed/

Linux: /home/[username]/.local/share/Daedalic Entertainment GmbH/Barotrauma/WorkshopMods/Installed/

OSX: /Users/[USERNAME]/Library/Application Support/Daedalic Entertainment GmbH/Barotrauma/WorkshopMods/Installed/

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

Enabling the Mods on the Server

After the mod files have been copied to the server, you still need to enable them. This can by done by editing the configuration file (config_player.xml) in the game's installation folder with a text editor (such as Notepad, Notepad++, Visual Studio Code, Sublime Text, Vim). The easiest way to do this is by configuration opening the file from your Barotrauma installation folder, finding the content packages section of the file, and copying it to the configuration file in the server's installation folder.

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

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