Dedicated Servers
Dedicated Servers
This wiki explains everything you need to know about hosting, configuring and joining a dedicated server.
Running a dedicated server allows you to host a public multiplayer game that is visible to other players on Steam via the in-game server browser.
Hosting
To host a server, you must run dedicated_server.exe which can be found in the game's install directory. If you run the exe directly, a console window will open that displays the server's status. The exe can also be run from a Windows command prompt, in which case the server status will be displayed in the prompt from which it was run.
Once the server status has displayed both the "server started" and "server connected to Steam" messages, it is ready to accept player connections. It may take up to a minute for the server to fully load and display these messages depending on its configuration.
Port Forwarding
In order for the server to communicate with Steam, several ports must be forwarded on your router. The server's console output will notify you which ports must be forwarded (see Overview of Server Settings below). This article does not explain how to forward ports as this is a different process for different routers. It is recommended that you check your router's instruction manual or google "your router name port forwarding" to find guides on how to do this.
Hosting on Linux
The dedicated server is only provided for win32. However, Carrier Command 2 is known to work very well on Linux via Wine and we expect running the dedicated server will work on Linux via Wine in the same way.
Configuration
Configuration File (server_config.xml)
When the server launches, it will try to read settings from a configuration file server_config.xml in the same directory that dedicated_server.exe is located. If a configuration file isn't found, the server will automatically create a default one with the following content:
<?xml version="1.0" encoding="UTF-8"?>
<data port="25565" max_players="4" server_name="Carrier Command 2 Dedicated Server" password="" island_count="16" team_count_ai="1" team_count_human="1" carrier_count_per_team="1" island_count_per_team="1" base_difficulty="1" loadout_type="0" blueprints="0" game_data_path="rom_0" save_name="">
<permissions/>
<active_mod_folders/>
</data>
Overview of Server Settings
Most of the settings match those that are available when starting a new custom game, allowing you to customise the number of islands and teams, and the gameplay difficulty. The following settings are unique to dedicated servers:
port
The port the server will listen for connections on. Note that this port and the 3 subsequent ports must be forwarded in order to communicate with Steam. E.g, if port 25565 is set in the config, UDP ports 25565-25568 must be forwarded.
max_players
The maximum number of players that can be connected simultaneously.
server_name
The name that will be displayed to other players in the server list.
password
An optional password that must be entered to join the game.
game_data_path
Sets the path relative to dedicated_server.exe where the game's content is located. This should be left as rom_0 if you are launching the server from within the game's install directory.
save_name
Sets the game save for the dedicated server to load on launch. Should be the name of a folder that contains save files in "steamapps\common\Carrier Command 2\saved_games".
Permissions
The config's permissions section allows you to manually control which players have admin powers on your server, and which players are banned. Admins have the ability to kick and ban players from the pause menu's Multiplayer tab, and banned players will be prevented from joining the game.
To set the permissions for a player, the config should be modified to have one or more entries under the <permissions/> tag:
<permissions>
<peer steam_id="0" is_banned="false" is_admin="true"/>
<peer steam_id="0" is_banned="true" is_admin="false"/>
...
</permissions>
The peer's steam_id should be set to the Steam ID of the player that you want to set the permissions for. You can find the Steam ID of a player using a website such as https://steamid.xyz/ (Steam64 ID). Alternatively, if you are an admin and ban a player using the in-game ban button, the server's permissions will be automatically updated.
steam_id
The Steam ID of the player to whom the permissions apply.
is_banned
Sets whether the player is banned - "true" or "false"
is_admin
Sets whether the player is an admin, granting them the ability to kick and ban other players - "true" or "false"
Active Mods
Mods can be enabled on the server by adding mod folders to the config's active mod folders section:
<active_mod_folders>
<mod value="C:/path/to/mod_1"/>
<mod value="../../mod_2"/>
...
</active_mod_folders>
The server's console output displays the message "found X modded files" when launching if the configured mods were found successfully.
Joining
To join a dedicated server, navigate to Join -> Public Servers from the main menu in-game.
Available servers will be listed, displaying their game version, number of connected players, latency, whether or not mods are enabled and password protection status. Selecting a server from the list will connect you to it if your game version matches and it is not full.