Official Content/Dedicated Servers

From Medieval Engineers Wiki
Jump to: navigation, search

Dedicated servers in Medieval Engineers allow players to connect to a third party host, rather than using a player-host, in a peer-to-peer set-up. They are game instances intended for long time multiplayer games. They don’t depend on any player and they run without render and visual/audio effects. This will result to a faster connection and a more fluid multiplayer performance with less lag.

Dedicated servers are available for everyone who owns Medieval Engineers. You don’t need an extra Steam account, you get Medieval Engineers dedicated server for free to your existing Medieval Engineers account.

Note: In order to run a dedicated server, players don’t require a licensed copy of the game. However to legally obtain the game server files, at least one Steam account needs to have a valid license. Multiplayer and Dedicated Servers sub-forum

OFFICIAL DEDICATED SERVERS HOSTS

If you don’t want to host a dedicated server yourself, you can rent one from our official hosts.

DEDICATED SERVER GUIDE

REQUIREMENTS

  • A Windows PC with administrator account (only if the server will be run as a service)
  • .NET redistributable (version 4.6.1 or higher)
  • Static IP address, if you intend to host the game publicly, so that anyone from the Internet can connect to it

INSTALLATION

  • On a PC with Steam and Medieval Engineers installed – Congratulations! You already have the dedicated server installed along with Medieval Engineers, just go to the game’s installation directory (browse to “ C:\Program Files(x86)\Steam\SteamApps\MedievalEngineers” or alternatively right-click on the game in your Steam library, select “Properties” and under the tab “Local Files” click “Browse Local Files…”). In the installation directory, you will find a folder named DedicatedServer(64) with the server’s executable.
  • On a PC without Steam - You need to obtain the dedicated server files, which can be found in the C:\Program Files(x86)\Steam\SteamApps\MedievalEngineers\. Copy the DedicatedServer64 and Content folders to the target machine and you should be ready to run the server (you may need to install .Net 4.6.1 from https://www.microsoft.com/en-us/download/details.aspx?id=49981).

Note: It is recommended to always reinstall the service with new version of the game.

QUICK SERVER SETUP

Basic setup as a foreground process

  • Run MedievalEngineersDedicated.exe
  • Choose “Local/Console” item in list of servers
  • Click “Continue to server configuration”
  • Here you can set variety of options. They work the same way as in the game.
  • Fill in the name of the server
  • Press “Save config and start” and you are ready to play

Setup as a service

  • Run MedievalEngineersDedicated.exe as Administrator
  • Press the “Add new instance” button
  • Fill in the name of the service (must be unique system-wide)
  • Choose the service you just created from the list of server instances
  • Setup your game the same way as with a foreground process
  • Pay attention to ports in “Server settings”, as a single port can only be used by one server instance

USER INTERFACE

Ds1.png
  1. Server list - Here you can see the list of the server instances. There’s always one instance named “Local/Console” and optionally several other instances with custom names. The “Local/Console” instance is run on foreground as a standard application and is always there, while the other instances that the user creates are run in the background as Windows services
  2. Global configuration - Here you can set, whether the game log files should have dates appended to them and whether the server should automatically send the log files to Keen Software House upon crash.
  3. This message is shown when the application is not run with administrator rights. If you want to create or manage the server as a service you need administrator rights. The button “Run as Admin” will restart the application with administrator rights.
  4. Buttons
    • Add new instance – Creates a new instance of the dedicated server as a Windows service.
    • Remove instance – Removes an instance of the dedicated server
    • Continue to server configuration – Starts server instance configuration utility for the selected instances
    • Exit – Closes the configuration utility

SERVER CONFIGURATION

Ds2.jpg
  • Choosing game: New game / Saved worlds
    Lets you choose between starting a new world generated from a scenario, loading a previously saved world or starting a new Castle Siege session.
    The previously saved worlds are loaded either from the “AppData\Roaming\MedievalEngineersDedicated” folder in your home directory (e.g. “C:\Users\John.Doe”) or from the “ProgramData\MedievalEngineersDedicated” folder in the system root. To be able to play a world on the dedicated server that you previously created and saved in the game, you will have to copy it from your save game directory “AppData\Roaming\MedievalEngineers” to the respective folder.

</LoadWorld>

  • Game Scenario Settings
    Scenario
    Can only be chosen for the “New game” option.
    Other settings work as you know them from the game with the added bonus that you can set the numerical options to any value you want.
    (Warning: Values out of the range allowed by the game user interface are not tested and officially unsupported. They can seriously affect the game experience and performance)
  • Server Settings
    Listen IP
    Address of network interface that the server will listen on. This can be set to “0.0.0.0” (which is the default value) to listen on all interfaces, which should work fine in most cases
    Server port
    Number of the port that the server will listen on
    Server name
    Name that will be shown in the server list
    Server admins
    Steam IDs (not nicknames) of the players with administrator privileges on the server (such as kicking and banning other players), each of them on a separate line
    Steam Group ID
    If set to non-zero value, the dedicated server will only be visible for the given Steam group
    Mods
    Write mod id’s here each in a separate line to add in the game
    Pause game when empty
    This will stop the world simulation when no players are present


†Note: By “Steam ID” we mean the unique numerical identifier for a Steam account in the 64-bit format. Your Steam ID in this format can be found in the game log after running the game with Steam logged-in to your Steam account (see above) or using external tools like http://steamid.co/ or http://steamidfinder.ru/

Ds3-744x382.png
  • Buttons
    Save
    Saves the configuration for the current server instance
    Save as…
    Saves current configuration under a specified name and in selected folder
    Edit…
    Opens the current instance’s configuration file in a text editor for manual editing
    Save and start
    Saves the current configuration and starts the server either as a foreground application or as a system service.
    Reload
    Reloads data from a current config file
    Reset
    Resets to the default settings
    Restart
    Restarts the server instance (only for service instances)
    Stop
    Stops the server instance (only for service instances)
    Back to instances
    Returns to the screen with the list of server instances
    Exit
    Closes the configuration utility (but not the dedicated server, if it is running as a service)

COMMAND LINE TOOL

You can run MedievalEngineersDedicated.exe with the following arguments

console
skips instance selection dialog, dedicated server configuration dialog, and goes directly to console application
noconsole
will run without black console window
path
will load config and store all files in path specified (“D:\Whatever\Something” in example)
ignorelastsession
ignores last automatic save of the world and uses values from config file
maxPlayers
overrides maximum players that can be in session
ip
overrides ip address of dedicated server stored in config file
port
overrides port value stored in config file
taskkill /IM MedievalEngineersDedicated.exe
this will stop dedicated server correctly, saving the world etc
to stop it immediately add argument “/f”, that will kill server without asking to stop and without saving the world

CHANGING DATA DIRECTORY ON DEDICATED SERVER

To change data directory for dedicated server, mklink command may be used.

  • Make sure ‘D:\Something\DirForData’ exists
  • Make sure ‘C:\ProgramData\MedievalEngineersDedicated’ does not exists
  • Run command: mklink /J C:\ProgramData\MedievalEngineersDedicated D:\Something\DirForData

More info here (see Junction): http://msdn.microsoft.com/en-us/library/windows/desktop/aa365006%28v=vs.85%29.aspx

ROUTER AND FIREWALL SETTINGS

Static IP
If you intend to run a game that people from all over the Internet can connect to, you will need a static public IP address. Your internet service provider should tell you whether you have one or not. Without the static IP address, you will be able to host a dedicated server on your LAN, but people from outside the LAN won’t be able to connect to it reliably.
Port forwarding
The game uses UDP protocol to communicate. The default listen port is 27016, but this can be changed in the config tool. In order for people to be able to reach your server, you will have to configure your router to forward all incoming UDP traffic on port 27016 (or any other that you have specified) to the computer where your dedicated server is running.
Firewall settings
Make sure to set the firewall on your server computer to allow incoming UDP traffic on the listen port.

HOW TO FIND YOUR GROUP ID

If you want to find your Group ID, this is a way how to do it:

  1. Be a member of the group
  2. On the group’s page (e.g. http://steamcommunity.com/groups/rps), click “Invite Friends”
  3. On the new page that will open, you can find your Group ID (long number in red) in the page’s URL: http://steamcommunity.com/id/pikacc/friends/?invitegid=103582791429554934

PROBLEMS LOADING WORLDS ON RENTED SERVERS

Configuration in MedievalEngineers-Dedicated.cfg
If you are using a rented server and don't have access to the configurator app (usually there is a web interface provided instead) you may have to enter the location of the save in the MedievalEngineers-Dedicated.cfg file. Most server providers offer access to this file through some means. Its default location is in C:\ProgramData\MedievalEngineersDedicated\.

Enter the save location in the LoadWorld tag. The full path to the save must be used i.e. <LoadWorld>C:\Users\{user name}\AppData\Roaming\MedievalEngineersDedicated\Saves\{save name}</LoadWorld> or <LoadWorld>C:\ProgramData\MedievalEngineersDedicated\{server name}\Saves\{save name}.
If the full path is unknown, it can be searched for by opening the LastLoaded.sbl from the saves folder. Each of the previous saves that were loaded will be listed as key values with the full path.