Dedicated servers

From ManiaPlanet Wiki
Jump to: navigation, search


A more up to date documentation can be found here: https://github.com/maniaplanet/documentation/blob/gh-pages/dedicated-server/basic.md

Contents

Introduction

The dedicated server, is a software which allow you to host a game server on any machine without the need to install the game.

In this article we'll show how to configure a server and how to run it. You'll also find answers from the FAQ to help solve an issues.

In the following of this article, to avoid confusion between the physical server, which is the machine that executes the program, and the dedicated server which is the program. So lets name the first- the machine, and the second- the dedicated.

Let's start with the installation process of the dedicated.

Installation

To install the dedicated, download and extract the files.

You can find the latest dedicated server on the maniaplanet forums.

Continue with the configuration of the dedicated.

Configuration

To launch a dedicated, you need two things. One is the dedicated itself, the second is the configuration of the match. The only tool required will be a text editor (like notepad). Let's start with the configuration of the dedicated.

Configuration of the dedicated

The configuration of the dedicated is done by text files which are located in the folder UserData/Config. Let's start with the files by default and fill in the holes to get a working dedicated. Backup this file before editing it.

Here is the dedicated file provide by default with the dedicated:

<?xml version="1.0" encoding="utf-8" ?>

<dedicated>
	<authorization_levels>
		<level>
			<name>SuperAdmin</name>
			<password>SuperAdmin</password>
		</level>
		<level>
			<name>Admin</name>
			<password>Admin</password>
		</level>
		<level>
			<name>User</name>
			<password>User</password>
		</level>
	</authorization_levels>
	
 	<masterserver_account>
		<login></login>
		<password></password>
		<validation_key></validation_key>
	</masterserver_account>
	
	<server_options>
		<name></name>
		<comment></comment>
		<hide_server>0</hide_server>					<!-- value is 0 (always shown), 1 (always hidden), 2 (hidden from nations) -->

		<max_players></max_players>
		<password></password>
		
		<max_spectators></max_spectators>
		<password_spectator></password_spectator>
		
		<ladder_mode>forced</ladder_mode>				<!-- value between 'inactive', 'forced' (or '0', '1') -->
		
		<enable_p2p_upload>False</enable_p2p_upload>
		<enable_p2p_download>False</enable_p2p_download>
		
		<callvote_timeout>60000</callvote_timeout>
		<callvote_ratio>0.5</callvote_ratio>				<!-- default ratio. value in [0..1], or -1 to forbid. -->
		<callvote_ratios>
			<voteratio command="Ban" ratio="0.65"/>
			<!-- commands can be "Ban", "Kick", "RestartMap", "NextMap", ... -->
		</callvote_ratios>

		<allow_map_download>True</allow_map_download>
		<autosave_replays>False</autosave_replays>
		<autosave_validation_replays>False</autosave_validation_replays>

		<referee_password></referee_password>
		<referee_validation_mode>0</referee_validation_mode>		<!-- value is 0 (only validate top3 players),  1 (validate all players) -->

		<use_changing_validation_seed>False</use_changing_validation_seed>

		<disable_horns>False</disable_horns>
		<clientinputs_maxlatency>0</clientinputs_maxlatency>		<!-- 0 mean automatic adjustement -->
	</server_options>
	
	<system_config>
		<connection_uploadrate>2000</connection_uploadrate>			<!-- KBps -->
		<connection_donwloadrate>81920</connection_donwloadrate>		<!-- KBps -->

		<allow_spectator_relays>False</allow_spectator_relays>

		<p2p_cache_size>600</p2p_cache_size>

		<force_ip_address></force_ip_address>
		<server_port>2350</server_port>
		<server_p2p_port>3450</server_p2p_port>
		<client_port>0</client_port>
		<bind_ip_address></bind_ip_address>
		<use_nat_upnp></use_nat_upnp>
		
		<xmlrpc_port>5000</xmlrpc_port>
		<xmlrpc_allowremote>True</xmlrpc_allowremote>			<!-- If you specify an ip adress here, it'll be the only accepted adress. this will improve security. -->
		
		<blacklist_url></blacklist_url>
		<guestlist_filename></guestlist_filename>
		<blacklist_filename></blacklist_filename>
		
		<title>SMStorm</title>

		<minimum_client_build></minimum_client_build>			<!-- Only accept updated client to a specific version. ex: 2011-10-06 -->

		<disable_coherence_checks>False</disable_coherence_checks>	<!-- disable internal checks to detect issues/cheats, and reject race times -->

		<use_proxy>False</use_proxy>
		<proxy_login></proxy_login>
		<proxy_password></proxy_password>
	</system_config>
</dedicated>

It seems impressive, but we'll analyse this point by point.

The authorization levels

The dedicated is provided with an API which allows you to modify and administrate on a separated way. Following the authorization level, a certain amount of data is accessible. The access to these different authorization levels is done with two login/password. It's recommended to modify the password of the users Admin and SuperAdmin to prevent a person from modifying your server without your authorization. To do it, you have to modify the following lines:

		<level>
			<name>SuperAdmin</name>
			<password>SuperAdminPasword</password>
		</level>
		<level>
			<name>Admin</name>
			<password>AdminPassword</password>
		</level>

Go now to the next step, which allows the dedicated to authenticate itself on the Nadeo servers to allow you to host the players from the entire world.

Authentification to the masterservers

To create a dedicated server on the Internet you absolutely need to create an account for the dedicated server. To do this, go to the player page. Go to menu "Advanced" then "Dedicated Server". On this page put the login, password and the area as you want. Once the login created, you can fill in them in the configuration of the server. Like in the following example:

 	<masterserver_account>
		<login>TheLoginOfYourDedicated</login>
		<password>PasswordOfTheDedicated</password>
		<validation_key>YourValidationKey</validation_key>
	</masterserver_account>

The validation key is not necessary if you want to make payments with your dedicated server account.

The configuration of the server

This section is the most important whatever the game that you want to do, you must complete this part. We'll detail the principals parts are located in the markers between : "<server_options>...</server_options>"

<name></name>
Between the chevrons "><" you must insert the name of the server that you want to see displayed. The server will not start without a name.
<comment></comment>
You can insert the description to the server here. This one will be displayed to the player when he will choose to see the information of your dedicated.
<max_player></max_player>
This marker indicate the number of players authorized to connect to your server.
<password></password>
Fill this field only if you want to put a password for the players. Feel free to use any password that you want.
<max_spectators></max_spectators>
As for the number of players, here you decide the hosting capacity of your dedicated in term of spectators.
<password_spectators></password_spectators>
As for the players, you can restraint the access of the spectators via a password.

We'll now see the configuration of the system. This part of the configuration will allow you to choose the [ManiaPlanet] title that you want use, but also to secure your access to the administration API.

The configuration of the system

The last part of the configuration of the dedicated, before to go to the configuration of a match. In this part, we'll be particularly interested by two markers.

<title></title>
This marker corresponds to the title that you want to play. Put SMStorm to launch a dedicated on Storm, or TMCanyon to create a TrackMania Canyon dedicated
<xmlrpc_allowremote></xmlrpc_allowremote>
This is the second protection to prevent that the configuration of your dedicated will be modify without your agreement. You can restraint the access of the API by putting the IP adresses that you want by separate them with spaces. Or if you want that no one can access outside of the machine, put false or 127.0.0.1

Configuration of the match

The configuration file of the match or MatchSetting is saved in the folder "UserData/Maps/MatchSettings". This file is composed in two parts, one define the mode of the match (game mode, rules) and the other allow to list the maps to use. This file looks like this:

<?xml version="1.0" encoding="utf-8" ?>
<playlist>
	<gameinfos>
		<game_mode>2</game_mode>
		<chat_time>10000</chat_time>
		<finishtimeout>1</finishtimeout>
		<allwarmupduration>0</allwarmupduration>
		<disablerespawn>0</disablerespawn>
		<forceshowallopponents>0</forceshowallopponents>
		<script_name></script_name>
		<rounds_pointslimit>50</rounds_pointslimit>
		<rounds_usenewrules>0</rounds_usenewrules>
		<rounds_forcedlaps>0</rounds_forcedlaps>
		<rounds_pointslimitnewrules>5</rounds_pointslimitnewrules>
		<team_pointslimit>5</team_pointslimit>
		<team_maxpoints>6</team_maxpoints>
		<team_usenewrules>0</team_usenewrules>
		<team_pointslimitnewrules>5</team_pointslimitnewrules>
		<timeattack_limit>300000</timeattack_limit>
		<timeattack_synchstartperiod>0</timeattack_synchstartperiod>
		<laps_nblaps>5</laps_nblaps>
		<laps_timelimit>0</laps_timelimit>
		<cup_pointslimit>100</cup_pointslimit>
		<cup_roundsperchallenge>5</cup_roundsperchallenge>
		<cup_nbwinners>3</cup_nbwinners>
		<cup_warmupduration>2</cup_warmupduration>
	</gameinfos>

	<hotseat>
		<game_mode>0</game_mode>
		<time_limit>300000</time_limit>
		<rounds_count>5</rounds_count>
	</hotseat>

	<filter>
		<is_lan>1</is_lan>
		<is_internet>1</is_internet>
		<is_solo>0</is_solo>
		<is_hotseat>1</is_hotseat>
		<sort_index>1000</sort_index>
		<random_map_order>0</random_map_order>
		<force_default_gamemode>0</force_default_gamemode>
	</filter>

	<startindex>0</startindex>
	<map>
		<file>Campaigns\TMCanyon\White\A04.Map.Gbx</file>
	</map>
</playlist>

The configuration of the rules

Here is an extract of a MatchSetting file

	<gameinfos>
		<game_mode>0</game_mode>
		<chat_time>10000</chat_time>
		<finishtimeout>1</finishtimeout>
		<allwarmupduration>0</allwarmupduration>
		<disablerespawn>0</disablerespawn>
		<forceshowallopponents>0</forceshowallopponents>
		<script_name>BattleWaves.Script.txt</script_name>
		<rounds_pointslimit>50</rounds_pointslimit>
		<rounds_usenewrules>0</rounds_usenewrules>
		<rounds_forcedlaps>0</rounds_forcedlaps>
		<rounds_pointslimitnewrules>5</rounds_pointslimitnewrules>
		<team_pointslimit>5</team_pointslimit>
		<team_maxpoints>6</team_maxpoints>
		<team_usenewrules>0</team_usenewrules>
		<team_pointslimitnewrules>5</team_pointslimitnewrules>
		<timeattack_limit>300000</timeattack_limit>
		<timeattack_synchstartperiod>0</timeattack_synchstartperiod>
		<laps_nblaps>5</laps_nblaps>
		<laps_timelimit>0</laps_timelimit>
		<cup_pointslimit>100</cup_pointslimit>
		<cup_roundsperchallenge>5</cup_roundsperchallenge>
		<cup_nbwinners>3</cup_nbwinners>
		<cup_warmupduration>2</cup_warmupduration>
	</gameinfos>

The value the most important in this extract is <game_mode>0</game_mode>. This is this value which will determine the differents parameters which will take into account by the server. Here is the list of the values with the game modes associated).

Let's see now the others elements of the configuration. In a first time, see the common parameters to all the game modes except script.

The common configuration
The configuration of the script mode

The only value to modify to launch a match using a script is script_name. You have to give the name of the script that you want to play. They are saved in the folder UserData/Scripts/Modes/[ShootMania|TrackMania]/

The configuration of the rounds mode

The section allowing to configure the round mode is the following:

<rounds_pointslimit>50</rounds_pointslimit>
<rounds_usenewrules>0</rounds_usenewrules>
<rounds_forcedlaps>0</rounds_forcedlaps>
<rounds_pointslimitnewrules>5</rounds_pointslimitnewrules>
The configuration of the time attack mode

The parameters of the time attack mode are the following:

<timeattack_limit>300000</timeattack_limit>
<timeattack_synchstartperiod>0</timeattack_synchstartperiod>
The configuration of the team mode

The configuration of the team mode is defined in the following part:

<team_pointslimit>5</team_pointslimit>
<team_maxpoints>6</team_maxpoints>
<team_usenewrules>0</team_usenewrules>
<team_pointslimitnewrules>5</team_pointslimitnewrules>
The configuration of the laps mode

The configuration of the mode laps is defined in the following part:

<laps_nblaps>5</laps_nblaps>
<laps_timelimit>0</laps_timelimit>
The configuration of the cup mode

The configuration of the cup mode is defined in the following part:

<cup_pointslimit>100</cup_pointslimit>
<cup_roundsperchallenge>5</cup_roundsperchallenge>
<cup_nbwinners>3</cup_nbwinners>
<cup_warmupduration>2</cup_warmupduration>


The configuration for ShootMania modes

The configuration of a ShootMania mode depends if it's launched through the Storm title or via a Title Pack.

If the mode is a script, you need to download if it's a community made script. For a Nadeo script (like Melee, Battle, etc.) you only need to check the files in this folder of the dedicated server files: ManiaPlanetServer/UserData/Maps/MatchSettings/

For the Nadeo Title Pack (like Elite, Joust, Heroes, Combo, Royal), use the following parameter into the command line when you launch the server:

/Title=SMStormElite@nadeolabs
/Title=SMStormRoyal@nadeolabs
/Title=SMStormHeroes@nadeolabs
/Title=SMStormCombo@nadeolabs
/Title=SMStormJoust@nadeolabs

Configuration of the maps

To add a map to your map list, you must respect two conditions:

  1. the map must be located in UserData/Maps ;
  2. insert the following file in the configuration file
<map>
     <file>Campaigns\TMCanyon\White\A04.Map.Gbx</file>
</map>

The path to indicate in the marker <file>...</file> corresponds to the path to your file .Map.Gbx from the folder Maps (relative path related to the folder Maps).

Now focus ourselves to the launch of the dedicated.

Launch of the dedicated

To launch the dedicated, two choices is up to you. Either you create a script which will execute a command line, or you type this one directly in a console. To launch a dedicated server, You don't only need to execute the program ManiaPlanetServer.exe (or ManiaPlanetServer if you are on Linux). It's necessary to precise at least the configuration file to use and the MatchSetting file. Here are the commands to use:

So on Windows the command line should be the following:

ManiaPlanetServer.exe /dedicated_cfg=xxx /game_settings=yyyy

On Linux you'll use the following command line:

ManiaPlanetServer /dedicated_cfg=xxx /game_settings=yyyy

FAQ

How launch a dedicated server with a personal title ?

To launch a dedicated server with a personal title, you need:

  1. to buy the title (in planets) with your ManiaPlanet account;
  2. have an internet connection for the dedicated to verify if you can use the title;
  3. copy the file .Pack.Gbx corresponding in the folder UserData/Packs ;
  4. Indicate to the dedicated the title to indicate in the configuration file via the marker <title>...</title>. For example for Elite, you must indicate: SMStormElite@nadeolabs, for Joust, it's SMStormJoust@nadeolabs, for Heroes, it's SMStormHeroes@nadeolabs.
  5. In the Matchsettings, don't forget to change the <script_name></script_name> by ShootMania\Elite.Script.txt or ShootMania\Joust.Script.txt or ShootMania\Heroes.Script.txt.
  6. Each title contains a default MatchSettings, you can call it by /game_settings=MatchSettings/SMStormElite1.txt or /game_settings=MatchSettings/SMStormJoust1.txt or /game_settings=MatchSettings/SMStormHeroes1.txt in the command line.

How launch a dedicated in local ?

To launch a dedicated in local there is several solutions.

If you have absolutely no access to Internet

So in that case, you only need to add the parameter /lan to your command line at the launch of the dedicated server. Yet with this solution you'll be able to launch only the basis titles (TrackMania Canyon, ShootMania Storm).

If you have an Internet access

You must add the parameter /forceip=LAN to your command line, or you can add <force_ip>LAN</force_ip> in your config file. This method allows to use all the titles.

How launch several dedicated on the same machine ?

You only need to run the executable several times. Yet for the configuration you have several choices.

  1. To have as many configuration files of the dedicated as servers to run and change the configuration file for each new server
  2. Use the same configuration file and change the necessary
    • /login= allow to change the login of the dedicated
    • /password= allow to change the password associated to the login
    • /servername= allow to modify the name of the server
    • /serverpassword= allow to put in place a password for the players

How create a relay server ?

To do this kind of server, you need that the server hosting the game has in his configuration file the following line:

<allow_spectator_relays>True</allow_spectator_relays>

Then the server which will be connected as spectator on your first server will launch with the following parameters in the command line

So to launch your relay you will need the following command line:

ManiaPlanetServer.exe /dedicated_cfg=xxx /join=yyy [/joinpassword=zzz]

What's the remote API administrator?

This API, is an action group provided by the dedicated, to modify it. He uses a modified XML-RPC protocol. It exists several programs capable to use this API, like ManiaLive, FAST or also XASECO.

How to moderate your own server?

Check out the Trust Circles Tool that we put in place to help you moderate your server properly: Trust Circles Info

How to promote your dedicated server as a ladder server?

What? You want to promote your standard dedicated server as a Ladder server (= a server which gives ladder points above 50K)

Prerequisites

How to set up a dedicated server as a Ladder server?

- set <ladder_mode> to forced
- set in <ladder_serverlimit_min> the minimum ladder value for the server type.
- set in <ladder_serverlimit_max> the maximum ladder value for the server type.
- empty <password> and <password_spectator>.
- set <max_players> to fit the server type rules.
- set <max_spectators> to fit the server type rules.
- set <use_changing_validation_seed> to True if needed in the server type rules.
- set <referee_validation_mode> to 1
- right game mode to fit the server type rules.
- acceptable maps (for the server type rules).

TM² Canyon ROC servers: http://forum.maniaplanet.com/viewtopic.php?f=459&t=9354

TM² Stadium ROC servers: http://forum.maniaplanet.com/viewtopic.php?f=459&t=21663

ShootMania Storm servers: http://forum.maniaplanet.com/viewtopic.php?f=459&t=24222

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox
In other languages