Dedicated Servers

From Memories of Mars Wiki
Jump to: navigation, search

Handbook Dedicated Servers - Memories of Mars Version 1.12

Introduction[edit | edit source]

The Memories of Mars Dedicated Server is available via Steam as a Dedicated Server. It can be hosted by players who do not own the game themselves as well as on dedicated servers which can log into Steam anonymously. The server is available for Windows and Linux 64 bit versions

Requirements[edit | edit source]

The server currently has the following requirements:

CPU

The server should have 2 cores/hyperthreads (we made changes to the stock Unreal Engine 4 that allows the game server to run multithreaded). The higher the CPU frequency the better.

Memory

~5 GB during normal operation

Disk

The server is around 3 GB, but this can grow depending on logs and the file-based database

Internet-Connection

The server needs an ongoing connection to the internet with a a recommended upspeed of 200kb/s for the best experience in online play. The ports 7777 and 15000 (configurable) need to be publicly available.

Installation[edit | edit source]

Via Steam GUI[edit | edit source]

You can find the dedicated server (without having to own Memories of Mars) in your Steam library as "Memories of Mars - Dedicated Server" in the Tools category. You can install it the same way as any other game on Steam.

Via steamcmd[edit | edit source]

For dedicated servers and platforms without a graphical user interface, you can use Valve's steamcmd tool to install the dedicated server. Use the following steps to install the dedicated server via steamcmd

1. Make sure you are not logged in as root on Linux. The server will not start when root rights are detected.

2. Download steamcmd (see https://developer.valvesoftware.com/wiki/SteamCMD#Package_from_repositories) a. Probably easiest with something like sudo apt-get install steamcmd

3. Start steamcmd by typing steamcmd

4. If it is required that you login (valid until the server has been released), login using login <username>

5. Unless you want to install to the default directory, choose your install directory by using force_install_dir. 6. Download the server by issuing app_update 897590

Updating[edit | edit source]

While Memories of Mars is in Early Access, there will be quite frequent updates. The game client will always be updated to the latest version via Steam. Most patches during Early access will break compatibility of existing clients with the servers due to major code and content changes being made, therefore, the dedicated server will have to be updated in order to see servers. If you don't see your dedicated server in the Steam server browser or in-game, make sure it has the same version as the game client.

If you installed your Dedicated Server via the Steam UI, just wait for the update to be applied.

If you installed via steamcmd, use the same command again to update the server to the latest state:

app_update 897590

Database-breaking patches[edit | edit source]

We are taking care that no database-breaking changes are put into the server code during a season of Memories of Mars. If, for some reason, we have to patch the database itself, we will announce this beforehand in patch notes.


To make sure you are up to date with the information about the game and upcoming patches, please follow the news on the Steam page ([1]) of the game and join our Discord (https://discord.gg/7c6rvnv).

Configuring a server[edit | edit source]

Your private server is configurable via the file DedicatedServerConfig.cfg that you can find in the main folder where Steam downloaded the private server to. The following is an example file:

{

"ServerName": "My Private Server",
 "ServerPassword": "password123",
 "ServerID": "PS_01",
 "MapName": "Main",
 "MaxPlayers": 2,
 "EnablePVP": false,
 "EnablePVPBuildings": false,
 "EnablePVPAreas": true,
 "EnableEAC": true,
 "DailyRestartUTCHour": "12",
 "Headless": false,
 "UserWhitelist": "",
 "UserBlacklist": "",
"Admins": "13374213374213370"
}

The available fields are:

Name

Type

Example

Required

Comments

ServerName

String

My Private Server

Yes

This is the server name that you will find the server under in thein-game Server Browser or in the Steam Server Browser.

ServerPassword

String

password123

No

The password for your server. If not specified (or empty string), this will create a non-password protected server.

ServerID

String

MyServer1

Yes

By changing this, you can switch between different versions of the database (see section on database management).

MapName

String

Main

No

This must be set to Main, so leave the default.

MaxPlayers

Integer

2

No

Maximal number of players for the server. Default is 64.

EnablePVP

Boolean

false

No

If set to true, the server will be a full PVP server. If set to false, the server will be PVE. If not present, will default to PVP.

EnablePVPBuildings

Boolean

false

No

If enabled, builds will be damageable. If set to false, buildings will not be damabegable. If not present, will default to destroyable buildings. Can be set on a PVP server.

EnablePVPAreas

Boolean

true

No

If set to true, this enables PVP areas around hotspots with active FLOPs events. If not present, defaults to having PVP areas on PVE servers. Has no effect on a PVP server.

EnableEAC

Boolean

true

No

If enabled, the server will be secured with EasyAntiCheat. If not present, defaults to having EasyAntiCheat on.

DailyRestartUTCHour

String

12

No

This will issue two restarts of the server:1. The indicated hour ( UTC+0) on the hour.2. The indicated hour (UTC+0) plus 12 hours on the hour.Times are specified in the 24 hour system.Daily restarts are necessary for server stability and for countering floating-point issues.

Headless

Boolean

false

No

If set to true, this will not open a window with log outputs. Defaults to true if not present.

UserWhitelist

Array of Strings

"12345678910111213|13121110987654321"

No

A whitelist for the server. If there is any entry here, only the IDs that are in this list are allowed to join the server. This way you can allow only a couple of people to join the server. If there are multiple entries here, the IDs have to be separated by using "|".

Since 1.7.0 we have our own account system. You don't put Steam IDs into this field anymore, but Mars Account IDs, which you can find in the lower left corner of the main menu of the game. You can also look up the ID of other players in the Player List of the admin panel.

UserBlacklist

Array of Strings

"12345678910111213|13121110987654321"

No

A blacklist for the server. If an ID is on this list the person will not be able to join the server. This way you can exclude players from joining. If there are multiple entries here, the IDs have to be separated by using "|".

Since 1.7.0 we have our own account system. You don't put Steam IDs into this field anymore, but Mars Account IDs, which you can find in the lower left corner of the main menu of the game. You can also look up the ID of other players in the Player List of the admin panel.

Admins

Array of Strings

"12345678910111213|13121110987654321"

No

A list of IDs indicating which players have admin status on this server. Admins will be able to open a special UI and execute a selection of cheats from there.

Since 1.7.0 we have our own account system. You don't put Steam IDs into this field anymore, but Mars Account IDs. You can find in the lower left corner of the main menu of the game. You can also look up the ID of other players in the Player List of the admin panel.

Port

Number

7777

No

The port on which players connect. Make sure that this port is open in order for players to connect. Defaults to 7777.

BeaconPort

Number

15000

No

The port used for beacons for initial connection. Make sure that this port is open in order for players to connect over the internet. Defaults to 15000.

Overriding with Commandline Arguments[edit | edit source]

The following variables can be overwritten via commandline argument. In the case of "MULTIHOME" there is no applicable variable in the DedicatedServerConfig, so the variable can only be set via commandline argument.

If no commandline argument is set, the value from the config file is used.

Name

Type

Usage

Comments

Port

Number

-port=#### (i.e. -port=7778)

The port on which players connect. Make sure that this port is open in order for players to connect. Defaults to 7777.

BeaconPort

Number

-beaconport=#### (i.e. -beaconport=12345)

The port used for beacons for initial connection. Make sure that this port is open in order for players to connect over the internet. Defaults to 15000.

MULTIHOME

String

-MULTIHOME="###.###.###.###" (i.e.-MULTIHOME=192.168.1.26)

Overrides the IP address the server is running on. The server will use one of the available IP addresses but will not ascertain that this is a publicly reachable IP address. Used in Multi-IP environments.

This is generally the local ip of the server on the LAN. THIS DOES NOT MAP FROM THE CONFIG, you must add it to the start call in the RunServer.bat file for it to apply (Windows)

PublicIP String -PublicIP="###.###.###.###" (i.e -PublicIP=10.9.89.54) THIS DOES NOT MAP FROM THE CONFIG, you must add it to the start call in the RunServer.bat file for it to apply (Windows)

MaxPlayers

Number

-maxplayers=## (i.e. -maxplayers=12)

Maximal number of players for the server. Default is 64.

Start the Server[edit | edit source]

Restarts[edit | edit source]

The Memories of Mars server needs to be restarted twice daily, this is set up with the option DailyRestartUTCHour. Before the restart, the server will announce that it will restart in the in-game chat. After the server has been shut down, its process will end.

You are provided with two options for starting the game server:

Without automatic restarting after the twice-daily shutdown With automatic restarting after the twice-daily shutdown

The server will shut down regardless of which option you choose. We currently don't support disabling this automatic shutdown system. If you don't need to run the server for 24h a day, you can set the DailyRestartUTCHour to a time outside of your regular playtime to not have the server shut down during play.

Windows[edit | edit source]

Either use the Steam UI to start the server, or navigate to the install folder of the game. In both cases, make sure to edit the config file for setting up the server beforehand.

Without automatic restarts[edit | edit source]

You can start the server and it will run until it shuts down by starting the game

in the Steam UI with the default start option

directly by starting the file Game\Binaries\Win64\MemoriesOfMarsServer.exe.

With automatic restarts[edit | edit source]

To run the server with automatic restarts:

in the Steam UI choose the start option Launch Game Server (restart automatically) Run the batch script Run Server.bat.

Linux[edit | edit source]

Without automatic restarts[edit | edit source]

To start the server, start the script MemoriesOfMarsServer.sh in the installation folder of the game.

With automatic restarts[edit | edit source]

To start the server with automatic restarts, start the script RunServer.sh in the installation folder of the game. You might consider running this in the background or in a screen so it persists your login session.

LAN servers, Firewall issues[edit | edit source]

Port-Forwarding[edit | edit source]

A game server needs to ports to be open on UDP and TCP. Both ports are specified in the DedicatedServerConfig.cfg and can be changed to whatever ports you want (as long as they are different from each other). A public server needs to have both ports open. Depending on your setup of the host machine (the one running the server), you may need to open the ports in a firewall and in the internet router. Look up your router model on this website on how to do that: https://portforward.com/

LAN server[edit | edit source]

Every server is automatically available on LAN, as long as it is run correctly with Steam or SteamCMD and can connect to Steam through the BeaconPort. If you want a LAN-only server you have to set a password or block the outgoing game port (default 7777) of the server in the router, so that it can't connect to the internet. The BeaconPort (default 15000) still needs to be open for the server to work correctly!

Connecting to a private server[edit | edit source]

In-game browser[edit | edit source]

Choose either ALL or PRIVATE in the filter settings of the in-game server browser and connect to your server.

Steam server browser[edit | edit source]

You can join a server from the Steam server browser.

Database Maintenance[edit | edit source]

The files for the database will be stored in the following folder: Game/Saved/DB/{ServerID}/{SeasonID}.

You can create an easy backup of your files by copying everthing inside this folder and paste it elsewhere.

Once the game reaches a new season the database folder will create a new database inside a new season folder. The data from the previous season is still stored, but will not be used for the new season. The reason for that is, that we can not guarantee that the way the data is stored will not change between seasons. So you will start with a clean database in a new season, just like on the public servers.

If you are still willing to try to save your old data somehow you can try to manually copy the data over from the previous season. This might or might not work, depending on the changes made. So expect your game to cause some problems afterwards. If you can't get the game to run anymore after this just delete all the files you put in there and make sure you have a clean database.

NOTE: There will be no support by us for manually moving old databases to your newer server in case of database-breaking changes between seasons.

Reporting Errors[edit | edit source]

In case you encounter an error with the server, please inform us about it by using the game's support page at https://fs30.formsite.com/505g ames/mars/index.html

Please attach any information that can help us track down the error. Especially server logs and crash dumps are interesting for us. This information can be found in:

Windows[edit | edit source]

The subfolder Game\Saved contains the data written by the servers. Especially the Game.log in the subfolder Game\Saved\Logs is good for us, as well as the contents of the latest crash report in a subfolder of Game\Saved\Crashes.

Linux[edit | edit source]

The subfolder Game/Saved contains the data written by the servers. Especially the Game.log in the subfolder Game\Saved\Logs is good for us. Additionally, the server creates a core dump, which you will find in the root folder of the game server as a file starting with core.


Admin Tools[edit | edit source]

Admins on a Dedicated Server are able to open an AdminTools window with F8. The key to show the window can be changed in the Input Settings (in case F8 doesn't work make sure it's bound there). From here you have the option to execute a selection of cheats to author your server.

Player List[edit | edit source]

The Player List shows all players that are currently connected to your server. At the bottom you have buttons to kick a selected player, teleport to them or teleport them to your current location.

Cheat List[edit | edit source]

The Cheat List contains a selection of cheats you are allowed to execute as admin. Here you can find the usual cheats like toggling GodMode, spawning AIs or refill your HP and survival stats. To execute a cheat select it from the list and click the Execute Button at the bottom. There's also a cheat for changing the Server Password. Note that executing this cheat will not change the password in the DedicatedServerConfig and therefore will only be temporary. Also changing from no password to having a password or vice versa will not be reflected at runtime. You would need to restart your server and change the password in your DedicatedServerConfig to accomplish that.

Items[edit | edit source]

The Item List contains all items sorted by category. Here you cheat items into your inventory by selecting the item and clicking the Execute Button at the bottom. There's also a number field where you can enter the amount of items you want to receive. To make it easier to find the items you desire, we added a search bar as well as the option to mark items as favourites which will then appear inside the Favourites category at the very top.

PDA Map[edit | edit source]

Admins also have the option to teleport themselves to an arbitrary location on the map. To do that, just open the map in your PDA, right-click on the location you want to teleport to and select the "CHEAT: Teleport here" option from the context menu.

Known Issues and Troubleshooting[edit | edit source]

Two error messages on server start[edit | edit source]

There will be two error messages on server start from Steam (Process Entry Point not found). Those can be clicked away without any issues and the server will run fine. Those error messages will be fixed in an upcoming version of the server.

I can't see my server in the server list[edit | edit source]

Please make sure you followed all instructions above, especially the one about port forwarding and firewalls. Make sure your firewall is open for the two ports in the DedicatedServerConfig for both UDP and TCP and that your router is forwarding them to you as well. 90% of all issues with the server come down to closed ports, so check it thoroughly. Also make sure to only run one instance per server on each installation and port configuration. If you run two servers simultaneously on the same configuration they might interfere with each other and none of them might work.

You can run multiple servers per computer, but have to do that via commandline overrides of ports. That is for advanced users only!

What about all those warnings/errors in the log! What am I doing wrong?[edit | edit source]

Nothing actually. Servers will throw a lot of warnings right now, but you can safely ignore them at this moment. They are not for you to fix, but us.