ServerConfiguration: Difference between revisions

From GTA Connected
Jump to navigation Jump to search
No edit summary
Line 224: Line 224:
|IV_SkipLobby
|IV_SkipLobby
|boolean
|boolean
|Enables/disables forcing players to skip the lobby in GTA IV when they connect
|(GTA IV Only) Enables/disables forcing players to skip the lobby in GTA IV when they connect
|-
|-
|IV_AllowTrains
|IV_AllowTrains
|boolean
|boolean
|Enables/disables allowing trains to spawn.
|(GTA IV Only) Enables/disables allowing trains to spawn.
|-
|-
|IV_PlayerWalking
|IV_PlayerWalking
|boolean
|boolean
|Sets whether the player walks (1) or runs (0) as normal movement.
|(GTA IV Only) Sets whether the player walks (1) or runs (0) as normal movement.
|-
|-
|IV_ScenarioPeds
|IV_ScenarioPeds
|boolean
|boolean
|Enables/disables peds that spawn for scenarios and events.
|(GTA IV Only) Enables/disables peds that spawn for scenarios and events.
|-
|-
|IV_RandomCops
|IV_RandomCops
|boolean
|boolean
|Enables/disables spawning random police officers
|(GTA IV Only) Enables/disables spawning random police officers
|-
|-
|IV_SPTraffic
|IV_SPTraffic
|boolean
|boolean
|Enables/disables spawning traffic like in singleplayer
|(GTA IV Only) Enables/disables spawning traffic like in singleplayer
|-
|-
|IV_SPCopModels
|IV_SPCopModels
|boolean
|boolean
|Enables/disables using police officer skins from singleplayer
|(GTA IV Only) Enables/disables using police officer skins from singleplayer
|}
|}



Revision as of 20:12, 22 December 2020

Summary

The server configuration file is named server.xml, and is located in the same folder as the file named Server.exe on Windows or Server on Linux.
You can use a custom server configuration file with the -config option. Example: Server.exe -config my-config.xml. See the server command arguments page for more info on accepted command arguments. The file uses the XML syntax, with a root node named server.
Official XML Specification

Settings

Server Property Name Default Value Description
compresspackets false The status of whether packets are compressed. This is only available in GTAC versions 1.0.66 and newer.
duplicatenames false The status of whether to allow players with duplicate names.
game gta:iii (required) The identifier of the game that the server should run for. See game identifiers for more information.
gamemode n/a (required) The name of the game mode, which appears in the server browser.
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. If you don't run it, you'll need to host the HTTP server elsewhere, with the port found in httpport.
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.
logpath "" (empty string) The path to store the server logs. Leave blank to not use server logs.
logtimestamp "" (empty string) The timestamp format to use in the log files. Based on the strftime format from C++. Some examples:

[%H:%M:%S] This displays only the time
[%d/%m/%Y %H:%M:%S] This would display the date in dd/mm/yyyy format followed by the time in hour:minute:second format.

maxplayers 32 The maximum amount of players that can connect to the server, between 0 and 256.
minclientversion 1.0.0 The minimum version that clients can connect with.
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.
packetcompressionlevel default The compression level for compressed packets, between 0 and 9, or the word default. Default is 6 (ZLib's Z_DEFAULT_COMPRESSION)
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.
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.
processinterval 50 The interval, in milliseconds, of each process-once occurrence, between 0 and 65,535.
rcon false The status of whether the server will host the remote console service, use true or false.
rconpassword "" (empty string) The password to connect to the remote console service.
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.
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.
streamindistance 100.0 The distance that an entity is sent to the client, recommended to be about 100.0.
streamoutdistance 200.0 The distance that an entity is removed from the client, recommended to be about 200.0.
syncinterval 30 The interval, in milliseconds, of each sync occurrence for the regularly sync'd data, between 0 and 65,535.
syncmethod interval The sync type for regularly sync'd data. Use none, interval, replay, or peer2peer. (See sync methods section below)
cvar null Sets a server's cvar value (See cvars section for accepted cvars)
bindip true Forces the server to use a specific IP. Only for hosts that have multiple IP addresses.
iv_gamemode 30 Sets the built-in gamemode for IV. See IV Gamemodes for more information.
iv_episode 0 Sets the DLC to use for IV. See IV Episodes for more information
timesync false Enables/disables syncing the time set by server to all clients
weathersync false Enables/disables syncing the weather set by server to all clients
rule "" (empty string) Adds a server rule. See server rules for more info.
multithreadednetworking false Enables/disables using multiple threads for managing network peers. Useful on multi-core systems.

CVars

CVars are values that affect specific game features. For example, the "Traffic" cvar will toggle the server traffic on/off, depending on the value provided. See the "Settings" section above to see how to add a cvar to a server configuration. Below is a list of built in cvars and values for each. You can also add custom cvars and access them with server.getCVar. CVars added to server config are not case sensitive.

CVar Name Type Description
Nametags boolean Enable/disable built-in nametags
GunShops boolean Enable/disable singleplayer gunshops (ammunations)
UniqueStuntJumps boolean Enable/disable the slow-motion unique jumps from singleplayer (example, the Callahan Bridge median)
StuntJumps boolean Enable/disable the bonuses provided by doing stunts (and what a great landing!)
StauntonToiletCamera boolean Force the multi-stage fixed camera used when entering the toilet in Belleville Park
Gates boolean Enable/disable the automatic singleplayer gates (example: the one at LCPD when you show up in a police car)
Trains boolean Enable/disable trains. This does not have any effect on GTA Vice City
Planes boolean Enable/disable the overhead ambience planes. The position and status of these are synced as well.
MaximumWantedLevel integer Set's the highest possible wanted level. Use 0 to disable automatic wanted levels altogether.
DefaultParkedCars boolean If enabled, spawns default parked vehicles found in singleplayer
Ambulances boolean Enables/disables the singleplayer rescue ambulances and paramedics when somebody is killed
Traffic boolean Enables/disables AI traffic. With peer2peer enabled, this will be synced with everyone.
Civilians boolean Enables/disables AI peds that walk around the city. With peer2peer enabled, this will be synced with everyone.
DefaultPickups boolean Enables/disables the default pickups found in singleplayer
SinglePlayer boolean Enables/disables general singleplayer features
IV_SkipLobby boolean (GTA IV Only) Enables/disables forcing players to skip the lobby in GTA IV when they connect
IV_AllowTrains boolean (GTA IV Only) Enables/disables allowing trains to spawn.
IV_PlayerWalking boolean (GTA IV Only) Sets whether the player walks (1) or runs (0) as normal movement.
IV_ScenarioPeds boolean (GTA IV Only) Enables/disables peds that spawn for scenarios and events.
IV_RandomCops boolean (GTA IV Only) Enables/disables spawning random police officers
IV_SPTraffic boolean (GTA IV Only) Enables/disables spawning traffic like in singleplayer
IV_SPCopModels boolean (GTA IV Only) Enables/disables using police officer skins from singleplayer

Sync Methods

There are a few different config options for server sync. Here is the list of them and a brief description of each.

Name Description
none Disables element sync entirely. Not recommended for multiplayer environments.
replay This will sync elements as soon as they're processed. If CPU usage is too busy and processing is slow, sync will be too.
interval Default. This forces sync of elements at a specified interval. Use <syncinterval> in server config to set the interval time in milliseconds (ms)

Sync Priority

There are a few different config options for sync packet priority. Here is the list of them and a brief description of each.

Name Description
immediate Sends sync immediately without delay
high Sends sync twice as much as medium (if both levels are waiting to be sent)
medium Sends sync twice as much as low (if both levels are waiting to be sent)
low Sends sync with the lowest priority