Server Config File – Arma 3
Lou Montana (talk | contribs) m (Add Columns template usage) |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
(52 intermediate revisions by 9 users not shown) | |||
Line 1: | Line 1: | ||
{{TOC|side}} | {{TOC|side}} | ||
{{ | {{Navbox/A3ServerSetup}} | ||
{{Feature|arma2oa|This page is about '''{{arma3}}''' server configuration. For previous titles, see [[Arma 2: Server Config File]].}} | |||
This article deals with the '''server.cfg''', a configuration file which one can use to configure various game server settings such as the difficulty level, how many votes are needed, and welcome messages. | This article deals with the '''server.cfg''', a configuration file which one can use to configure various game server settings such as the difficulty level, how many votes are needed, and welcome messages. | ||
The name ''server.cfg'' means nothing, and this file can be called anything. The real name is determined by the | The name ''server.cfg'' means nothing, and this file can be called anything. The real name is determined by the {{hl|[[Arma 3: Startup Parameters|-config]]}} command line option when launching the dedicated server. There is no default name: when no filename is specified, no server configuration file is loaded. | ||
{{ | |||
= Server Options = | |||
{| class="wikitable sortable" style="width: 100%" | {{Clear}} | ||
! Parameter | == Server Options == | ||
{| class="wikitable sortable align-center-col-2 align-center-col-4" style="width: 100%" | |||
! Parameter | |||
! width="10%" | Default | |||
! Description | |||
! Since | |||
|- | |||
| <syntaxhighlight lang="cpp" inline>passwordAdmin = "xyzxyz";</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>""</syntaxhighlight> || Password to protect admin access. || {{n/a}} | |||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>password = "xyz";</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>""</syntaxhighlight> || Password required to connect to server. || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>serverCommandPassword = "xyzxyz";</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>""</syntaxhighlight> || Password required by alternate syntax of [[serverCommand]] server-side scripting (Case-Sensitive). || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>hostname = "My Server";</syntaxhighlight> || unknown || Servername visible in the game browser. || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>maxPlayers = 10;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>64</syntaxhighlight> (DS) || The maximum number of players that can connect to server. The final number will be lesser between number given here and number of mission slots. || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>motd[] = { "Welcome to my server.", "Hosted in the net." };</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>{}</syntaxhighlight> || Two lines welcome message. Comma is the 'new line' separator. || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>admins[] = { "<UID>" };</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>{}</syntaxhighlight> || Whitelisted clients can use {{hl|#login}} without password. See {{Link|#Logged In Admin}}. || {{GVI|arma3|1.70}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>headlessClients[] = { "<IP>" };</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>{}</syntaxhighlight> || Headless Client IPs. Multiple connections and addresses are allowed in case of multiple Headless Clients. See [[Arma 3: Headless Client]]. || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>localClient[] = { "<IP>" };</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>{}</syntaxhighlight> || Indicates clients with ''unlimited'' bandwidth and ''nearly no latency''. See [[Arma 3: Headless Client]]. || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>filePatchingExceptions[] = { "<UID>" };</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>{}</syntaxhighlight> || Whitelisted clients ignore the rules defined by {{hl|allowedFilePatching}} and {{hl|verifySignatures}}, allowing them to join the server with any mods of their choice. Signature errors are still logged by the server upon connection. {{Feature|warning|Signature errors may still kick the user if the error happens before the server knows the clients SteamID, for example when trying to join with completely unsigned pbo's.}} || ''This entry has existed since 2016, but only became fully operational in'' {{GVI|arma3|2.10}} | ||
|- | |- | ||
! colspan="4" | Server Behaviour | ! colspan="4" | Server Behaviour | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>voteThreshold = 0.33;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>0.5</syntaxhighlight> || Percentage of votes needed to confirm a vote. {{hl|33%}} in this example. || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>voteMissionPlayers = 3;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>1</syntaxhighlight> || Start mission-voting when ''X'' numberOfPlayers connect. || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>allowedVoteCmds[] = { { "kick", false, false, 0.75 } };</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>{}</syntaxhighlight> || See [[Arma 3: Mission voting]]. || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>allowedVotedAdminCmds[] = { { "mission", true, true } };</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>{}</syntaxhighlight> || See [[Arma 3: Mission voting]]. || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>kickduplicate = 1;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>0</syntaxhighlight> || Do not allow duplicate ''game IDs''. Second player with an existing ID will be kicked automatically. {{hl|1}} means active, {{hl|0}} disabled. || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>loopback = true;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>false</syntaxhighlight> || Adding this option will force server into LAN mode. This will allow multiple local instances of the game to connect to the server for testing purposes. At the same time it will prevent all non-local instances from connecting. || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>upnp = true;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>false</syntaxhighlight> || Automatically creates port mapping on UPNP/IGD enabled router. This option allows to create a server behind NAT (the router must have public IP and support UPNP/IGD protocol). Read more {{Link|https://en.wikipedia.org/wiki/Internet_Gateway_Device_Protocol|Internet Gateway Device (IGD) Standardized Device Control Protocol}}. {{Feature|warning|When enabled then this setting may delay server start-up by 600s (standard UDP timeout of 10 minutes) if blocked on firewall or bad routing etc. Thus in such case is recommended to disable it.}} || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>allowedFilePatching = 0;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>0</syntaxhighlight> || Prevent or allow file patching for the clients (including the HC) | ||
* 0 is no clients | * 0 is no clients | ||
* 1 is Headless Clients only | * 1 is Headless Clients only | ||
* 2 is all clients | * 2 is all clients | ||
| {{GVI|arma3|1.50}} | | {{GVI|arma3|1.50}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>allowedLoadFileExtensions[] = { "sqf", "txt" };</syntaxhighlight> || unknown || Only allow files with listed extensions to be loaded via [[loadFile]] command. Not listing any extension means everything is allowed. Defining the setting as empty arrays means nothing is allowed. || {{GVI|arma3|1.20}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>allowedPreprocessFileExtensions[] = { "sqf", "sqs" };</syntaxhighlight> || unknown || Only allow files with listed extensions to be loaded via [[preprocessFile]] / [[preprocessFileLineNumbers]] commands. Not listing any extension means everything is allowed. Defining the setting as empty arrays means nothing is allowed. || {{GVI|arma3|1.20}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>allowedHTMLLoadExtensions[] = { "htm", "html" };</syntaxhighlight> || unknown || Only allow files and URLs with listed extensions to be loaded via [[htmlLoad]] command. Not listing any extension means everything is allowed. Defining the setting as empty arrays means nothing is allowed. || {{GVI|arma3|1.28}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>allowedHTMLLoadURIs[] = { "http://arma3.com" };</syntaxhighlight> || unknown || Only allow files from listed URIs and URLs to be loaded via [[htmlLoad]] command. Comment out if not used. Can use += to add to the existing list. Not listing any extension means everything is allowed. Defining the setting as empty arrays means nothing is allowed. || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>MaxPing = 200;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>-1</syntaxhighlight> || Max ping value until server kick the user || {{GVI|arma3|1.56}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>MaxPacketLoss = 50;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>-1</syntaxhighlight> || Max packetloss value until server kick the user || {{GVI|arma3|1.56}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>MaxDesync = 150;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>-1</syntaxhighlight> || Max desync value until server kick the user || {{GVI|arma3|1.56}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>DisconnectTimeout = 5;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>15</syntaxhighlight> || Server wait time before disconnecting client after loss of active traffic connection, range 1 to 90 seconds. || {{GVI|arma3|1.56}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>kickClientsOnSlowNetwork[] = { 0, 0, 0, 0 };</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>{ 1, 1, 1, 1 };</syntaxhighlight> || Defines if {{hl|{<MaxPing>, <MaxPacketLoss>, <MaxDesync>, <DisconnectTimeout>}}} will be logged (0) or kicked (1) || {{GVI|arma3|1.56}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>enablePlayerDiag = 1;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>0</syntaxhighlight> || Logs players' bandwidth and desync info every 60 seconds, as well as "network message is pending" owner identity. || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>callExtReportLimit = 1000;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>1000</syntaxhighlight> || If server initiated [[callExtension]] takes longer than specified limit in milliseconds, the warning will be logged into server {{hl|.rpt}} file as well as reflected in the extension return result. || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>kickTimeout[] = { { 0, -1 }, { 1, 180 }, { 2, 180 }, { 3, 180 } };</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>{ { 0, 60 }, { 1, 60 }, { 2, 60 }, { 3, 60 } };</syntaxhighlight> || | ||
< | <syntaxhighlight lang="cpp" inline>kickTimeout[] = { { kickID, timeout }, ... };</syntaxhighlight><br> | ||
kickID (type to determine from where the kick originated e.g. admin or votekick etc.) | kickID (type to determine from where the kick originated e.g. admin or votekick etc.) | ||
* 0 - manual kick (vote kick, admin kick, bruteforce detection etc.) | * 0 - manual kick (vote kick, admin kick, bruteforce detection etc.) | ||
Line 84: | Line 93: | ||
* >0 seconds | * >0 seconds | ||
* -1 until missionEnd | * -1 until missionEnd | ||
* -2 until serverRestart | * -2 until serverRestart | ||
| {{GVI|arma3|1.90}} | | {{GVI|arma3|1.90}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>votingTimeOut = 60;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>60</syntaxhighlight> || Voting timeout || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>votingTimeOut[] = { 60, 90 };</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>{ 60, 90 }</syntaxhighlight> || Voteing timeout {{hl|<nowiki>{ ready, notReady }</nowiki>}} || {{GVI|arma3|1.90}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>roleTimeOut = 90;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>90</syntaxhighlight> || Role selection timout || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>roleTimeOut[] = { 90, 120 };</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>{ 90, 120 }</syntaxhighlight> || Role selection timeout {{hl|<nowiki>{ ready, notReady }</nowiki>}} || {{GVI|arma3|1.90}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>briefingTimeOut = 60;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>60</syntaxhighlight> || Briefing timeout || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>briefingTimeOut[] = { 60, 90 };</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>{ 60, 90 }</syntaxhighlight> || Briefing timeout {{hl|<nowiki>{ ready, notReady }</nowiki>}} || {{GVI|arma3|1.90}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>debriefingTimeOut = 45;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>45</syntaxhighlight> || Debriefing timeout || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>debriefingTimeOut[] = { 45, 60 };</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>{ 45, 60 }</syntaxhighlight> || Debriefing timeout {{hl|<nowiki>{ ready, notReady }</nowiki>}} || {{GVI|arma3|1.90}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>lobbyIdleTimeout = 300;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>0</syntaxhighlight> || Lobby idle timeout | ||
Independent of set ''lobbyIdleTimeout'' in the config file, it will be at least<br> | Independent of set ''lobbyIdleTimeout'' in the config file, it will be at least<br> | ||
{{hl|MAX(votingTimeout, lobbyTimeout, briefingTimeout, debriefingTimeout) + 5 seconds}} | |||
by default, this makes it 300 seconds of time for people in lobby and 95 in roleTimeout or briefing screen<br> | by default, this makes it 300 seconds of time for people in lobby and 95 in roleTimeout or briefing screen<br> | ||
| {{GVI|arma3|1.90}} | | {{GVI|arma3|1.90}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>missionsToServerRestart = 8;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>0</syntaxhighlight> || Number of times missionEnd happens before server initiate process restart (uses actual session startup command-line parameters, not possible to combine with `missionsToShutdown` ) || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>missionsToShutdown = 8;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>0</syntaxhighlight> || Number of times missionEnd happens before server initiate process shutdown (has same behavior as setting named `missionsToHardRestart`) || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>autoSelectMission = true;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>false</syntaxhighlight> || When enabled, the server auto-starts next mission in mission cycle and waits for players in the role selection. This allows full mission information in server browser and then results in proper filtering of the servers. This is lesser-variant (trimmed) of server startup command-line parameter {{hl|-autoInit}}. Might collide with campaign linked missions / need mission cycle etc. || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>randomMissionOrder = true;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>false</syntaxhighlight> || When enabled, the server random start / next selection with one of missions from mission rotation list. ( setting goes outside(before) Mission class {}; ) || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>disableChannels[] = { { 0, false, true } };</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>{}</syntaxhighlight> || | ||
< | <syntaxhighlight lang="cpp" inline>disableChannels[] = { { channelID, text, voice }, ... }>;</syntaxhighlight><br> | ||
* ''ChannelID'' : [[Number]] - use single digit of (0 to 6) to define channelID. Default: No restriction to any channels, with text/von chat set to false.<br> | * ''ChannelID'' : [[Number]] - use single digit of (0 to 6) to define channelID. Default: No restriction to any channels, with text/von chat set to false.<br> | ||
* ''text'' : [[Boolean]] - use [[true]] to disable usage of text-chat for defined channelID. Default: '''[[false]]'''<br> | * ''text'' : [[Boolean]] - use [[true]] to disable usage of text-chat for defined channelID. Default: '''[[false]]'''<br> | ||
* ''voice'' : [[Boolean]] - use [[true]] to disable usage of voice-chat (VON) for defined channelID. Default: '''[[false]]'''<br> | * ''voice'' : [[Boolean]] - use [[true]] to disable usage of voice-chat (VON) for defined channelID. Default: '''[[false]]'''<br> | ||
List of channels ID: | List of channels ID: | ||
{{Columns| | {{Columns|4|2=<nowiki/> | ||
* 0 | * 0 = Global | ||
* 1 | * 1 = Side | ||
* 2 | * 2 = Command | ||
* 3 | * 3 = Group | ||
* 4 | * 4 = Vehicle | ||
* 5 | * 5 = Direct | ||
* 6 | * 6 = System | ||
}} | }} | ||
{{Feature| | {{Feature|informative|Missions which use [[Description.ext#disableChannels|Description.ext#disableChannels]] will override any setting of ''disableChannels[]'' in the '''server.cfg'''.}} | ||
| - | | - | ||
|- | |- | ||
! colspan="4" | Other Options | ! colspan="4" | Other Options | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>verifySignatures = 2;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>2</syntaxhighlight>|| Enables or disables the [[ArmA: Addon Signatures|signature verification]] for addons. | ||
* Verification disabled = | * Verification disabled = {{hl|0}}. | ||
* | *{{hl|1}} Will default back to {{hl|2}} | ||
| - | | - | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>drawingInMap = false;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>true</syntaxhighlight> || Enables or disables the ability to place markers and draw lines in map. || {{GVI|arma3|1.64}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>disableVoN = 1;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>0</syntaxhighlight> || Enables or disables the '''''V'''oice '''o'''ver '''N'''et''. || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>vonCodecQuality = 10;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>3</syntaxhighlight> || Defines ''VoN'' codec quality. Value range is from {{hl|1}} to {{hl|20}}. | ||
* Since 1.62 supports range | * Since 1.62 supports range {{hl|1-20}} | ||
* Since 1.64 will support range | * Since 1.64 will support range {{hl|1-30}} | ||
* 8kHz is | * 8kHz is {{hl|0-10}}, 16kHz is {{hl|11-20}}, for {{hl|21-30}} it is 32kHz for SPEEX codec and 48kHz for OPUS codec. | ||
| - | | - | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>vonCodec = 1;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>1</syntaxhighlight> || Defines ''VoN'' codec type. Value range is from {{hl|0}} to {{hl|1}}. | ||
* Since | * Since {{arma3}} update 1.58 supports value {{hl|1}}<!-- huh? --> | ||
* Value | * Value {{hl|0}} uses older {{Link|https://en.wikipedia.org/wiki/Speex|SPEEX codec}}, while {{hl|1}} switches to new IETF standard {{Link|https://en.wikipedia.org/wiki/Opus_(audio_format)|OPUS codec}}. | ||
| - | | - | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>skipLobby = false;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>false</syntaxhighlight> || If true, joining player will skip role selection. This is only used if no Mission, Campaign or Config setting {{hl|skipLobby}} is defined (See [[Description.ext#skipLobby]]). || {{n/a}} | ||
|- | |||
| <syntaxhighlight lang="cpp" inline>allowProfileGlasses = false;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>true</syntaxhighlight> || If false, glasses set in player profile will be ignored. This is only used if no Mission, Campaign or Config setting {{hl|allowProfileGlasses}} is defined (See {{Link|Description.ext#allowProfileGlasses}}) | |||
| {{GVI|arma3|2.06}} | |||
|- | |||
| <syntaxhighlight lang="cpp" inline>zeusCompositionScriptLevel = 0;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>1</syntaxhighlight> || | |||
* 0: all scripts are forbidden | |||
* 1: only attributes are allowed (including custom attributes added by mods) | |||
* 2: all scripts are allowed including init scripts | |||
This is only used if no Mission, Campaign or Config setting {{hl|zeusCompositionScriptLevel}} is defined (See {{Link|Description.ext#zeusCompositionScriptLevel}}).<br> | |||
| {{GVI|arma3|2.06}} | |||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>logFile = "server_console.log";</syntaxhighlight> || unknown || Enables output of dedicated server console into ''textfile''. Default location of log is same as ''crash dumps'' and other logs. (Local settings) Note that this does not change the location of the "''net.log''" file, which is enabled with the {{hl|-netlog}} command line option. || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>doubleIdDetected = "command";</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>""</syntaxhighlight> || rowspan="8" align="center" | See [[Arma 3: Server Side Scripting|Server Side Scripting]] | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>onUserConnected = "command";</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>""</syntaxhighlight> || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>onUserDisconnected = "command";</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>""</syntaxhighlight> || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>onHackedData = "command";</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>""</syntaxhighlight> || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>onDifferentData = "command";</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>""</syntaxhighlight> || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>onUnsignedData = "command";</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>""</syntaxhighlight> || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>onUserKicked = "command";</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>""</syntaxhighlight> || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>regularCheck = "command";</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>""</syntaxhighlight> || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>BattlEye = 1;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>1</syntaxhighlight> || Enables or disables the [[BattlEye]] anti-cheat engine. Requires installed [[BattlEye]] on server and clients joining the server || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>timeStampFormat = "none";</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>""</syntaxhighlight> || Set the timestamp format used on each report line in server-side [[Crash Files|RPT file]]. Possible values are "none", "short", "full". || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>forceRotorLibSimulation = 0;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>0</syntaxhighlight> || Enforces the Advanced Flight Model on the server. {{hl|0}} (up to the player). {{hl|1}} - forced AFM, {{hl|2}} - forced SFM. || {{GVI|arma3|1.34}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>persistent = 1;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>0</syntaxhighlight> || Mission keeps running when all clients disconnect. Enabling the persistence option will make missions that have either ''base'' or ''instant'' respawn keep on running after all players have disconnected. The other respawn types will not make a mission persistent. The kind of respawn a certain mission uses is set in its [[Description.ext]]. || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>requiredBuild = xxxxx;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>0</syntaxhighlight> || Minimum required client version. Clients with version lower than {{hl|requiredBuild}} will not be able to connect. If {{hl|requiredBuild}} is set to a large number, like <syntaxhighlight lang="cpp" inline>requiredBuild = 999999999;</syntaxhighlight> for example, it will automatically be lowered to the current server version. || {{n/a}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>statisticsEnabled = 1;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>1</syntaxhighlight> || Allows to opt-out of [[Arma 3: Analytics|Arma 3 analytics]] for the server by using 0 || {{GVI|arma3|1.56}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>forcedDifficulty = "regular";</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>""</syntaxhighlight> || Enforces the selected difficulty on the server. {{hl|c= '''forcedDifficulty''' = "<difficultyClass>";}} | ||
* If Recruit, Regular or Veteran is passed as the parameter, the particular difficulty options will be taken from data config, from the class CfgDifficultyPresets. | * If Recruit, Regular or Veteran is passed as the parameter, the particular difficulty options will be taken from data config, from the class CfgDifficultyPresets. | ||
* If Custom will be passed as the parameter, the particular flags will be taken from CustomDifficulty class from server's profile (only Custom is saved to the profile). | * If Custom will be passed as the parameter, the particular flags will be taken from CustomDifficulty class from server's profile (only Custom is saved to the profile). | ||
* If mission cycle is defined in the | * If mission cycle is defined in the '''server.cfg''', the difficulty set in the mission cycle overrides the difficulty set by '''forcedDifficulty''' parameter. | ||
| {{GVI|arma3|1.56}} | | {{GVI|arma3|1.56}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>missionWhitelist[] = { "intro.altis" };</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>{}</syntaxhighlight> || Limit the available missions for the admin for the mission change. See [[Arma 3: MP Mission Names]] for a full list. || {{GVI|arma3|1.56}} | ||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>steamProtocolMaxDataSize = 1024;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>1024</syntaxhighlight> || Limit for maximum Steam Query packet length. Increasing this value is dangerous as it can cause {{arma3}} server to send UDP packets of a size larger than the MTU. This will cause UDP packets to be fragmented which is not supported by some older routers. But increasing this will fix the modlist length limit in [[Arma 3: Launcher]]. || {{GVI|arma3|2.00}} | ||
|- | |- | ||
| | | | ||
Line 203: | Line 222: | ||
class AdvancedOptions | class AdvancedOptions | ||
{ | { | ||
LogObjectNotFound = true; // logging enabled | |||
SkipDescriptionParsing = false; // parse description.ext | |||
ignoreMissionLoadErrors = false; // do not ingore errors | |||
queueSizeLogG = 1000000; // if a specific players message queue | |||
// is larger than 1MB and #monitor is running, | |||
// dump his messages to a logfile for analysis | |||
}; | }; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| | | {{n/a}} | ||
| | | | ||
{{GVI|arma3|2.02}} | {{GVI|arma3|2.02}} | ||
* LogObjectNotFound - [[false | * LogObjectNotFound - [[false]] to skip logging "Server: Object not found" messages | ||
* SkipDescriptionParsing - [[true | * SkipDescriptionParsing - [[true]] to skip parsing of description.ext/mission.sqm. Will show pbo filename instead of configured missionName. OverviewText and such won't work, but loading the mission list is a lot faster when there are many missions | ||
{{GVI|arma3|2.04}} | {{GVI|arma3|2.04}} | ||
* ignoreMissionLoadErrors - | * ignoreMissionLoadErrors - when set to [[true]], the mission will load no matter the amount of loading errors. If set to [[false]], the server will abort mission's loading and return to mission selection | ||
| {{GVI|arma3|2.02}}{{GVI|arma3|2.04}} | {{GVI|arma3|2.08}} | ||
* queueSizeLogG - if {{hl|#monitor}} is running and a player's Guaranteed Message Queue size (Listed as G: in {{hl|#monitor}}) goes above the threshold, all that player's message types and sizes are dumped to a logfile in the RPT directory (see [[Crash Files]]); the dumping itself is logged server-side. | |||
| {{GVI|arma3|2.02}}{{GVI|arma3|2.04}}{{GVI|arma3|2.08}} | |||
|- | |- | ||
| < | | <syntaxhighlight lang="cpp" inline>armaUnitsTimeout = 30;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>30</syntaxhighlight> || Defines how long the player will be stuck connecting and wait for {{Link|https://units.arma3.com/|armaUnits data}}. Player will be notified if timeout elapsed and no units data was received | ||
| {{GVI|arma3|2.06}} | |||
|- | |- | ||
| <syntaxhighlight lang="cpp" inline>overrideHazeQuality = 1;</syntaxhighlight> || <syntaxhighlight lang="cpp" inline>-1</syntaxhighlight> || 0/1/2 - VeryLow/Low/Standard - Forces haze quality in MP on all clients. Standard (2) - mod config driven. Default (-1) - do not force. Mission config's {{Link|Description.ext#overrideHazeQuality|overrideHazeQuality}} has priority over the server option. || {{GVI|arma3|2.16}} | |||
|- | |||
| <syntaxhighlight lang="cpp"> | |||
class AntiFlood | |||
{ | |||
cycleTime = 0.5; | |||
cycleLimit = 400; | |||
cycleHardLimit = 4000; | |||
enableKick = 0; | |||
}; | |||
</syntaxhighlight> | |||
| <syntaxhighlight lang="cpp" style="display: inline-block; text-align: left"> | |||
cycleTime = 0.5; | |||
cycleLimit = 400; | |||
cycleHardLimit = 4000; | |||
enableKick = 0; | |||
</syntaxhighlight> | |||
| | |||
<syntaxhighlight lang="cpp" inline>cycle</syntaxhighlight> is time in seconds. | |||
Every cycle, if player sends more than "limit" number of messages, they get flagged. | |||
If the last 4 out of 8 cycles were flagged or if within one cycle the hard limit is exceeded, | |||
the player is kicked (if <syntaxhighlight lang="cpp" inline>enableKick</syntaxhighlight> is set to true) or logged to RPT that they exceeded the limit. | |||
| {{GVI|arma3|2.18}} | |||
|} | |} | ||
== Voted In Admin == | == Server Administration == | ||
If BattlEye RCon is not in use, there can only be 1 server admin at any given time. There are two ways of becoming admin, through a vote or through login with authenticated credentials. | |||
=== Voted In Admin === | |||
It is possible to become a server administrator through player voting process. Such admin has less abilities than logged in admin.<br> | It is possible to become a server administrator through player voting process. Such admin has less abilities than logged in admin.<br> | ||
For example, voted in admin would be able to kick a player, but only logged in admin would be able to ban a player.<br> | For example, voted in admin would be able to kick a player, but only logged in admin would be able to ban a player.<br> | ||
For more information on voting and voting configuration see page [[Arma_3:_Mission_voting|'''Server Voting''']]. | For more information on voting and voting configuration see page [[Arma_3:_Mission_voting|'''Server Voting''']]. | ||
== Logged In Admin == | === Logged In Admin === | ||
To log in as admin, one is required to type in | |||
Since | To log in as admin, one is required to type in{{hl|#login}} command followed by server password, which matches password defined in '''passwordAdmin''' param.<br> | ||
Since {{Name|arma2oa|short}} it is possible to add one or several user ids [[getPlayerUID|UIDs]] into '''admins[]''' server config parameter, which would allow listed users to log in as admin by simply typing {{hl|#login}} without a password.<br> | |||
This presents several advantages for managing the servers. The server owner can have multiple admins selected from the community and doesn't have to provide each one with server admin password.<br> | This presents several advantages for managing the servers. The server owner can have multiple admins selected from the community and doesn't have to provide each one with server admin password.<br> | ||
The adding and removing of UIDs is done on the server side which makes it easy to add and to remove admins if necessary. On the server, admins are handled on first come first served basis.<br> | The adding and removing of UIDs is done on the server side which makes it easy to add and to remove admins if necessary. On the server, admins are handled on first come first served basis.<br> | ||
Line 241: | Line 294: | ||
The logged in and voted in admins have different set of '''[[Multiplayer Server Commands]]''' available to them. See '''[[serverCommandAvailable]]''' for more information. | The logged in and voted in admins have different set of '''[[Multiplayer Server Commands]]''' available to them. See '''[[serverCommandAvailable]]''' for more information. | ||
= Server Security = | |||
== Server Security == | |||
Several of these settings directly contribute to the security of the server and have been highlighted as important, particularly for running public - no password - servers. | Several of these settings directly contribute to the security of the server and have been highlighted as important, particularly for running public - no password - servers. | ||
;The most updated ones that give a good protection (and are, ''de facto'', the standard for public servers) are: | ; The most updated ones that give a good protection (and are, ''de facto'', the standard for public servers) are: | ||
<syntaxhighlight lang=cpp> | <syntaxhighlight lang="cpp"> | ||
battlEye = 1; | battlEye = 1; | ||
verifySignatures = 2; | verifySignatures = 2; | ||
allowedFilePatching = 0; | allowedFilePatching = 0; | ||
allowedLoadFileExtensions[] = {"hpp","sqs","sqf","fsm","cpp","paa","txt","xml","inc","ext","sqm","ods","fxy","lip","csv","kb","bik","bikb","html","htm","biedi"}; | allowedLoadFileExtensions[] = { "hpp", "sqs", "sqf", "fsm", "cpp", "paa", "txt", "xml", "inc", "ext", "sqm", "ods", "fxy", "lip", "csv", "kb", "bik", "bikb", "html", "htm", "biedi" }; | ||
allowedPreprocessFileExtensions[] = {"hpp","sqs","sqf","fsm","cpp","paa","txt","xml","inc","ext","sqm","ods","fxy","lip","csv","kb","bik","bikb","html","htm","biedi"}; | allowedPreprocessFileExtensions[] = { "hpp", "sqs", "sqf", "fsm", "cpp", "paa", "txt", "xml", "inc", "ext", "sqm", "ods", "fxy", "lip", "csv", "kb", "bik", "bikb", "html", "htm", "biedi" }; // ,"sqfc" // add .sqfc if used | ||
allowedHTMLLoadExtensions[] = {"htm","html","xml","txt"}; | allowedHTMLLoadExtensions[] = { "htm", "html", "xml", "txt" }; | ||
//allowedHTMLLoadURIs[] = {}; | // allowedHTMLLoadURIs[] = {}; | ||
passwordAdmin = "xyzxyz123"; | passwordAdmin = "xyzxyz123"; | ||
serverCommandPassword = "xyzxyz456"; | serverCommandPassword = "xyzxyz456"; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== Notes == | === Notes === | ||
The properties allowedLoad*/allowedPreprocess*/allowedHTML* are server.cfg settings with array list of extensions for server-side use only. The above listed examples are for basic game multiplayer modes. Server admins may attempt to make it stricter for their servers. However, if too strict then server's log file will contain warning entries about unable read. | The properties allowedLoad*/allowedPreprocess*/allowedHTML* are server.cfg settings with array list of extensions for server-side use only. The above listed examples are for basic game multiplayer modes. Server admins may attempt to make it stricter for their servers. However, if too strict then server's log file will contain warning entries about unable read. | ||
: With the exception of allowedHTMLLoadURIs those arrays covers both files inside and outside PBOs so don't change the above defaults w/o testing first as there | : With the exception of allowedHTMLLoadURIs those arrays covers both files inside and outside PBOs so don't change the above defaults w/o testing first as there is a chance it will break the game. | ||
* To read [[loadFile]] , [[preprocessFile]] , [[preprocessFileLineNumbers]] and to remember, those works on files only-within {{arma3}} server directory and its sub-directories! | * To read [[loadFile]] , [[preprocessFile]] , [[preprocessFileLineNumbers]] and to remember, those works on files only-within {{arma3}} server directory and its sub-directories! | ||
* Refer to [[ArmA: Addon Signatures]] for current best practices in server mod signing and the use of key signature files. | * Refer to [[ArmA: Addon Signatures]] for current best practices in server mod signing and the use of key signature files. | ||
* To further increase security | * To further increase servers security, remember that [[BattlEye]] has the ability to use server-side (including preventing remote execution) and client-side script check filters. | ||
** These BattlEye filters needs to be written specifically for each mission and mod as the scripting differs in each of them. | ** These BattlEye filters needs to be written specifically for each mission and mod as the scripting differs in each of them. | ||
== Safe Folder Structure == | === Safe Folder Structure === | ||
Engine supports absolute outside | |||
Engine supports absolute outside {{arma3}} server folder for command-line parameters {{hl|c= -servermod=, -mod=}} and same for profile directories and config locations. | |||
This puts those out of reach by various load script command features which are limited only within {{arma3}} folder and it is sub-directories for security reason. | This puts those out of reach by various load script command features which are limited only within {{arma3}} folder and it is sub-directories for security reason. | ||
thus e.g. safe folder-structure looks like: | thus e.g. safe folder-structure looks like: | ||
* | * {{hl|\arma3server\}} | ||
* | * {{hl|\arma3server\@publicmods\}} | ||
* | * {{hl|\arma3server_servermods_secrethash\}} | ||
* | * {{hl|\arma3server_profiles_and_configs_secrethash\}} | ||
Note that [[callExtension]]s are loaded only from {{arma3}} server root / sub-folders | Note that [[callExtension]]s are loaded only from {{arma3}} server root / sub-folders | ||
= Example Configuration File = | |||
<spoiler><syntaxhighlight lang="cpp"> | == Example Configuration File == | ||
<spoiler> | |||
<syntaxhighlight lang="cpp"> | |||
// server.cfg | // server.cfg | ||
Line 284: | Line 344: | ||
hostname = "Fun and Test Server"; // The name of the server that shall be displayed in the public server list | hostname = "Fun and Test Server"; // The name of the server that shall be displayed in the public server list | ||
password = ""; // Password for joining, eg connecting to the server | password = ""; // Password for joining, eg connecting to the server | ||
passwordAdmin = "xyz"; // Password to become server admin. When | passwordAdmin = "xyz"; // Password to become server admin. When in Arma MP and connected to the server, type '#login xyz' | ||
serverCommandPassword = "xyzxyz"; // Password required by alternate syntax of [[serverCommand]] server-side scripting. | serverCommandPassword = "xyzxyz"; // Password required by alternate syntax of [[serverCommand]] server-side scripting. | ||
logFile = "server_console.log"; // Where the logfile should go and what it should be called | logFile = "server_console.log"; // Where the logfile should go and what it should be called | ||
// WELCOME MESSAGE (" | // WELCOME MESSAGE ("Message Of The Day") | ||
// It can be several lines, separated by comma | // It can be several lines, separated by comma | ||
// Empty messages "" will not be displayed at all but are only for increasing the interval | // Empty messages "" will not be displayed at all but are only for increasing the interval | ||
motd[] = { | motd[] = | ||
{ | |||
"", "", | "", "", | ||
"Two empty lines above | "Two empty lines above to increase the time interval", | ||
"Welcome to our server", | "Welcome to our server", | ||
"", "", | "", "", | ||
"We are looking for fun - Join us Now !", | "We are looking for fun - Join us Now!", | ||
"http://www.example.com", | "http://www.example.com", | ||
"One more empty line below | "One more empty line below to increase interval", | ||
"" | "" | ||
}; | }; | ||
motdInterval = 5; // Time interval (in seconds) between each message | motdInterval = 5; // Time interval (in seconds) between each message | ||
// JOINING RULES | // JOINING RULES | ||
Line 311: | Line 371: | ||
equalModRequired = 0; // Outdated. If set to 1, player has to use exactly the same -mod= startup parameter as the server. | equalModRequired = 0; // Outdated. If set to 1, player has to use exactly the same -mod= startup parameter as the server. | ||
allowedFilePatching = 0; // Allow or prevent client using -filePatching to join the server. 0, is disallow, 1 is allow HC, 2 is allow all clients (since Arma 3 v1.50) | allowedFilePatching = 0; // Allow or prevent client using -filePatching to join the server. 0, is disallow, 1 is allow HC, 2 is allow all clients (since Arma 3 v1.50) | ||
filePatchingExceptions[] = {"123456789","987654321"}; // Whitelisted Steam IDs allowed to join with -filePatching enabled | filePatchingExceptions[] = { "123456789", "987654321" }; // Whitelisted Steam IDs allowed to join with -filePatching enabled | ||
//requiredBuild = 12345; // Require clients joining to have at least build 12345 of game, preventing obsolete clients to connect | // requiredBuild = 12345; // Require clients joining to have at least build 12345 of game, preventing obsolete clients to connect | ||
// VOTING | // VOTING | ||
voteMissionPlayers = 1; // Tells the server how many people must connect so that it displays the mission selection screen. | voteMissionPlayers = 1; // Tells the server how many people must connect so that it displays the mission selection screen. | ||
voteThreshold = 0.33; // 33% or more players need to vote for something, for example an admin or a new map, to become effective | voteThreshold = 0.33; // 33% or more players need to vote for something, for example an admin or a new map, to become effective | ||
// INGAME SETTINGS | // INGAME SETTINGS | ||
disableVoN = 0; // If set to 1, Voice over Net will not be available | disableVoN = 0; // If set to 1, Voice over Net will not be available | ||
vonCodec = 1; // If set to 1 then it uses IETF standard OPUS codec, if to 0 then it uses SPEEX codec (since Arma 3 | vonCodec = 1; // If set to 1 then it uses IETF standard OPUS codec, if to 0 then it uses SPEEX codec (since Arma 3 v1.58) | ||
vonCodecQuality = 30; // | vonCodecQuality = 30; // 0..10 = 8kHz, 11..20 = 16kHz, 21..30 = 32kHz (48kHz) | ||
persistent = 1; // If 1, missions still run on even after the last player disconnected. | persistent = 1; // If 1, missions still run on even after the last player disconnected. | ||
timeStampFormat = "short"; // Set the timestamp format used on each report line in server-side RPT file. Possible values are "none" (default),"short","full". | timeStampFormat = "short"; // Set the timestamp format used on each report line in server-side RPT file. Possible values are "none" (default), "short", "full". | ||
BattlEye = 1; // Server to use BattlEye system | BattlEye = 1; // Server to use BattlEye system | ||
allowedLoadFileExtensions[] = {"hpp","sqs","sqf","fsm","cpp","paa","txt","xml","inc","ext","sqm","ods","fxy","lip","csv","kb","bik","bikb","html","htm","biedi"}; //only allow files with those extensions to be loaded via loadFile command (since Arma 3 build 1.19.124216) | allowedLoadFileExtensions[] = { "hpp", "sqs", "sqf", "fsm", "cpp", "paa", "txt", "xml", "inc", "ext", "sqm", "ods", "fxy", "lip", "csv", "kb", "bik", "bikb", "html", "htm", "biedi" }; // only allow files with those extensions to be loaded via loadFile command (since Arma 3 build 1.19.124216) | ||
allowedPreprocessFileExtensions[] = {"hpp","sqs","sqf","fsm","cpp","paa","txt","xml","inc","ext","sqm","ods","fxy","lip","csv","kb","bik","bikb","html","htm","biedi"}; //only allow files with those extensions to be loaded via preprocessFile/preprocessFileLineNumber commands (since Arma 3 build 1.19.124323) | allowedPreprocessFileExtensions[] = { "hpp", "sqs", "sqf", "fsm", "cpp", "paa", "txt", "xml", "inc", "ext", "sqm", "ods", "fxy", "lip", "csv", "kb", "bik", "bikb", "html", "htm", "biedi" }; // only allow files with those extensions to be loaded via preprocessFile/preprocessFileLineNumber commands (since Arma 3 build 1.19.124323) | ||
allowedHTMLLoadExtensions[] = {"htm","html","xml","txt"}; //only allow files with those extensions to be loaded via HTMLLoad command (since Arma 3 build 1.27.126715) | allowedHTMLLoadExtensions[] = { "htm", "html", "xml", "txt" }; // only allow files with those extensions to be loaded via HTMLLoad command (since Arma 3 build 1.27.126715) | ||
//allowedHTMLLoadURIs[] = {}; // Leave commented to let missions/campaigns/addons decide what URIs are supported. Uncomment to define server-level restrictions for URIs | // allowedHTMLLoadURIs[] = {}; // Leave commented to let missions/campaigns/addons decide what URIs are supported. Uncomment to define server-level restrictions for URIs | ||
// TIMEOUTS | // TIMEOUTS | ||
Line 336: | Line 394: | ||
maxDesync = 150; // Max desync value until server kick the user | maxDesync = 150; // Max desync value until server kick the user | ||
maxPing= 200; // Max ping value until server kick the user | maxPing= 200; // Max ping value until server kick the user | ||
maxPacketLoss= 50; // Max packetloss value until server kick the user | maxPacketLoss = 50; // Max packetloss value until server kick the user | ||
kickClientsOnSlowNetwork[] = { 0, 0, 0, 0 }; // Defines if {<MaxPing>, <MaxPacketLoss>, <MaxDesync>, <DisconnectTimeout>} will be logged (0) or kicked (1) | kickClientsOnSlowNetwork[] = { 0, 0, 0, 0 }; // Defines if {<MaxPing>, <MaxPacketLoss>, <MaxDesync>, <DisconnectTimeout>} will be logged (0) or kicked (1) | ||
kickTimeout[] = { {0, -1}, {1, 180}, {2, 180}, {3, 180} }; | kickTimeout[] = { { 0, -1 }, { 1, 180 }, { 2, 180 }, { 3, 180 } }; | ||
votingTimeOut[] = {60, 90}; // Kicks users from server if they spend too much time in mission voting | votingTimeOut[] = { 60, 90 }; // Kicks users from server if they spend too much time in mission voting | ||
roleTimeOut[] = {90, 120}; // Kicks users from server if they spend too much time in role selection | roleTimeOut[] = { 90, 120 }; // Kicks users from server if they spend too much time in role selection | ||
briefingTimeOut[] = {60, 90}; // Kicks users from server if they spend too much time in briefing (map) screen | briefingTimeOut[] = { 60, 90 }; // Kicks users from server if they spend too much time in briefing (map) screen | ||
debriefingTimeOut[] = {45, 60}; // Kicks users from server if they spend too much time in debriefing screen | debriefingTimeOut[] = { 45, 60 }; // Kicks users from server if they spend too much time in debriefing screen | ||
lobbyIdleTimeout = 300; | lobbyIdleTimeout = 300; // The amount of time the server will wait before force-starting a mission without a logged-in Admin. | ||
// SCRIPTING ISSUES | // SCRIPTING ISSUES | ||
Line 355: | Line 412: | ||
onHackedData = "kick (_this select 0)"; // tampering of the signature detected | onHackedData = "kick (_this select 0)"; // tampering of the signature detected | ||
onDifferentData = ""; // data with a valid signature, but different version than the one present on server detected | onDifferentData = ""; // data with a valid signature, but different version than the one present on server detected | ||
// MISSIONS CYCLE (see below) | // MISSIONS CYCLE (see below) | ||
Line 363: | Line 419: | ||
class Missions {}; // An empty Missions class means there will be no mission rotation | class Missions {}; // An empty Missions class means there will be no mission rotation | ||
missionWhitelist[] = {}; // An empty whitelist means there is no restriction on what missions' available</syntaxhighlight></spoiler> | missionWhitelist[] = {}; // An empty whitelist means there is no restriction on what missions' available | ||
</syntaxhighlight> | |||
</spoiler> | |||
= Mission | == Mission Rotation == | ||
One can set an automatic mission rotation. Without an admin, the server will automatically select a mission when at least one player is connected.<br> | |||
Once the mission is done and if there are still players on the server, it will automatically switch to the next mission in the cycle. | |||
General definition: | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
class Missions | class Missions | ||
{ | { | ||
class | class CUSTOMNAME | ||
{ | { | ||
template = MP_Marksmen_01.Altis; | template = "MISSION.TERRAIN"; | ||
difficulty = " | difficulty = "DIFFICULTYLEVEL"; | ||
class Params {}; | class Params | ||
{ | |||
MISSIONPARAMETER1 = VALUE; | |||
MISSIONPARAMETER2 = VALUE; | |||
MISSIONPARAMETER3 = VALUE; | |||
}; | |||
}; | |||
}; | |||
</syntaxhighlight> | |||
{{Feature|warning|The keyword {{hl|class}} for class definitions '''must''' be lowercase, otherwise a parsing error will occur.}} | |||
=== Parameters === | |||
The template and difficulty must be defined. Parameter definition is optional. | |||
==== Template ==== | |||
The entry naming is always '''missionName.terrainName'''. | |||
The name can come from the different options: | |||
# '''Mission PBO''' in MPMissions folder - like '''MyMission.MyTerrain.pbo''' | |||
# '''Mission folder''' in MPMissions folder - like '''MyMission.MyTerrain\mission.sqm''' | |||
# '''Addon Mission''' loaded via some mod (folder) - in such case it must be defined via a config.cpp in [[CfgMissions|class CfgMissions/class MPMissions]]. You determine the naming with the [[Arma_3:_Splendid_Config_Viewer|config viewer]]. | |||
{{Feature|warning| | |||
The crucial part in the case of '''Addon Mission''' is that its '''className.terrainName''' - NOT the mission folder name! Good practice is to name the class the same as the folder, but it is not always the case. | |||
So watch out and use only the class name + terrain name. | |||
}} | |||
Sample definition from CfgMissions/MPMissions relevant for '''Addon Mission': | |||
<syntaxhighlight lang="cpp"> | |||
class CfgMissions | |||
{ | |||
class MPMissions | |||
{ | |||
class MP_Marksmen_01 | |||
{ | |||
briefingName = "End Game 16 Kavala"; | |||
directory = "A3\Missions_F_MP_Mark\MPScenarios\MP_Marksmen_01.Altis"; | |||
}; | |||
class EscapeFromMalden//class name not the same as mission folder name! | |||
{ | |||
briefingName = "Escape 10 Malden"; | |||
directory = "A3\Missions_F_Patrol\MPScenarios\MP_EscapeFromMalden.Malden"; | |||
}; | |||
class MP_CombatPatrol_01 | |||
{ | |||
briefingName = "COOP 12 Combat Patrol"; | |||
directory = "A3\Missions_F_Patrol\mpscenarios\MP_CombatPatrol_01.Altis"; | |||
}; | |||
class Apex | |||
{ | |||
briefingName = "Apex Protocol"; | |||
class EXP_m01 | |||
{ | |||
briefingName = "01 Keystone"; | |||
directory = "a3\missions_f_exp\campaign\missions\exp_m01.tanoa"; | |||
}; | |||
}; | |||
}; | |||
</syntaxhighlight> | |||
==== Difficulty ==== | |||
Set the desired enforced difficulty level. | |||
The standard options are: | |||
* Recruit | |||
* Regular | |||
* Veteran | |||
* Custom | |||
For more see: [[Arma_3:_Difficulty_Settings#Configuration|Difficulty Settings]] | |||
{{Feature|informative| | |||
* Some mods or CDLCs define additional difficulty levels. You determine the naming with the [[Arma_3:_Splendid_Config_Viewer|config viewer]] in '''CfgDifficultyPresets'''. | |||
* When difficulty is set to <syntaxhighlight lang="cpp" inline>difficulty = "Custom";</syntaxhighlight> the server will look into {{hl|USERNAME.Arma3Profile}} file for the definition of custom difficulty, which should look like this: see {{Link|server.armaprofile#Server Difficulty Example}}. | |||
}} | |||
==== class Params ==== | |||
A mission may offer [[Mission_Parameters|mission parameters]]. You can apply a different default for the given mission in your mission rotation by setting the key-value pair in here.<br> | |||
To determine if/what mission parameters are available, you need to exact the mission pbo to get to the [[Description.ext]].<br> | |||
The actual definition may also be found in another files if <syntaxhighlight lang="cpp" inline>#include "PATH\FILE.extension"</syntaxhighlight> is used. | |||
<syntaxhighlight lang="cpp"> | |||
class Missions | |||
{ | |||
class TestMission01 // name for the first entry - can be anything (characters/numbers/underscore, but no spaces!) | |||
{ | |||
template = "MP_Marksmen_01.Altis"; | |||
difficulty = "recruit"; | |||
class Params | |||
{ | |||
RespawnDelay = 15; // default 30 | |||
EndGameRespawnDelay = 30; // default 45 | |||
}; | |||
}; | }; | ||
class TestMission02 | class TestMission02 | ||
{ | { | ||
template = | template = "EscapeFromMalden.Malden"; | ||
difficulty = " | difficulty = "regular"; | ||
class Params {}; | class Params | ||
{ | |||
Loadouts = 0; // default 1 | |||
EnemyEquipment = 0; // default 1 | |||
}; | |||
}; | }; | ||
class TestMission03 | class TestMission03 | ||
{ | { | ||
template = | template = "MP_CombatPatrol_01.Altis"; | ||
difficulty = "veteran"; | difficulty = "veteran"; | ||
class Params {}; | class Params | ||
{ | |||
BIS_CP_reinforcements = 2; // default 0 | |||
BIS_CP_tickets = 5; // default 20 | |||
}; | |||
}; | }; | ||
class TestMission04 | class TestMission04 | ||
{ | { | ||
template = | template = "EXP_m01.Tanoa"; // Apex Protocol - COOP campaign | ||
difficulty = " | difficulty = "custom"; | ||
class Params {}; | class Params | ||
{ | |||
}; | |||
}; | }; | ||
}; | }; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{Feature|informative| | |||
Execute the {{Link|Biki Export Scripts#Mission Parameters|Mission Parameters export script}} from the {{Link|Arma 3: Debug Console|Debug Console}} to export the current mission's parameters set in order to use it in the mission rotation class. | |||
}} | |||
=== {{Name|arma3apex}} - Mission Collection === | |||
Mainly intended for MP campaigns. If the progress is defined in the MPMissions class, server administrator can simply add the whole campaign by adding ''campaign class'' into the ''server.cfg''. See the example below. | Mainly intended for MP campaigns. If the progress is defined in the MPMissions class, server administrator can simply add the whole campaign by adding ''campaign class'' into the ''server.cfg''. See the example below. | ||
Line 411: | Line 586: | ||
class Apex | class Apex | ||
{ | { | ||
briefingName = $STR_A3_CoopCampaignName; | briefingName = "$STR_A3_CoopCampaignName"; | ||
class EXP_m01 | class EXP_m01 | ||
{ | { | ||
briefingName = $STR_A3_exp_m01_missionname; | briefingName = "$STR_A3_exp_m01_missionname"; | ||
directory = "a3\missions_f_exp\campaign\missions\exp_m01.tanoa"; | directory = "a3\missions_f_exp\campaign\missions\exp_m01.tanoa"; | ||
}; | }; | ||
Line 421: | Line 596: | ||
class EXP_m02 | class EXP_m02 | ||
{ | { | ||
briefingName = $STR_A3_exp_m02_missionname; | briefingName = "$STR_A3_exp_m02_missionname"; | ||
directory = "a3\missions_f_exp\campaign\missions\exp_m02.tanoa"; | directory = "a3\missions_f_exp\campaign\missions\exp_m02.tanoa"; | ||
}; | }; | ||
Line 427: | Line 602: | ||
class EXP_m03 | class EXP_m03 | ||
{ | { | ||
briefingName = $STR_A3_exp_m03_missionname; | briefingName = "$STR_A3_exp_m03_missionname"; | ||
directory = "a3\missions_f_exp\campaign\missions\exp_m03.tanoa"; | directory = "a3\missions_f_exp\campaign\missions\exp_m03.tanoa"; | ||
}; | }; | ||
Line 459: | Line 634: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
= Additional | === Important Settings === | ||
In the '''Server Config File''' | |||
* autoSelectMission | |||
* randomMissionOrder | |||
* persistent | |||
* missionsToServerRestart and missionsToShutdown | |||
* votingTimeOut, roleTimeOut, briefingTimeOut and debriefingTimeOut | |||
And from [[Arma 3: Startup Parameters|Startup Parameters]]: | |||
* loadMissionToMemory | |||
* autoInit | |||
== Additional Details == | |||
For hosting server behind NAT or firewall, please ensure gameport and STEAMports are forwarded and open!<br> | For hosting server behind NAT or firewall, please ensure gameport and STEAMports are forwarded and open!<br> | ||
Set the ICMP "echo reply" as allowed so the server is able return ping delay properly.<br> | Set the ICMP "echo reply" as allowed so the server is able return ping delay properly.<br> | ||
It's recommended to enable the NAT traversal (so called "Edge traversal" in Windows Firewall) for '''arma3server.exe''', '''arma3.exe''' to better support clients/servers behind NAT. | It's recommended to enable the NAT traversal (so called "Edge traversal" in Windows Firewall) for '''arma3server.exe''', '''arma3.exe''' to better support clients/servers behind NAT. | ||
= | |||
On dedicated server | == Mission Parameters Override == | ||
On dedicated server, only an admin can set mission options provided by mission maker via class Params. However as a server owner it is possible to override default setting with your own. See [[Mission Parameters]] for more info. | |||
{{GameCategory|arma3|Multiplayer}} | {{GameCategory|arma3|Multiplayer}} |
Latest revision as of 00:33, 20 October 2024
Arma 3 Server Configuration Overview | ||||
---|---|---|---|---|
Setup | Arma 3: Dedicated Server | |||
Files | Arma 3: Server Config File ● Arma 3: Basic Server Config File ● Arma 3: Server Profile | |||
Other | Multiplayer Server Commands ● Arma 3: Mission voting ● Arma 3: Headless Client ● BattlEye |
This article deals with the server.cfg, a configuration file which one can use to configure various game server settings such as the difficulty level, how many votes are needed, and welcome messages.
The name server.cfg means nothing, and this file can be called anything. The real name is determined by the -config command line option when launching the dedicated server. There is no default name: when no filename is specified, no server configuration file is loaded.
Server Options
Parameter | Default | Description | Since |
---|---|---|---|
passwordAdmin = "xyzxyz"; |
"" |
Password to protect admin access. | N/A |
password = "xyz"; |
"" |
Password required to connect to server. | N/A |
serverCommandPassword = "xyzxyz"; |
"" |
Password required by alternate syntax of serverCommand server-side scripting (Case-Sensitive). | N/A |
hostname = "My Server"; |
unknown | Servername visible in the game browser. | N/A |
maxPlayers = 10; |
64 (DS) |
The maximum number of players that can connect to server. The final number will be lesser between number given here and number of mission slots. | N/A |
motd[] = { "Welcome to my server.", "Hosted in the net." }; |
{} |
Two lines welcome message. Comma is the 'new line' separator. | N/A |
admins[] = { "<UID>" }; |
{} |
Whitelisted clients can use #login without password. See Logged In Admin. | 1.70 |
headlessClients[] = { "<IP>" }; |
{} |
Headless Client IPs. Multiple connections and addresses are allowed in case of multiple Headless Clients. See Arma 3: Headless Client. | N/A |
localClient[] = { "<IP>" }; |
{} |
Indicates clients with unlimited bandwidth and nearly no latency. See Arma 3: Headless Client. | N/A |
filePatchingExceptions[] = { "<UID>" }; |
{} |
Whitelisted clients ignore the rules defined by allowedFilePatching and verifySignatures, allowing them to join the server with any mods of their choice. Signature errors are still logged by the server upon connection. | This entry has existed since 2016, but only became fully operational in 2.10 |
Server Behaviour | |||
voteThreshold = 0.33; |
0.5 |
Percentage of votes needed to confirm a vote. 33% in this example. | N/A |
voteMissionPlayers = 3; |
1 |
Start mission-voting when X numberOfPlayers connect. | N/A |
allowedVoteCmds[] = { { "kick", false, false, 0.75 } }; |
{} |
See Arma 3: Mission voting. | N/A |
allowedVotedAdminCmds[] = { { "mission", true, true } }; |
{} |
See Arma 3: Mission voting. | N/A |
kickduplicate = 1; |
0 |
Do not allow duplicate game IDs. Second player with an existing ID will be kicked automatically. 1 means active, 0 disabled. | N/A |
loopback = true; |
false |
Adding this option will force server into LAN mode. This will allow multiple local instances of the game to connect to the server for testing purposes. At the same time it will prevent all non-local instances from connecting. | N/A |
upnp = true; |
false |
Automatically creates port mapping on UPNP/IGD enabled router. This option allows to create a server behind NAT (the router must have public IP and support UPNP/IGD protocol). Read more Internet Gateway Device (IGD) Standardized Device Control Protocol. | N/A |
allowedFilePatching = 0; |
0 |
Prevent or allow file patching for the clients (including the HC)
|
1.50 |
allowedLoadFileExtensions[] = { "sqf", "txt" }; |
unknown | Only allow files with listed extensions to be loaded via loadFile command. Not listing any extension means everything is allowed. Defining the setting as empty arrays means nothing is allowed. | 1.20 |
allowedPreprocessFileExtensions[] = { "sqf", "sqs" }; |
unknown | Only allow files with listed extensions to be loaded via preprocessFile / preprocessFileLineNumbers commands. Not listing any extension means everything is allowed. Defining the setting as empty arrays means nothing is allowed. | 1.20 |
allowedHTMLLoadExtensions[] = { "htm", "html" }; |
unknown | Only allow files and URLs with listed extensions to be loaded via htmlLoad command. Not listing any extension means everything is allowed. Defining the setting as empty arrays means nothing is allowed. | 1.28 |
allowedHTMLLoadURIs[] = { "http://arma3.com" }; |
unknown | Only allow files from listed URIs and URLs to be loaded via htmlLoad command. Comment out if not used. Can use += to add to the existing list. Not listing any extension means everything is allowed. Defining the setting as empty arrays means nothing is allowed. | N/A |
MaxPing = 200; |
-1 |
Max ping value until server kick the user | 1.56 |
MaxPacketLoss = 50; |
-1 |
Max packetloss value until server kick the user | 1.56 |
MaxDesync = 150; |
-1 |
Max desync value until server kick the user | 1.56 |
DisconnectTimeout = 5; |
15 |
Server wait time before disconnecting client after loss of active traffic connection, range 1 to 90 seconds. | 1.56 |
kickClientsOnSlowNetwork[] = { 0, 0, 0, 0 }; |
{ 1, 1, 1, 1 }; |
Defines if {<MaxPing>, <MaxPacketLoss>, <MaxDesync>, <DisconnectTimeout>} will be logged (0) or kicked (1) | 1.56 |
enablePlayerDiag = 1; |
0 |
Logs players' bandwidth and desync info every 60 seconds, as well as "network message is pending" owner identity. | N/A |
callExtReportLimit = 1000; |
1000 |
If server initiated callExtension takes longer than specified limit in milliseconds, the warning will be logged into server .rpt file as well as reflected in the extension return result. | N/A |
kickTimeout[] = { { 0, -1 }, { 1, 180 }, { 2, 180 }, { 3, 180 } }; |
{ { 0, 60 }, { 1, 60 }, { 2, 60 }, { 3, 60 } }; |
timeout = in seconds how long until kicked player can return
|
1.90 |
votingTimeOut = 60; |
60 |
Voting timeout | N/A |
votingTimeOut[] = { 60, 90 }; |
{ 60, 90 } |
Voteing timeout { ready, notReady } | 1.90 |
roleTimeOut = 90; |
90 |
Role selection timout | N/A |
roleTimeOut[] = { 90, 120 }; |
{ 90, 120 } |
Role selection timeout { ready, notReady } | 1.90 |
briefingTimeOut = 60; |
60 |
Briefing timeout | N/A |
briefingTimeOut[] = { 60, 90 }; |
{ 60, 90 } |
Briefing timeout { ready, notReady } | 1.90 |
debriefingTimeOut = 45; |
45 |
Debriefing timeout | N/A |
debriefingTimeOut[] = { 45, 60 }; |
{ 45, 60 } |
Debriefing timeout { ready, notReady } | 1.90 |
lobbyIdleTimeout = 300; |
0 |
Lobby idle timeout
Independent of set lobbyIdleTimeout in the config file, it will be at least |
1.90 |
missionsToServerRestart = 8; |
0 |
Number of times missionEnd happens before server initiate process restart (uses actual session startup command-line parameters, not possible to combine with `missionsToShutdown` ) | N/A |
missionsToShutdown = 8; |
0 |
Number of times missionEnd happens before server initiate process shutdown (has same behavior as setting named `missionsToHardRestart`) | N/A |
autoSelectMission = true; |
false |
When enabled, the server auto-starts next mission in mission cycle and waits for players in the role selection. This allows full mission information in server browser and then results in proper filtering of the servers. This is lesser-variant (trimmed) of server startup command-line parameter -autoInit. Might collide with campaign linked missions / need mission cycle etc. | N/A |
randomMissionOrder = true; |
false |
When enabled, the server random start / next selection with one of missions from mission rotation list. ( setting goes outside(before) Mission class {}; ) | N/A |
disableChannels[] = { { 0, false, true } }; |
{} |
List of channels ID:
|
- |
Other Options | |||
verifySignatures = 2; |
2 |
Enables or disables the signature verification for addons.
|
- |
drawingInMap = false; |
true |
Enables or disables the ability to place markers and draw lines in map. | 1.64 |
disableVoN = 1; |
0 |
Enables or disables the Voice over Net. | N/A |
vonCodecQuality = 10; |
3 |
Defines VoN codec quality. Value range is from 1 to 20.
|
- |
vonCodec = 1; |
1 |
Defines VoN codec type. Value range is from 0 to 1.
|
- |
skipLobby = false; |
false |
If true, joining player will skip role selection. This is only used if no Mission, Campaign or Config setting skipLobby is defined (See Description.ext#skipLobby). | N/A |
allowProfileGlasses = false; |
true |
If false, glasses set in player profile will be ignored. This is only used if no Mission, Campaign or Config setting allowProfileGlasses is defined (See Description.ext - allowProfileGlasses) | 2.06 |
zeusCompositionScriptLevel = 0; |
1 |
This is only used if no Mission, Campaign or Config setting zeusCompositionScriptLevel is defined (See Description.ext - zeusCompositionScriptLevel). |
2.06 |
logFile = "server_console.log"; |
unknown | Enables output of dedicated server console into textfile. Default location of log is same as crash dumps and other logs. (Local settings) Note that this does not change the location of the "net.log" file, which is enabled with the -netlog command line option. | N/A |
doubleIdDetected = "command"; |
"" |
See Server Side Scripting | |
onUserConnected = "command"; |
"" |
N/A | |
onUserDisconnected = "command"; |
"" |
N/A | |
onHackedData = "command"; |
"" |
N/A | |
onDifferentData = "command"; |
"" |
N/A | |
onUnsignedData = "command"; |
"" |
N/A | |
onUserKicked = "command"; |
"" |
N/A | |
regularCheck = "command"; |
"" |
N/A | |
BattlEye = 1; |
1 |
Enables or disables the BattlEye anti-cheat engine. Requires installed BattlEye on server and clients joining the server | N/A |
timeStampFormat = "none"; |
"" |
Set the timestamp format used on each report line in server-side RPT file. Possible values are "none", "short", "full". | N/A |
forceRotorLibSimulation = 0; |
0 |
Enforces the Advanced Flight Model on the server. 0 (up to the player). 1 - forced AFM, 2 - forced SFM. | 1.34 |
persistent = 1; |
0 |
Mission keeps running when all clients disconnect. Enabling the persistence option will make missions that have either base or instant respawn keep on running after all players have disconnected. The other respawn types will not make a mission persistent. The kind of respawn a certain mission uses is set in its Description.ext. | N/A |
requiredBuild = xxxxx; |
0 |
Minimum required client version. Clients with version lower than requiredBuild will not be able to connect. If requiredBuild is set to a large number, like requiredBuild = 999999999; for example, it will automatically be lowered to the current server version. |
N/A |
statisticsEnabled = 1; |
1 |
Allows to opt-out of Arma 3 analytics for the server by using 0 | 1.56 |
forcedDifficulty = "regular"; |
"" |
Enforces the selected difficulty on the server. forcedDifficulty = "<difficultyClass>";
|
1.56 |
missionWhitelist[] = { "intro.altis" }; |
{} |
Limit the available missions for the admin for the mission change. See Arma 3: MP Mission Names for a full list. | 1.56 |
steamProtocolMaxDataSize = 1024; |
1024 |
Limit for maximum Steam Query packet length. Increasing this value is dangerous as it can cause Arma 3 server to send UDP packets of a size larger than the MTU. This will cause UDP packets to be fragmented which is not supported by some older routers. But increasing this will fix the modlist length limit in Arma 3: Launcher. | 2.00 |
class AdvancedOptions
{
LogObjectNotFound = true; // logging enabled
SkipDescriptionParsing = false; // parse description.ext
ignoreMissionLoadErrors = false; // do not ingore errors
queueSizeLogG = 1000000; // if a specific players message queue
// is larger than 1MB and #monitor is running,
// dump his messages to a logfile for analysis
};
|
N/A |
|
2.022.042.08 |
armaUnitsTimeout = 30; |
30 |
Defines how long the player will be stuck connecting and wait for armaUnits data. Player will be notified if timeout elapsed and no units data was received | 2.06 |
overrideHazeQuality = 1; |
-1 |
0/1/2 - VeryLow/Low/Standard - Forces haze quality in MP on all clients. Standard (2) - mod config driven. Default (-1) - do not force. Mission config's overrideHazeQuality has priority over the server option. | 2.16 |
class AntiFlood
{
cycleTime = 0.5;
cycleLimit = 400;
cycleHardLimit = 4000;
enableKick = 0;
};
|
cycleTime = 0.5;
cycleLimit = 400;
cycleHardLimit = 4000;
enableKick = 0;
|
If the last 4 out of 8 cycles were flagged or if within one cycle the hard limit is exceeded,
the player is kicked (if |
2.18 |
Server Administration
If BattlEye RCon is not in use, there can only be 1 server admin at any given time. There are two ways of becoming admin, through a vote or through login with authenticated credentials.
Voted In Admin
It is possible to become a server administrator through player voting process. Such admin has less abilities than logged in admin.
For example, voted in admin would be able to kick a player, but only logged in admin would be able to ban a player.
For more information on voting and voting configuration see page Server Voting.
Logged In Admin
To log in as admin, one is required to type in#login command followed by server password, which matches password defined in passwordAdmin param.
Since Arma 2:OA it is possible to add one or several user ids UIDs into admins[] server config parameter, which would allow listed users to log in as admin by simply typing #login without a password.
This presents several advantages for managing the servers. The server owner can have multiple admins selected from the community and doesn't have to provide each one with server admin password.
The adding and removing of UIDs is done on the server side which makes it easy to add and to remove admins if necessary. On the server, admins are handled on first come first served basis.
Here are the rules:
- If there is already a logged in admin on the server, the new admin will not be able to log in until previously logged in admin logs out
- If there is a voted in admin on the server, the logged in admin will override voted in admin and take admin role
- There is no difference between logged in admin that used admin password or logged in admin that was whitelisted with admins[] param
The logged in and voted in admins have different set of Multiplayer Server Commands available to them. See serverCommandAvailable for more information.
Server Security
Several of these settings directly contribute to the security of the server and have been highlighted as important, particularly for running public - no password - servers.
- The most updated ones that give a good protection (and are, de facto, the standard for public servers) are
battlEye = 1;
verifySignatures = 2;
allowedFilePatching = 0;
allowedLoadFileExtensions[] = { "hpp", "sqs", "sqf", "fsm", "cpp", "paa", "txt", "xml", "inc", "ext", "sqm", "ods", "fxy", "lip", "csv", "kb", "bik", "bikb", "html", "htm", "biedi" };
allowedPreprocessFileExtensions[] = { "hpp", "sqs", "sqf", "fsm", "cpp", "paa", "txt", "xml", "inc", "ext", "sqm", "ods", "fxy", "lip", "csv", "kb", "bik", "bikb", "html", "htm", "biedi" }; // ,"sqfc" // add .sqfc if used
allowedHTMLLoadExtensions[] = { "htm", "html", "xml", "txt" };
// allowedHTMLLoadURIs[] = {};
passwordAdmin = "xyzxyz123";
serverCommandPassword = "xyzxyz456";
Notes
The properties allowedLoad*/allowedPreprocess*/allowedHTML* are server.cfg settings with array list of extensions for server-side use only. The above listed examples are for basic game multiplayer modes. Server admins may attempt to make it stricter for their servers. However, if too strict then server's log file will contain warning entries about unable read.
- With the exception of allowedHTMLLoadURIs those arrays covers both files inside and outside PBOs so don't change the above defaults w/o testing first as there is a chance it will break the game.
- To read loadFile , preprocessFile , preprocessFileLineNumbers and to remember, those works on files only-within Arma 3 server directory and its sub-directories!
- Refer to ArmA: Addon Signatures for current best practices in server mod signing and the use of key signature files.
- To further increase servers security, remember that BattlEye has the ability to use server-side (including preventing remote execution) and client-side script check filters.
- These BattlEye filters needs to be written specifically for each mission and mod as the scripting differs in each of them.
Safe Folder Structure
Engine supports absolute outside Arma 3 server folder for command-line parameters -servermod=, -mod= and same for profile directories and config locations. This puts those out of reach by various load script command features which are limited only within Arma 3 folder and it is sub-directories for security reason. thus e.g. safe folder-structure looks like:
\arma3server \ \arma3server \@publicmods \ \arma3server_servermods_secrethash \ \arma3server_profiles_and_configs_secrethash \
Note that callExtensions are loaded only from Arma 3 server root / sub-folders
Example Configuration File
// server.cfg
// GLOBAL SETTINGS
hostname = "Fun and Test Server"; // The name of the server that shall be displayed in the public server list
password = ""; // Password for joining, eg connecting to the server
passwordAdmin = "xyz"; // Password to become server admin. When in Arma MP and connected to the server, type '#login xyz'
serverCommandPassword = "xyzxyz"; // Password required by alternate syntax of [[serverCommand]] server-side scripting.
logFile = "server_console.log"; // Where the logfile should go and what it should be called
// WELCOME MESSAGE ("Message Of The Day")
// It can be several lines, separated by comma
// Empty messages "" will not be displayed at all but are only for increasing the interval
motd[] =
{
"", "",
"Two empty lines above to increase the time interval",
"Welcome to our server",
"", "",
"We are looking for fun - Join us Now!",
"http://www.example.com",
"One more empty line below to increase interval",
""
};
motdInterval = 5; // Time interval (in seconds) between each message
// JOINING RULES
maxPlayers = 64; // Maximum amount of players. Civilians and watchers, beholder, bystanders and so on also count as player.
kickDuplicate = 1; // Each ArmA version has its own ID. If kickDuplicate is set to 1, a player will be kicked when he joins a server where another player with the same ID is playing.
verifySignatures = 2; // Verifies .pbos against .bisign files. Valid values 0 (disabled), 1 (prefer v2 sigs but accept v1 too) and 2 (only v2 sigs are allowed).
equalModRequired = 0; // Outdated. If set to 1, player has to use exactly the same -mod= startup parameter as the server.
allowedFilePatching = 0; // Allow or prevent client using -filePatching to join the server. 0, is disallow, 1 is allow HC, 2 is allow all clients (since Arma 3 v1.50)
filePatchingExceptions[] = { "123456789", "987654321" }; // Whitelisted Steam IDs allowed to join with -filePatching enabled
// requiredBuild = 12345; // Require clients joining to have at least build 12345 of game, preventing obsolete clients to connect
// VOTING
voteMissionPlayers = 1; // Tells the server how many people must connect so that it displays the mission selection screen.
voteThreshold = 0.33; // 33% or more players need to vote for something, for example an admin or a new map, to become effective
// INGAME SETTINGS
disableVoN = 0; // If set to 1, Voice over Net will not be available
vonCodec = 1; // If set to 1 then it uses IETF standard OPUS codec, if to 0 then it uses SPEEX codec (since Arma 3 v1.58)
vonCodecQuality = 30; // 0..10 = 8kHz, 11..20 = 16kHz, 21..30 = 32kHz (48kHz)
persistent = 1; // If 1, missions still run on even after the last player disconnected.
timeStampFormat = "short"; // Set the timestamp format used on each report line in server-side RPT file. Possible values are "none" (default), "short", "full".
BattlEye = 1; // Server to use BattlEye system
allowedLoadFileExtensions[] = { "hpp", "sqs", "sqf", "fsm", "cpp", "paa", "txt", "xml", "inc", "ext", "sqm", "ods", "fxy", "lip", "csv", "kb", "bik", "bikb", "html", "htm", "biedi" }; // only allow files with those extensions to be loaded via loadFile command (since Arma 3 build 1.19.124216)
allowedPreprocessFileExtensions[] = { "hpp", "sqs", "sqf", "fsm", "cpp", "paa", "txt", "xml", "inc", "ext", "sqm", "ods", "fxy", "lip", "csv", "kb", "bik", "bikb", "html", "htm", "biedi" }; // only allow files with those extensions to be loaded via preprocessFile/preprocessFileLineNumber commands (since Arma 3 build 1.19.124323)
allowedHTMLLoadExtensions[] = { "htm", "html", "xml", "txt" }; // only allow files with those extensions to be loaded via HTMLLoad command (since Arma 3 build 1.27.126715)
// allowedHTMLLoadURIs[] = {}; // Leave commented to let missions/campaigns/addons decide what URIs are supported. Uncomment to define server-level restrictions for URIs
// TIMEOUTS
disconnectTimeout = 5; // Time to wait before disconnecting a user which temporarly lost connection. Range is 5 to 90 seconds.
maxDesync = 150; // Max desync value until server kick the user
maxPing= 200; // Max ping value until server kick the user
maxPacketLoss = 50; // Max packetloss value until server kick the user
kickClientsOnSlowNetwork[] = { 0, 0, 0, 0 }; // Defines if {<MaxPing>, <MaxPacketLoss>, <MaxDesync>, <DisconnectTimeout>} will be logged (0) or kicked (1)
kickTimeout[] = { { 0, -1 }, { 1, 180 }, { 2, 180 }, { 3, 180 } };
votingTimeOut[] = { 60, 90 }; // Kicks users from server if they spend too much time in mission voting
roleTimeOut[] = { 90, 120 }; // Kicks users from server if they spend too much time in role selection
briefingTimeOut[] = { 60, 90 }; // Kicks users from server if they spend too much time in briefing (map) screen
debriefingTimeOut[] = { 45, 60 }; // Kicks users from server if they spend too much time in debriefing screen
lobbyIdleTimeout = 300; // The amount of time the server will wait before force-starting a mission without a logged-in Admin.
// SCRIPTING ISSUES
onUserConnected = "";
onUserDisconnected = "";
doubleIdDetected = "";
// SIGNATURE VERIFICATION
onUnsignedData = "kick (_this select 0)"; // unsigned data detected
onHackedData = "kick (_this select 0)"; // tampering of the signature detected
onDifferentData = ""; // data with a valid signature, but different version than the one present on server detected
// MISSIONS CYCLE (see below)
randomMissionOrder = true; // Randomly iterate through Missions list
autoSelectMission = true; // Server auto selects next mission in cycle
class Missions {}; // An empty Missions class means there will be no mission rotation
missionWhitelist[] = {}; // An empty whitelist means there is no restriction on what missions' available
Mission Rotation
One can set an automatic mission rotation. Without an admin, the server will automatically select a mission when at least one player is connected.
Once the mission is done and if there are still players on the server, it will automatically switch to the next mission in the cycle.
General definition:
class Missions
{
class CUSTOMNAME
{
template = "MISSION.TERRAIN";
difficulty = "DIFFICULTYLEVEL";
class Params
{
MISSIONPARAMETER1 = VALUE;
MISSIONPARAMETER2 = VALUE;
MISSIONPARAMETER3 = VALUE;
};
};
};
Parameters
The template and difficulty must be defined. Parameter definition is optional.
Template
The entry naming is always missionName.terrainName.
The name can come from the different options:
- Mission PBO in MPMissions folder - like MyMission.MyTerrain.pbo
- Mission folder in MPMissions folder - like MyMission.MyTerrain\mission.sqm
- Addon Mission loaded via some mod (folder) - in such case it must be defined via a config.cpp in class CfgMissions/class MPMissions. You determine the naming with the config viewer.
Sample definition from CfgMissions/MPMissions relevant for Addon Mission':
class CfgMissions
{
class MPMissions
{
class MP_Marksmen_01
{
briefingName = "End Game 16 Kavala";
directory = "A3\Missions_F_MP_Mark\MPScenarios\MP_Marksmen_01.Altis";
};
class EscapeFromMalden//class name not the same as mission folder name!
{
briefingName = "Escape 10 Malden";
directory = "A3\Missions_F_Patrol\MPScenarios\MP_EscapeFromMalden.Malden";
};
class MP_CombatPatrol_01
{
briefingName = "COOP 12 Combat Patrol";
directory = "A3\Missions_F_Patrol\mpscenarios\MP_CombatPatrol_01.Altis";
};
class Apex
{
briefingName = "Apex Protocol";
class EXP_m01
{
briefingName = "01 Keystone";
directory = "a3\missions_f_exp\campaign\missions\exp_m01.tanoa";
};
};
};
Difficulty
Set the desired enforced difficulty level.
The standard options are:
- Recruit
- Regular
- Veteran
- Custom
For more see: Difficulty Settings
class Params
A mission may offer mission parameters. You can apply a different default for the given mission in your mission rotation by setting the key-value pair in here.
To determine if/what mission parameters are available, you need to exact the mission pbo to get to the Description.ext.
The actual definition may also be found in another files if #include "PATH\FILE.extension"
is used.
class Missions
{
class TestMission01 // name for the first entry - can be anything (characters/numbers/underscore, but no spaces!)
{
template = "MP_Marksmen_01.Altis";
difficulty = "recruit";
class Params
{
RespawnDelay = 15; // default 30
EndGameRespawnDelay = 30; // default 45
};
};
class TestMission02
{
template = "EscapeFromMalden.Malden";
difficulty = "regular";
class Params
{
Loadouts = 0; // default 1
EnemyEquipment = 0; // default 1
};
};
class TestMission03
{
template = "MP_CombatPatrol_01.Altis";
difficulty = "veteran";
class Params
{
BIS_CP_reinforcements = 2; // default 0
BIS_CP_tickets = 5; // default 20
};
};
class TestMission04
{
template = "EXP_m01.Tanoa"; // Apex Protocol - COOP campaign
difficulty = "custom";
class Params
{
};
};
};
Arma 3 Apex - Mission Collection
Mainly intended for MP campaigns. If the progress is defined in the MPMissions class, server administrator can simply add the whole campaign by adding campaign class into the server.cfg. See the example below.
config.cpp:
class MPMissions
{
class Apex
{
briefingName = "$STR_A3_CoopCampaignName";
class EXP_m01
{
briefingName = "$STR_A3_exp_m01_missionname";
directory = "a3\missions_f_exp\campaign\missions\exp_m01.tanoa";
};
class EXP_m02
{
briefingName = "$STR_A3_exp_m02_missionname";
directory = "a3\missions_f_exp\campaign\missions\exp_m02.tanoa";
};
class EXP_m03
{
briefingName = "$STR_A3_exp_m03_missionname";
directory = "a3\missions_f_exp\campaign\missions\exp_m03.tanoa";
};
};
};
server.cfg:
// MISSIONS CYCLE
class Missions
{
class Apex{};
};
Also the difficulty of the each mission can be overridden
class Missions
{
class Apex
{
class EXP_m01
{
difficulty = "veteran";
};
};
};
Important Settings
In the Server Config File
- autoSelectMission
- randomMissionOrder
- persistent
- missionsToServerRestart and missionsToShutdown
- votingTimeOut, roleTimeOut, briefingTimeOut and debriefingTimeOut
And from Startup Parameters:
- loadMissionToMemory
- autoInit
Additional Details
For hosting server behind NAT or firewall, please ensure gameport and STEAMports are forwarded and open!
Set the ICMP "echo reply" as allowed so the server is able return ping delay properly.
It's recommended to enable the NAT traversal (so called "Edge traversal" in Windows Firewall) for arma3server.exe, arma3.exe to better support clients/servers behind NAT.
Mission Parameters Override
On dedicated server, only an admin can set mission options provided by mission maker via class Params. However as a server owner it is possible to override default setting with your own. See Mission Parameters for more info.