Server Config File – Arma 2

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (Add Arma 2 and Arma 3 Multiplayer categories)
(5 intermediate revisions by 3 users not shown)
Line 40: Line 40:
| <tt>kickduplicate = 1;</tt>          || Do not allow duplicate ''game IDs''. Second player with an existing ID will be kicked automatically. <tt>1</tt> means active, <tt>0</tt> disabled.
| <tt>kickduplicate = 1;</tt>          || Do not allow duplicate ''game IDs''. Second player with an existing ID will be kicked automatically. <tt>1</tt> means active, <tt>0</tt> disabled.
|-
|-
| <tt>loopback = true;</tt>          || While using the Dev version of Arma III, 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.
| <tt>loopback = true;</tt>          || 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.
|-
|-
| <tt>checkfiles[]= {"dta\bin.pbo", "a10\config.bin"};</tt> || '''Outdated - replaced by [[ArmA:_Addon_Signatures|verifySignatures]]!''' Only use if you really understand what it does.
| <tt>checkfiles[]= {"dta\bin.pbo", "a10\config.bin"};</tt> || '''Outdated - replaced by [[ArmA:_Addon_Signatures|verifySignatures]]!''' Only use if you really understand what it does.
Line 153: Line 153:
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 [[server.cfg#Server_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===
Line 168: Line 168:


===Server Security===
===Server Security===
Please check following link for security settings: [[Arma_3:_Server_Security]]
Please check following link for security settings: '''[[Arma_3:_Server_Security]]'''


==Example Configuration File==
==Example Configuration File==
Line 255: Line 255:


=== Mission rotation ===
=== Mission rotation ===
One can set an automatic mission rotation. It will automatically select a mission join a player joins with no admin logged in{{Clarify}}. Once the mission is done and if there are still players on the server, it automatically switches to the next in the cycle. For example.
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 in the cycle.


Example:
<syntaxhighlight lang="c">
<syntaxhighlight lang="c">
class Missions
class Missions
{
{
class TestMission01 {
class TestMission01
template = MP_Marksmen_01.Altis;
{
template = MP_Marksmen_01.Altis;
difficulty = "veteran";
difficulty = "veteran";
//difficultymp = "veteran";
class Params {};
        class Params
                {
                };
};
};
class TestMission02 {
class TestMission02
template = MP_End_Game_01.Altis;
{
template = MP_End_Game_01.Altis;
difficulty = "veteran";
difficulty = "veteran";
//difficultymp = "veteran";
class Params {};
        class Params
                {
                };
};
};
class TestMission03 {
class TestMission03
template = MP_End_Game_02.Altis;
{
template = MP_End_Game_02.Altis;
difficulty = "veteran";
difficulty = "veteran";
//difficultymp = "veteran";
class Params {};
        class Params
                {
                };
};
};
class TestMission04 {
class TestMission04
template = MP_End_Game_03.Altis;
{
template = MP_End_Game_03.Altis;
difficulty = "veteran";
difficulty = "veteran";
//difficultymp = "veteran";
class Params {};
        class Params
                {
                };
};
};
};
};
Line 431: Line 424:
==See Also==
==See Also==
*[[ArmA: Server configuration|Server Configuration]]  
*[[ArmA: Server configuration|Server Configuration]]  
*[[basic.cfg|Server Basic Config file]]
*[[Arma2: Startup Parameters|Arma 2 Startup Parameters]]
*[[Arma 3 Startup Parameters|Arma 3 Startup Parameters]]
*[[Arma_3_Dedicated_Server|Arma 3 Dedicated Server]]
*[[Armed Assault:Dedicated Server]]
*[[Armed Assault:Dedicated Server]]
*[[ArmA: Server Side Scripting]]
*[[ArmA: Server Side Scripting]]
Line 441: Line 438:
*[[Arma_2_OA:_Multiple_Mission_Parameters_Configuration]]
*[[Arma_2_OA:_Multiple_Mission_Parameters_Configuration]]


[[Category:Arma 3 Multiplayer|Server.cfg]]
[[Category:Arma 2: Multiplayer|Server.cfg]]
[[Category:ArmA: Multiplayer|Server.cfg]]
[[Category:Operation Flashpoint: Multiplayer|Server.cfg]]
[[Category:Operation Flashpoint: Multiplayer|Server.cfg]]
[[Category:ArmA: Multiplayer|Server.cfg]]

Revision as of 19:20, 27 April 2018

Introduction

This article deals with the server.cfg, a configuration file which you can use to configure various game server settings such as the difficulty level, how many votes are needed, and welcome messages. etc.

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 you do not specify the filename, no server configuration file is loaded.

Please feel free to add more information.

Server Options

Parameter Description
passwordAdmin = "xyzxyz"; Password to protect admin access.
password = "xyz"; Password required to connect to server.
serverCommandPassword = "xyzxyz"; Password required by alternate syntax of serverCommand server-side scripting.
hostname="My Server"; Servername visible in the game browser.
maxPlayers = 10; The maximum number of players that can connect to server. Number of mission slots override this setting.
motd[]= {"Welcome to my server.", "Hosted in the net."}; Two lines welcome message. Comma is the 'new line' separator.
admins[] = {"<UID>"}; e.g. admins[]={"1234","5678"}; whitelisted client can use #login w/o password (since Arma 3 1.69+). See Logged In Admin
headlessClients[] = {"<IP>"}; see Headless Client Settings
localClient[] = {"<IP>"}; see Headless Client Settings


Server Behavior Description
voteThreshold = 0.33; Percentage of votes needed to confirm a vote. 33% in this example.
voteMissionPlayers = 3; Start mission-voting when X numberOfPlayers connect. 3 players in this example.
kickduplicate = 1; Do not allow duplicate game IDs. Second player with an existing ID will be kicked automatically. 1 means active, 0 disabled.
loopback = true; 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.
checkfiles[]= {"dta\bin.pbo", "a10\config.bin"}; Outdated - replaced by verifySignatures! Only use if you really understand what it does.

List of files to check for integrity with crc check. Possible to check pbo files or files inside pbos.

Beware checking large files, which takes serious processing on the server and can cause various issues.

equalModRequired = 1; Outdated - replaced by verifySignatures! Only use if you really understand what it does.

Clients require the exact same modfolder naming, order and amount as the server. 1 means active, 0 disabled.

upnp = 1; Automatically creates port mapping on UPNP/IGD enabled router. This option allows you to create a server behind NAT (your router must have public IP and support UPNP/IGD protocol).

Read more Internet Gateway Device (IGD) Standardized Device Control Protocol .

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.

allowedFilePatching = 0; Prevent or allow file patching for the clients (including the HC) (since Arma 3 1.49+)
  • 0 is no clients (default)
  • 1 is Headless Clients only
  • 2 is all clients
disconnectTimeout = 5; Server wait time before disconnecting client, default 90 seconds, range 5 to 90 seconds. (since Arma 3 1.56+)
maxdesync = 150; Max desync value until server kick the user (since Arma 3 1.56+)
maxping= 200; Max ping value until server kick the user (since Arma 3 1.56+)
maxpacketloss= 50; Max packetloss value until server kick the user (since Arma 3 1.56+)
kickClientsOnSlowNetwork[] = { 0, 0, 0, 0 }; Defines if {<MaxPing>, <MaxPacketLoss>, <MaxDesync>, <DisconnectTimeout>} will be logged (0) or kicked (1) (since Arma 3 1.56+)


(Local settings) Note that this does not change the location of the "net.log" file, which you enable with the -netlog command line option.
Arma Only Parameters Description
verifySignatures = 2; Enables or disables the signature verification for addons.
  • Default = 0.
  • Weak protection = 1.
  • Full protection = 2.

From Arma 3 use only level 2 (level 1 is outdated and not efficent)

drawingInMap = 0; Enables or disables the ability to place markers and draw lines in map. Default = 1 (since Arma 3 1.63+).
disableVoN = 1; Enables or disables the Voice over Net. Default = 0.
vonCodecQuality = 10; Defines VoN codec quality. Value range is from 1 to 20.
  • Default = 3.
  • Since 1.62.95417 supports range 1-20
  • Since 1.63.x will support range 1-30
  • 8kHz is 0-10, 16kHz is 11-20, for 21-30 it's 32kHz for SPEEX codec and 48kHz for OPUS codec.
vonCodec = 1; Defines VoN codec type. Value range is from 0 to 1.
  • Default = 0.
  • Since Arma 3 update 1.58 supports value 1
  • Value 0 uses older SPEEX codec, while 1 switches to new IETF standard OPUS codec.
logFile = "server_console.log"; Enables output of dedicated server console into textfile. Default location of log is same as crash dumps and other logs.
doubleIdDetected = "command"; see Server Side Scripting
onUserConnected = "command";
onUserDisconnected = "command";
onHackedData = "command";
onDifferentData = "command";
onUnsignedData = "command";
regularCheck = "command";
BattlEye = 1; Enables or disables the BattlEye anti-cheat engine. Default 0. - since 1.09 beta, in Arma 3 default is 1. Requires installed battleye on server and clients joining the server
timeStampFormat = "short"; Set the timestamp format used on each report line in server-side RPT file. Possible values are "none" (default), "short", "full".
forceRotorLibSimulation = 0; Enforces the Advanced Flight Model on the server. Default = 0 (up to the player). 1 - forced AFM, 2 - forced SFM.
persistent = 1; Mission keeps running when all clients disconnect.. Default = 0. See note below.
requiredBuild = xxxxx; From 1.60 Patchlog: requiredBuild=xxxxx; in server.cfg preventing obsolete clients to connect. Since 95691 the required version is limited to the server version.
forcedDifficulty = "regular"; see Forced difficulty (since Arma 3 1.56+)
missionWhitelist[] = {"intro.altis"}; Limit the available missions for the admin for the mission change (since Arma 3 1.56+)


Comments

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.

If you do not include the regularCheck option or set regularCheck = ""; it will be activated automatically.

The server checks the files from time to time by hashing them and comparing the hash to the hash values of the clients.

The heavy I/O operation might be stressful for some systems with weak I/O, slow HDD etc.
In case you still have these problems post 1.60 release, please report to CIT ticket with details.

To turn this function off, write regularCheck = "{}";. It's strongly recommended to NOT DISABLE regularCheck as this will make the server prone to cheating.
For Arma 3 it's not recommend to use this workaround at all (simply remove regularCheck from server.cfg to avoid unforseen consequences) !


Server Administration

If you are not using BattlEye RCon, there could 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 Arma2OA 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

Please check following link for security settings: Arma_3:_Server_Security

Example Configuration File

//
// server.cfg
//
// comments are written with "//" in front of them.


// 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 you're in Arma MP and connected to the server, type '#login xyz'
serverCommandPassword = "xyzxyz";               // Password required by alternate syntax of [[serverCommand]] server-side scripting.

//reportingIP = "armedass.master.gamespy.com";	// For ArmA1 publicly list your server on GameSpy. Leave empty for private servers
//reportingIP = "arma2pc.master.gamespy.com";	// For ArmA2 publicly list your server on GameSpy. Leave empty for private servers
//reportingIP = "arma2oapc.master.gamespy.com";	// For Arma2: Operation Arrowhead  //this option is deprecated since A2: OA version 1.63
//reportingIP = "arma3" //not used at all
logFile = "server_console.log";			// Tells ArmA-server 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 for increasing interval",
	"Welcome to our server",
	"", "",  
	"We are looking for fun - Join us Now !",
	"http://www.example.com",
	"One more empty line below for increasing interval",
	""
};
motdInterval = 5;				// Time interval (in seconds) between each message


// JOINING RULES
//checkfiles[] = {};				// Outdated.
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 1.49+)
//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 update 1.58+)  
vonCodecQuality = 30;				// since 1.62.95417 supports range 1-20 //since 1.63.x will supports range 1-30 //8kHz is 0-10, 16kHz is 11-20, 32kHz(48kHz) is 21-30 
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
disconnectTimeout = 5; 					//  Server wait time before disconnecting client, default 90 seconds, range 5 to 90 seconds. (since Arma 3 update 1.56+)  

// SCRIPTING ISSUES
onUserConnected = "";				//
onUserDisconnected = "";			//
doubleIdDetected = "";				//
//regularCheck = "{}";				//  Server checks files from time to time by hashing them and comparing the hash to the hash values of the clients. //deprecated

// 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)
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 in the cycle.

Example:

class Missions
{
	class TestMission01
	{
		template = MP_Marksmen_01.Altis;
		difficulty = "veteran";
		class Params {};
	};
	class TestMission02
	{
		template = MP_End_Game_01.Altis;
		difficulty = "veteran";
		class Params {};
	};
	class TestMission03
	{
		template = MP_End_Game_02.Altis;
		difficulty = "veteran";
		class Params {};
	};
	class TestMission04
	{
		template = MP_End_Game_03.Altis;
		difficulty = "veteran";
		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"; 
  		};
	};
};

Dedicated client in Headless Client mode

Parameter Description
localClient[]={"127.0.0.1", ...}; to indicate clients with unlimited bandwidth and nearly no latency (https://dev-heaven.net/issues/62500), Available since Arma 2:OA build 99184 , including Arma 3
headlessClients[]={"127.0.0.1", ...}; The server doesn't allow arbitrary connections from headless clients if you do not define the headless clients IPs.
Multiple Connections and Addresses are allowed in the case of more than one Headless Client.

More details at Headless Client

Arma 2: Operation Arrowhead & Arma 3 - STEAM ports configuration

note: STEAM ports in Arma 3 build 1.22.125469 or newer are hardcoded as now linked to game-port of the server instance (+1 query +2 report to master)

Parameter Description
steamPort = <number>; default 2303, defines port for communication with STEAM services, needs to be unique for each dedicated server within one OS instance / network interface
steamQueryPort = <number>; default 2304, defines port for server's STEAM query, needs to be unique for each dedicated server within one OS instance / network interface

Arma 3 - Mission white-listing

The following example shows only Zeus and Karts missions allowed e.g. via voting and mission select.

missionWhitelist[] = {
"MP_COOP_m04.Stratis",
"MP_COOP_m05.Altis",
"MP_COOP_m06.Altis",
"MP_COOP_m07.Altis",
"MP_ZGM_m11.Altis",
"MP_ZGM_m11_EAST.Altis",
"MP_ZGM_m11_GUER.Altis",
"MP_ZGM_m11_WEST.Altis",
"MP_ZGM_m12.Stratis",
"MP_ZGM_m12_EAST.Stratis",
"MP_ZGM_m12_GUER.Stratis",
"MP_ZGM_m12_WEST.Stratis",
"MP_ZSC_m10.Altis",
"MP_ZGM_m13.VR",
"MP_ZGM_m13_EAST.VR",
"MP_ZGM_m13_GUER.VR",
"MP_ZGM_m13_WEST.VR",
"MP_ZR_8_Karts01.Altis",
"MP_ZR_8_Karts02.Stratis",
"MP_bootcamp_01.VR",
"MP_Bootcamp_01.Altis",
};

Arma 3 - Forced difficulty

Enforces the selected difficulty on the server.

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 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 server.cfg, the difficulty set in the mission cycle overrides the difficulty set by forcedDifficulty parameter.

Arma 3 - Analytics configuration

Parameter Description
statisticsEnabled = <number>; default 1, allows to opt-out of analytics for the server by using 0

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.

See Also