ServerConfiguration: Difference between revisions
(→CVars) |
No edit summary |
||
(36 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:Server Configuration}} | {{DISPLAYTITLE:Server Configuration}} | ||
== Summary == | == Summary == | ||
The | 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. | ||
== | == Custom Config File == | ||
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 12: | Line 15: | ||
!Description | !Description | ||
|- | |- | ||
| | |anticheat | ||
| | |(empty node) | ||
| | |Anti cheat. See [[Anticheat|Anticheat]] for more information. | ||
|- | |||
|bindip | |||
|(empty string) | |||
|Forces the server to use a specific IP. Only for hosts that have multiple IP addresses. | |||
|- | |||
|cvar | |||
|(individual default values) | |||
|Sets a server's cvar value. See [[CVars|CVars]] for more information. | |||
|- | |- | ||
|duplicatenames | |duplicatenames | ||
Line 21: | Line 32: | ||
|- | |- | ||
|game | |game | ||
|gta:iii | |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. | ||
|- | |- | ||
|gamemode | |gamemode | ||
|n/a ('''required''') | |n/a ('''required''') | ||
| | |Custom text to identify the game mode. Appears in the server browser. '''This is not IV gamemode ID'''. | ||
|- | |- | ||
|httpport | |httpport | ||
Line 34: | Line 45: | ||
|httpserver | |httpserver | ||
|true | |true | ||
|Whether or not to run the HTTP server | |Whether or not to run the [[HTTPServer|HTTP server]]. | ||
|- | |- | ||
|httpurl | |httpurl | ||
| | |(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. | ||
|- | |||
|iv_episode | |||
| -1 | |||
|Sets the DLC to use for IV. See [[Resources/GTAIV/Episodes|IV Episodes]] for more information. | |||
|- | |||
|iv_gamemode | |||
|8 | |||
|Sets the built-in gamemode for IV. See [[Resources/GTAIV/GameModes|IV Gamemodes]] for more information. | |||
|- | |||
|iv_nativemultiplayer | |||
|true | |||
|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) | ||
|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 | ||
| | |%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> | ||
<code>[%d/%m/%Y %H:%M:%S]</code> This would display the date in dd/mm/yyyy format followed by the time in hour:minute:second format. | <code>[%d/%m/%Y %H:%M:%S]</code> This would display the date in dd/mm/yyyy format followed by the time in hour:minute:second format. | ||
|- | |- | ||
|maxplayers | |maxplayers | ||
|32 | |32 | ||
|The maximum amount of players that can connect to the server, between 0 and | |The maximum amount of players that can connect to the server, between 0 and 127. | ||
|- | |- | ||
|minclientversion | |minclientversion | ||
|1.0.0 | |1.0.0.0 | ||
|The minimum version that clients can connect with. | |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 62: | Line 89: | ||
|The modules to load. Use the <code><module></code> tag inside the <code><modules></code> tag, for each module to load, including the <code>src</code> attribute for the directory path. | |The modules to load. Use the <code><module></code> tag inside the <code><modules></code> tag, for each module to load, including the <code>src</code> attribute for the directory path. | ||
|- | |- | ||
| | |multithreaded | ||
| | |false | ||
| | |Enables/disables using multiple threads for managing network peers. Useful on multi-core systems. | ||
|- | |- | ||
|password | |password | ||
| | |(empty string) | ||
|The password to connect to the server. | |The password to connect to the server. | ||
|- | |- | ||
Line 76: | Line 103: | ||
|pickupstreamoutdistance | |pickupstreamoutdistance | ||
|100.0 | |100.0 | ||
|The distance that a pickup is removed from the client, recommended to be about 100.0. | |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 | ||
|The port for the server to listen on, between 0 and 65,535. Players only need to know the port if using the /connect command in-game, not when using the server browser. | |The port for the server to listen on, between 0 and 65,535. Players only need to know the port if using the /connect command in-game, not when using the server browser. | ||
|- | |- | ||
|rcon | |rcon | ||
|false | |false | ||
|The status of whether the server will host the remote console service | |'''[Inoperable]''' The status of whether the server will host the remote console service. | ||
|- | |- | ||
|rconpassword | |rconpassword | ||
| | |(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 | ||
|(empty node) | |(empty node) | ||
|The resources to load. Use the <code><resource></code> tag inside the <code><resources></code> tag, for each resource to load, including the <code>src</code> attribute for the directory path. | |The [[Resources|resources]] to load. Use the <code><resource></code> tag inside the <code><resources></code> tag, for each resource to load, including the <code>src</code> attribute for the directory path. | ||
|- | |||
|rule | |||
|(empty string) | |||
|Adds a server rule. See [[ServerRules|server rules]] for more info. | |||
|- | |- | ||
|serverbrowser | |serverbrowser | ||
Line 105: | Line 136: | ||
|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 | ||
|100.0 | |100.0 | ||
|The distance that an entity is sent to | |The distance that an entity is sent to a client, recommended to be about 100.0 mainly because of game limits. | ||
|- | |- | ||
|streamoutdistance | |streamoutdistance | ||
|200.0 | |200.0 | ||
|The distance that an entity is removed from | |The distance that an entity is removed from a client, recommended to be about 200.0. '''Must be higher than streamindistance'''. | ||
|- | |- | ||
|syncinterval | |syncinterval | ||
|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. | |||
|- | |- | ||
|syncmethod | |syncmethod | ||
|interval | |interval | ||
|The sync type for regularly sync'd data. Use none, interval, replay | |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 | ||
| | |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 | ||
| | |true | ||
|Enables/disables syncing the weather set by server to all clients | |Enables/disables syncing the weather set by server to all clients. | ||
|- | |- | ||
| | |streaminterval | ||
| | |1000 | ||
| | |The interval, in milliseconds, between checking if elements should be streamed in/out for players, between 500-5000. | ||
|- | |- | ||
|} | |} | ||
== | == 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> | |||
Latest revision as of 14:30, 20 July 2025
Summary
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.
Custom Config File
You can start the server with a command switch for a different configuration file name. Example: Server.exe -config my-config.xml
.
CVars
See the CVars page for info.
Options
Server Property Name | Default Value | Description |
---|---|---|
anticheat | (empty node) | Anti cheat. See Anticheat for more information. |
bindip | (empty string) | Forces the server to use a specific IP. Only for hosts that have multiple IP addresses. |
cvar | (individual default values) | Sets a server's cvar value. See CVars for more information. |
duplicatenames | false | The status of whether to allow players with duplicate names. |
game | gta:iii | The identifier of the game that the server should run for. See game identifiers for more information. |
gamemode | n/a (required) | Custom text to identify the game mode. Appears in the server browser. This is not IV gamemode ID. |
httpport | 22000 | The port for the server to transfer HTTP data on, between 0 and 65,535. |
httpserver | true | Whether or not to run the HTTP server. |
httpurl | (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. |
iv_episode | -1 | Sets the DLC to use for IV. See IV Episodes for more information. |
iv_gamemode | 8 | Sets the built-in gamemode for IV. See IV Gamemodes for more information. |
iv_nativemultiplayer | true | If enabled, server uses Rockstar's sync, otherwise server uses GTAC's custom sync. See this page for more information |
logpath | (empty string) | The path to store the server logs. Leave blank to not use server logs. |
logtimestamp | %d/%m/%Y - %X | The timestamp format to use in the log files. Based on the strftime format from C++. Some examples:
|
maxplayers | 32 | The maximum amount of players that can connect to the server, between 0 and 127. |
minclientversion | 1.0.0.0 | The minimum version that clients can connect with. Between 1 and 4 dot-delimited tokens. See latest client version here. |
minuteduration | 2.0 for IV, otherwise 1.0 | The amount of seconds for an in-game minute. |
modules | (empty node) | The modules to load. Use the <module> tag inside the <modules> tag, for each module to load, including the src attribute for the directory path.
|
multithreaded | false | Enables/disables using multiple threads for managing network peers. Useful on multi-core systems. |
password | (empty string) | The password to connect to the server. |
pickupstreamindistance | 50.0 | The distance that a pickup is sent to the client, recommended to be about 50.0. |
pickupstreamoutdistance | 100.0 | The distance that a pickup is removed from the client, recommended to be about 100.0. Must be higher than pickupstreamindistance. |
port | 22000 | The port for the server to listen on, between 0 and 65,535. Players only need to know the port if using the /connect command in-game, not when using the server browser. |
rcon | false | [Inoperable] The status of whether the server will host the remote console service. |
rconpassword | (empty string) | The password to connect to the remote console service. |
rconport | 23000 | The port to host the remote console service on. |
resources | (empty node) | The resources to load. Use the <resource> tag inside the <resources> tag, for each resource to load, including the src attribute for the directory path.
|
rule | (empty string) | Adds a server rule. See server rules for more info. |
serverbrowser | false | The status of whether to show the server in the server browser, use true or false. |
servername | n/a (required) | The name of the server, which appears in the server browser. |
serverquery | true | The enabled status of UDP server queries. |
streamindistance | 100.0 | The distance that an entity is sent to a client, recommended to be about 100.0 mainly because of game limits. |
streamoutdistance | 200.0 | The distance that an entity is removed from a client, recommended to be about 200.0. Must be higher than streamindistance. |
syncinterval | 30 | 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. |
syncmethod | interval | 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 | true | Enables/disables syncing the time set by server to all clients. |
weathersync | true | Enables/disables syncing the weather set by server to all clients. |
streaminterval | 1000 | The interval, in milliseconds, between checking if elements should be streamed in/out for players, between 500-5000. |
Example
<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>