Memories of Mars Wiki
Cpjet (talk | contribs)
m (Updating info)
Line 4: Line 4:
   
 
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 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
 
The server is available for Windows and Linux 64 bit versions.
 
   
 
==='''Requirements'''===
 
==='''Requirements'''===
Line 26: Line 25:
 
| valign="top" |
 
| valign="top" |
 
The server is around 3 GB, but this can grow depending on logs and the file-based database
 
The server is around 3 GB, but this can grow depending on logs and the file-based database
  +
|-
  +
| valign="top" |
  +
'''Internet-Connection'''
  +
| valign="top" |
  +
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.
 
|}
 
|}
   

Revision as of 19:33, 3 April 2020

Handbook Dedicated Servers - Memories of Mars Version 1.1

Introduction

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

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

Via Steam GUI

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

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

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

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

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": ""

}

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 Steam IDs thats are in this list are allowed to join the server. This way you can allow only a couple of people to join the server. For finding the Steam ID of another user, please use the following guide: https://steamcommunity. com/sharedfiles/filedetail s/?id=209000244

UserBlacklist

Array of Strings

12345678910111213,13121110987654321

No

A blacklist for the server. If a Steam ID is on this list the person will not be able to join the server. This way you can exclude players from joining.

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.

SteamQueryPort

Number

27015

No

Port for Steam. Make sure it is open. Defaults to 27015.

Overriding with Commandline Arguments

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.

SteamQueryPort

Number

-queryport=#### (i.e. -queryport=27016)

Port for Steam. Make sure it is open. Defaults to 27015.

MULTIHOME

String

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

Overrides the IP address the server is running on. Used in Multi-IP environments.

MaxPlayers

Number

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

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

Start the Server

Restarts

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

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

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

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

Without automatic restarts

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

With automatic restarts

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

Port-Forwarding

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

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 SteamQueryPort. 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 SteamQueryPort (default 27015) still needs to be open for the server to work correctly!

Connecting to a private server

In-game browser

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

Steam server browser

You can join a server from the Steam server browser.

Database Maintenance

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

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

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

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.

Known Issues and Troubleshooting

Two error messages on server start

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

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?

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.