ServerConfiguration: Difference between revisions

no edit summary
No edit summary
No edit summary
 
(14 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:Server Configuration}}
{{DISPLAYTITLE:Server Configuration}}
== Summary ==
== Summary ==
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>
The server.xml file is used to configure your server with things like server name, game, networking, sync, which resources to load, and many other options.
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]


== Settings ==
== Custom Config File ==
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>
You can start the server with a [[ServerCommandLine|command switch]] for a different configuration file name. Example: <code>Server.exe -config my-config.xml</code>.


== CVars ==
See the [[CVars|CVars]] page for info.
== Options ==
{| class="wikitable"
{| class="wikitable"
!Server Property Name
!Server Property Name
Line 18: Line 20:
|-
|-
|bindip
|bindip
|"" (empty string)
|(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 36: Line 38:
|n/a ('''required''')
|n/a ('''required''')
|Custom text to identify the game mode. Appears in the server browser. '''This is not IV gamemode ID'''.
|Custom text to identify the game mode. Appears in the server browser. '''This is not IV gamemode ID'''.
|-
|gunshops
|false
|Whether gun shops should be enabled.
|-
|-
|httpport
|httpport
Line 50: Line 48:
|-
|-
|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 63: Line 61:
|iv_nativemultiplayer
|iv_nativemultiplayer
|true
|true
|If enabled, server uses native sync (from Rockstar/GFWL), otherwise server uses GTAC's custom sync.
|If enabled, server uses Rockstar's sync, otherwise server uses GTAC's custom sync. See [[NativeMultiplayer|this page for more information]]
|-
|-
|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.
|-
|-
Line 81: Line 79:
|minclientversion
|minclientversion
|1.0.0.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
|minuteduration
Line 94: Line 92:
|false
|false
|Enables/disables using multiple threads for managing network peers. Useful on multi-core systems.
|Enables/disables using multiple threads for managing network peers. Useful on multi-core systems.
|-
|nametags
|true
|Whether name tags should be enabled.
|-
|-
|password
|password
|"" (empty string)
|(empty string)
|The password to connect to the server.
|The password to connect to the server.
|-
|-
Line 110: Line 104:
|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'''.
|-
|planes
|false
|Whether planes should be enabled.
|-
|-
|port
|port
Line 124: Line 114:
|-
|-
|rconpassword
|rconpassword
|"" (empty string)
|(empty string)
|The password to connect to the remote console service.
|The password to connect to the remote console service.
|-
|-
Line 136: Line 126:
|-
|-
|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 142: Line 132:
|false
|false
|The status of whether to show the server in the server browser, use true or false.
|The status of whether to show the server in the server browser, use true or false.
|-
|serverlistingurl
|serverlisting.gtaconnected.com
|The URL of the server listing.
|-
|-
|servername
|servername
Line 162: Line 148:
|200.0
|200.0
|The distance that an entity is removed from a client, recommended to be about 200.0. '''Must be higher than streamindistance'''.
|The distance that an entity is removed from a client, recommended to be about 200.0. '''Must be higher than streamindistance'''.
|-
|stuntjumps
|false
|Whether stunt jumps should be enabled.
|-
|-
|syncinterval
|syncinterval
Line 181: Line 163:
|syncpacketpriority
|syncpacketpriority
|low
|low
|The priority of sync packets. This property can be one of the following values: low, medium, high, immediate.
|The priority of sync packets. Use low, medium, high, or immediate.
|-
|-
|syncpacketreliable
|syncpacketreliable
Line 194: Line 176:
|true
|true
|Enables/disables syncing the time set by server to all clients.
|Enables/disables syncing the time set by server to all clients.
|-
|toiletcamera
|false
|Whether toilet camera should be enabled.
|-
|trains
|false
|Whether trains should be enabled.
|-
|uniquestuntjumps
|false
|Whether unique stunt jumps should be enabled.
|-
|waiteventtimeout
|5
|The timeout duration for wait events.
|-
|-
|weathersync
|weathersync
Line 221: Line 187:
|}
|}


== CVars ==
== Example ==
See the [[CVars|CVars]] page for info.
<source>
 
<server>
== Sync Methods ==
<!-- General Information -->
There are a few different config options for server sync. Here is the list of them and a brief description of each.
<servername>Default Server</servername>
{{ServerSyncMethods}}
<game>gta:iii</game>
<gamemode>Free Roam</gamemode>
<serverbrowser>true</serverbrowser>
<maxplayers>32</maxplayers>
<password></password>
<minclientversion>1.5.0</minclientversion>
<duplicatenames>false</duplicatenames>


== Optional Settings ==
<!-- Networking -->
<port>22000</port>
<httpport>22000</httpport>
<httpserver>true</httpserver>
<streaminterval>1000</streaminterval>
<syncinterval>30</syncinterval>
<syncmethod>interval</syncmethod>
<synclocalentities>true</synclocalentities>


Most of the XML server config settings are optional, and have a default value used if not specified.<br>
<!-- Element Streaming -->
The "Default Value" column in the settings list shows "required" if the setting is required.<br>
<streamindistance>200</streamindistance>
To explicitly not specify a server config XML setting, either remove that setting's XML element, or comment it out with an XML comment.<br>
<streamoutdistance>250</streamoutdistance>
Do not leave a setting's XML element present with a blank value.
<pickupstreamindistance>30</pickupstreamindistance>
<pickupstreamoutdistance>50</pickupstreamoutdistance>


== IV Settings ==
<!-- Logging -->
<logpath>logs</logpath>
<logtimestamp>[%d/%m/%Y - %X]</logtimestamp>


Server config settings <code>iv_episode</code>, <code>iv_gamemode</code>, and <code>iv_nativemultiplayer</code>, are all optional to be specified in the server config XML file. Check the list above for default values.<br>
<!-- 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>


'''When <code>iv_nativemultiplayer</code> is <code>false</code>:'''
<!-- Modules -->
<!-- https://wiki.gtaconnected.com/Modules -->
<modules>
</modules>


<code>iv_episode</code> and <code>iv_gamemode</code> are ignored, whether they are specified or not.
<!-- 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" />


'''When <code>iv_nativemultiplayer</code> is <code>true</code>:'''
<!-- Rules -->
<!-- https://wiki.gtaconnected.com/ServerRules -->
<rule name="Owner" value="Nobody" />
<rule name="Website" value="https://gtaconnected.com" />


<code>iv_episode</code> and <code>iv_gamemode</code> are acknowledged and used if specified, or their default values are used if not specified.<br><br>
<!-- Resources -->
<code>iv_gamemode -1</code><br>
<!-- https://wiki.gtaconnected.com/Resources -->
This means that an internal IV gamemode is not used, and that a sandboxed scripting environment is preferred.<br>
<resources>
A script will need to be present to fade the camera in and spawn the player, via scripting functions [[fadeCamera|fadeCamera]] and [[spawnPlayer|spawnPlayer]].<br><br>
<resource src="freeroam" />
<code>iv_gamemode 30</code><br>
</resources>
This is an outdated value for <code>iv_gamemode</code>, and should not be used. Please use <code>-1</code> instead.<br>
</server>
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>
</source>
This setting value is currently left in for backward compatibility, however may become obsolete in the future.
2,818

edits