ServerConfiguration: Difference between revisions

No edit summary
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:Server Configuration}}
{{DISPLAYTITLE:Server Configuration}}
== Summary ==
== Summary ==
The default server configuration file is named <code>server.xml</code>, and is located in the same folder as the file named <code>Server.exe</code> on Windows or <code>Server</code> on Linux.<br>
The server configuration file is named <code>server.xml</code> by default, and is located in the same folder as the file named <code>Server.exe</code> on Windows or <code>Server</code> on Linux.<br>
You can use a custom server configuration file with the <code>-config</code> option. Example: <code>Server.exe -config my-config.xml</code>. See the [[ServerCommandLine|server command line]] page for more info on accepted command arguments.<br>
You can use a custom filename for the server configuration file with the <code>-config</code> option. Example: <code>Server.exe -config my-config.xml</code>. See the [[ServerCommandLine|server command line]] page for more info on accepted command arguments.<br>
The file uses the XML syntax, with a root node named <code>server</code>. [https://www.w3.org/TR/xml/ Official XML Specification]
The file uses the XML syntax, with a root node named <code>server</code>. [https://www.w3.org/TR/xml/ Official XML Specification]


== Settings ==
== Settings ==
It's best practice to specify all or most of these properties in your server config XML. The corresponding default value will be used if the property is not specified.<br>
{| class="wikitable"
{| class="wikitable"
!Server Property Name
!Server Property Name
!Default Value
!Default Value
!Description
!Description
|-
|anticheat
|(empty node)
|Anti cheat. See [[Anticheat|Anticheat]] for more information.
|-
|-
|bindip
|bindip
|true
|(empty string)
|Forces the server to use a specific IP. Only for hosts that have multiple IP addresses.
|Forces the server to use a specific IP. Only for hosts that have multiple IP addresses.
|-
|-
|cvar
|cvar
|null
|(individual default values)
|Sets a server's cvar value. See [[CVars|CVars]] for more information.
|Sets a server's cvar value. See [[CVars|CVars]] for more information.
|-
|-
Line 24: Line 30:
|-
|-
|game
|game
|gta:iii ('''required''')
|gta:iii
|The identifier of the game that the server should run for. See [[GameIdentifiers|game identifiers]] for more information.
|The identifier of the game that the server should run for. See [[GameIdentifiers|game identifiers]] for more information.
|-
|-
Line 40: Line 46:
|-
|-
|httpurl
|httpurl
|"" (empty string)
|(empty string)
|A URL (like a CDN) containing the server's client resource files and scripts. Clients will download them from that URL instead of the server.
|A URL (like a CDN) containing the server's client resource files and scripts. Clients will download them from that URL instead of the server.
|-
|-
Line 56: Line 62:
|-
|-
|logpath
|logpath
|"" (empty string)
|(empty string)
|The path to store the server logs. Leave blank to not use server logs.
|The path to store the server logs. Leave blank to not use server logs.
|-
|-
|logtimestamp
|logtimestamp
|"" (empty string)
|%d/%m/%Y - %X
|The timestamp format to use in the log files. Based on the [http://cplusplus.com/reference/clibrary/ctime/strftime/ strftime] format from C++. Some examples:
|The timestamp format to use in the log files. Based on the [http://cplusplus.com/reference/clibrary/ctime/strftime/ strftime] format from C++. Some examples:
<code>[%H:%M:%S]</code> This displays only the time.<br>
<code>[%H:%M:%S]</code> This displays only the time.<br>
Line 66: Line 72:
|-
|-
|maxplayers
|maxplayers
|255
|32
|The maximum amount of players that can connect to the server, between 0 and 255.
|The maximum amount of players that can connect to the server, between 0 and 127.
|-
|-
|minclientversion
|minclientversion
|1.3.0
|1.0.0.0
|The minimum version that clients can connect with. [https://gtaconnected.com/downloads/client/version See latest client version here].
|The minimum version that clients can connect with. Between 1 and 4 dot-delimited tokens. [https://gtaconnected.com/downloads/client/version See latest client version here].
|-
|minuteduration
|2.0 for IV, otherwise 1.0
|The amount of seconds for an in-game minute.
|-
|-
|modules
|modules
Line 82: Line 92:
|-
|-
|password
|password
|"" (empty string)
|(empty string)
|The password to connect to the server.
|The password to connect to the server.
|-
|-
Line 92: Line 102:
|100.0
|100.0
|The distance that a pickup is removed from the client, recommended to be about 100.0. '''Must be higher than pickupstreamindistance'''.
|The distance that a pickup is removed from the client, recommended to be about 100.0. '''Must be higher than pickupstreamindistance'''.
|-  
|-
|port
|port
|22000
|22000
Line 102: Line 112:
|-
|-
|rconpassword
|rconpassword
|"" (empty string)
|(empty string)
|The password to connect to the remote console service.
|The password to connect to the remote console service.
|-
|rconport
|23000
|The port to host the remote console service on.
|-
|-
|resources
|resources
Line 110: Line 124:
|-
|-
|rule
|rule
|"" (empty string)
|(empty string)
|Adds a server rule. See [[ServerRules|server rules]] for more info.
|Adds a server rule. See [[ServerRules|server rules]] for more info.
|-
|-
Line 120: Line 134:
|n/a ('''required''')
|n/a ('''required''')
|The name of the server, which appears in the server browser.
|The name of the server, which appears in the server browser.
|-
|serverquery
|true
|The enabled status of UDP server queries.
|-
|-
|streamindistance
|streamindistance
Line 132: Line 150:
|30
|30
|The interval, in milliseconds, of each sync occurrence for the regularly sync'd data, between 0 and 65,535.
|The interval, in milliseconds, of each sync occurrence for the regularly sync'd data, between 0 and 65,535.
|-
|synclocalentities
|false
|Whether to sync local entities to other players (objects and entities created by a client and sent to server)
|-
|-
|syncmethod
|syncmethod
|interval
|interval
|The sync type for regularly sync'd data. Use none, interval, or replay. (See sync methods section below.)
|The sync type for regularly sync'd data. Use none, interval, or replay. (See sync methods section below.)
|-
|syncpacketpriority
|low
|The priority of sync packets. Use low, medium, high, or immediate.
|-
|syncpacketreliable
|false
|Flags to bitwise-OR with for reliable packets.
|-
|syncpacketunsequenced
|false
|Flags to bitwise-OR with for unsequenced packets.
|-
|-
|timesync
|timesync
|false
|true
|Enables/disables syncing the time set by server to all clients.
|Enables/disables syncing the time set by server to all clients.
|-
|-
|weathersync
|weathersync
|false
|true
|Enables/disables syncing the weather set by server to all clients.
|Enables/disables syncing the weather set by server to all clients.
|-
|-
Line 183: Line 217:
Using <code>iv_gamemode</code> with a value of <code>30</code>, is different than using <code>iv_gamemode</code> with a value of <code>-1</code>.<br>
Using <code>iv_gamemode</code> with a value of <code>30</code>, is different than using <code>iv_gamemode</code> with a value of <code>-1</code>.<br>
This setting value is currently left in for backward compatibility, however may become obsolete in the future.
This setting value is currently left in for backward compatibility, however may become obsolete in the future.
== Example ==
<source>
<server>
<!-- General Information -->
<servername>Default Server</servername>
<game>gta:iii</game>
<gamemode>Free Roam</gamemode>
<serverbrowser>true</serverbrowser>
<maxplayers>32</maxplayers>
<password></password>
<minclientversion>1.5.0</minclientversion>
<duplicatenames>false</duplicatenames>
<!-- Networking -->
<port>22000</port>
<httpport>22000</httpport>
<httpserver>true</httpserver>
<streaminterval>1000</streaminterval>
<syncinterval>30</syncinterval>
<syncmethod>interval</syncmethod>
<synclocalentities>true</synclocalentities>
<!-- Element Streaming -->
<streamindistance>200</streamindistance>
<streamoutdistance>250</streamoutdistance>
<pickupstreamindistance>30</pickupstreamindistance>
<pickupstreamoutdistance>50</pickupstreamoutdistance>
<!-- Logging -->
<logpath>logs</logpath>
<logtimestamp>[%d/%m/%Y - %X]</logtimestamp>
<!-- GTA IV -->
<!-- https://wiki.gtaconnected.com/Resources/GTAIV/GameModes -->
<!-- https://wiki.gtaconnected.com/Resources/GTAIV/Episodes -->
<iv_gamemode>8</iv_gamemode>
<iv_episode>-1</iv_episode>
<!-- Modules -->
<!-- https://wiki.gtaconnected.com/Modules -->
<modules>
</modules>
<!-- Global CVars -->
<!-- https://wiki.gtaconnected.com/CVars -->
<cvar name="nametags" value="1" />
<cvar name="gunshops" value="1" />
<cvar name="uniquestuntjumps" value="1" />
<cvar name="stuntjumps" value="1" />
<cvar name="stauntontoiletcamera" value="1" />
<cvar name="gates" value="1" />
<cvar name="trains" value="1" />
<cvar name="planes" value="1" />
<cvar name="maximumwantedlevel" value="6" />
<cvar name="defaultparkedcars" value="1" />
<cvar name="ambulances" value="1" />
<cvar name="traffic" value="1" />
<cvar name="civilians" value="1" />
<cvar name="defaultpickups" value="1" />
<cvar name="singleplayer" value="1" />
<cvar name="bigmap" value="1" />
<cvar name="iv_playerwalking" value="0" />
<cvar name="iv_scenariopeds" value="1" />
<cvar name="iv_randomcops" value="1" />
<!-- Rules -->
<!-- https://wiki.gtaconnected.com/ServerRules -->
<rule name="Owner" value="Nobody" />
<rule name="Website" value="https://gtaconnected.com" />
<!-- Resources -->
<!-- https://wiki.gtaconnected.com/Resources -->
<resources>
<resource src="freeroam" />
</resources>
</server>
</source>
2,591

edits