This article requires cleanup to meet quality standards.
This article is a stub.

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)
 
No edit summary
 
(18 intermediate revisions by 8 users not shown)
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.
{{version|0.18.12.0|cleanup=picture of text - would be better as formatted text|stub=written as if dedi server has a client executable. needs to be redone without using client.|nosearch=y}}
==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'''.
===Enabling Mods on Client===
This method is simple and does not rely on SteamCMD mod subscription.
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.
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:


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'''.
Windows: <code>%LocalAppData%/Daedalic Entertainment GmbH/Barotrauma/WorkshopMods/Installed</code>
<br />
[[File:ModSettings.png|none|thumb]]


=== Navigate and Copy the mod folders ===
Linux: <code>/home/[username]/.local/share/Daedalic Entertainment GmbH/Barotrauma/WorkshopMods/Installed</code>
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.
[[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.
[[File:Copying files2.png|none|thumb|883x883px]]


OSX: <code>/Users/[USERNAME]/Library/Application Support/Daedalic Entertainment GmbH/Barotrauma/WorkshopMods/Installed</code>
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 ===
=== 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).
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 (<code>config_player.xml</code>) in the game's installation folder with a text editor (such as Notepad, Notepad++, Visual Studio Code, Sublime Text, Vim).
Scroll until you find the line <contentpackage
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|Example of the tist of enabled content packages in a config file.]]
   path="Data/ContentPackages/Vanilla 0.9.xml" />
Run the server again. The mods should now be enabled.
[[Category:Guides]]


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.
[[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).
{{Guides nav}}
<br />

Latest revision as of 12:40, 30 December 2023

Data is potentially outdated
Last updated for version 0.18.12.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: %LocalAppData%/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.

Example of the tist of enabled content packages in a config file.

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

v·d·e·h
Guides
Gameplay
Hosting
In-Game Dedicated Servers

Campaign Settings

Karma

Permissions

Console Commands

Hosting a Dedicated Server

List of Config Files

Enabling Mods on a Dedicated Server

Tools & Modding
Editors XML Other

Submarine Editor

Official Guide to the Submarine Editor (Diving deeper)

Character Editor

Official Guide to the Character Editor

Creating mods

XML and how Barotrauma uses it

Content packages (Content types)

Overrides

Installing mods

Publishing to Steam Workshop

Troubleshooting