Mtaserver.conf

From Multi Theft Auto: Wiki
Revision as of 12:04, 21 December 2011 by NeonBlack (talk | contribs) (first part of mtaserver.conf documentation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This page describes the syntax and usage of the file “mtaserver.conf” you can find in “<mta directory>/server/mods/deathmatch”. The file contains the configuration of the MTA:SA server. It uses the common XML format. This article assumes the reader does already know this format.

The root node of the server configuration is config. After installing the server one can find a default server configuration in the above mentioned directory.

This article is based on the server configuration file of MTA:SA 1.2.


Server Name

Required: Yes
Tag: servername
Description:

Specifies the server's name. This name is used in the server browser and in server statistics.

Default: Default MTA Server
XML:

<!-- This parameter specifies the name the server will be visible as in the ingame server browser and on Game-Monitor. It is a required parameter. -->
<servername>Default MTA Server</servername>


Server IP

Required: No
Tag: serverip
Description:

Can be used to specify the IP address the MTA:SA server application shall bind to if the server has more than one IP address assigned.
If one does not know what this means they should leave it blank.

XML:

<!-- ONLY USE THIS PARAMETER IF YOU ARE SURE OF WHAT YOU ARE DOING - it is generally only needed for professional servers and should be left blank otherwise. This parameter specifies the IP to use for servers that have multiple IP addresses. If left blank, it will default to server's standard local IP address. -->
<serverip></serverip>
<!-- SERVERIP SHOULD BE LEFT BLANK UNLESS YOU ARE SURE OF WHAT YOU ARE DOING -->


Server Port

Required: Yes
Tag: serverport
Description:

The TCP/UDP port the MTA:SA server application shall bind to.

Default: 22003
XML:

<!-- This parameter specifies the UDP port on which the server will be accepting incoming player connections; default value: 22003. It is a required parameter. -->
<serverport>22003</serverport>


Player Limit

Required: Yes
Tag: maxplayers
Description:

Maximum amount of players that should be able to play on the server simultaneously. If this amount is reached new player connections will be declined.

Default: 32
XML:

<!-- This parameter specifies the number of maximum player slots available on the server; default value: 32. It is a required parameter. -->
<maxplayers>32</maxplayers>


HTTP Server

Required: No
Tag: httpserver
Description:

For enabling or disabling the builtin HTTP server. If it is enabled resources are able to provide access to various features via web browser.

Values:

0: disabled
1: enabled

Default: 1
XML:

<!-- This parameter specifies whether the builtin http server will be used. Values: 0 - disabled , 1 - enabled ; default value: 1. Optional parameter. -->
<httpserver>1</httpserver>


HTTP Port

Required: Yes, if httpserver is set to 1, No otherwise
Tag: httpport
Description:

TCP port the builtin HTTP server shall bind to. This port needs to be used when accessing a resource via web browser.

Default: 22005
XML:

<!-- This parameter specifies the TCP port on which the server will be accepting incoming http connections. It can be set to the same value as <serverport>. It is a required parameter if <httpserver> is set to 1. -->
<httpport>22005</httpport>


HTTP Download URL

Required: No
Tag: httpdownloadurl
Description:

If this is set MTA:SA clients will download all the needed client files from the URL specified. If left blank they will download directly from the MTA:SA server.
This can be used to unburden the server MTA:SA is running on. One can find the directory structure needed on the external HTTP server in “<mta directory>/server/mods/deathmatch/resource-cache/http-client-files” after the MTA:SA server has been run at least one time with all the resoruces needed.

XML:

<!-- If set, this parameter specifies the external URL from which clients will be able to download needed resources ingame. Otherwise they will download them directly from the server. -->
<httpdownloadurl></httpdownloadurl>


Automatic Client Files Copy

Required: No
Tag: httpautoclientfiles
Description:

If enabled the MTA:SA server will create the “<mta directory>/server/mods/deathmatch/resource-cache/http-client-files” directory with copies of all files that get downloaded by the clients. The contents of this directory can be copied to an external server, which then can be used as external HTTP download server (see HTTP Download URL).

Values:

0: disabled
1: enabled

Default: 1
XML:

<!-- This parameter specifies whether the client files for hosting on an external web server should be automatically copied into mods/deathmatch/resource-cache/http-client-files/ Only relevant if <httpdownloadurl> is set. Values: 0 - disabled , 1 - enabled ; default value: 1. Optional parameter. -->
<httpautoclientfiles>1</httpautoclientfiles>


To be continued.
NeonBlack 13:04, 21 December 2011 (CET)