Basic Server Config File – Arma 2

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Fix link)
 
(75 intermediate revisions by 14 users not shown)
Line 1: Line 1:
==Introduction==
{{TOC|side}}{{Feature|arma3|This page is for games '''before''' {{arma3}}. For a dedicated {{arma3}} page, see [[Arma 3: Basic Server Config File]].}}


This article deals with the '''basic.cfg''', the name means nothing, and can be called anything. The real name is determined by the [[-cfg]] command line option when launching the dedicated server.
 
This article deals with the '''basic.cfg''', the name means nothing, and can be called anything. The real name is determined by the [[Arma 2: Startup Parameters#Server_Options|-cfg]] command line option when launching the dedicated server or the game executable - in other words '''it also works for clients'''. When you do not provide a name, a default .cfg file is loaded with a name depending on a product, located in the Documents area of the OS user profile. (For Arrowhead the name is ArmA2OA.cfg, for Arma 2 it is [[arma2.cfg]]).


In this configuration file you should configure your server's connectivity, mainly for performance tuning.
In this configuration file you should configure your server's connectivity, mainly for performance tuning.


==Performance Tuning Options==
 
== Performance Tuning Options ==


There are also some parameters that can be used to fine-tune network performance. You can add following entries to arma.cfg (the main Armed Assault configuration file)
There are also some parameters that can be used to fine-tune network performance. You can add following entries to arma.cfg (the main Armed Assault configuration file)


  '''MaxMsgSend=<limit>;'''  
  '''MaxMsgSend=<limit>;'''  
     Maximum number of messages that can be sent in one simulation cycle.
     Maximum number of packets (aggregate messages) that can be sent in one simulation cycle ("frame").
     Increasing this value can decrease lag on high upload bandwidth servers.
     Increasing this value can decrease lag on high upload bandwidth servers.
     ''Default: 128''
     '''Default: 128'''
   
   
  '''MaxSizeGuaranteed=<limit>;'''  
  '''MaxSizeGuaranteed=<limit>;'''  
     Maximum size of guaranteed packet in bytes (without headers). Small messages
     Maximum size (payload) of guaranteed packet in bytes (without headers).
    are packed to larger frames. Guaranteed messages are used for non-repetitive
    Small messages are packed to larger packets (aggregate messages).
    events like shooting.
    Guaranteed packets (aggregate messages) are used for non-repetitive events like shooting.
     ''Default: 512''
     '''Default: 512'''
   
   
  '''MaxSizeNonguaranteed=<limit>;'''  
  '''MaxSizeNonguaranteed=<limit>;'''  
     Maximum size of non-guaranteed packet in bytes (without headers).
     Maximum size (payload) of non-guaranteed packet in bytes (without headers).
     Non-guaranteed messages are used  for repetitive updates like soldier or
    Small messages are packed to larger packets (aggregate messages).
    vehicle position. Increasing this value may improve bandwidth requirement,  
     Non-guaranteed packets (aggregate messages) are used  for repetitive updates like soldier or vehicle position.
    but it may increase lag.
    Increasing this value may improve bandwidth requirement, but it may increase lag.
     ''Default: 256''
     '''Default: 256'''
   
   
  '''MinBandwidth=<bottom_limit>;'''
  '''MinBandwidth=<bottom_limit>;'''
     Bandwidth the server is guaranteed to have (in bps). This value helps server
     Bandwidth the server is guaranteed to have (in bps).
    to estimate bandwidth available. Increasing it to too optimistic values can
    This value helps server to estimate bandwidth available.
    increase lag and CPU load, as too many messages will be sent but discarded.
    Increasing it to too optimistic values can increase lag and CPU load, as too many messages will be sent but discarded.
     ''Default: 131072''
     '''Default: 131072'''
   
   
  '''MaxBandwidth=<top_limit>;'''
  '''MaxBandwidth=<top_limit>;'''
     Bandwidth the server is guaranteed to never have. This value helps the server
     Bandwidth the server is guaranteed to never have (in bps).
    to estimate bandwidth available.
    This value helps the server to estimate bandwidth available.
   
   
  '''MinErrorToSend=<limit>;'''
  '''MinErrorToSend=<limit>;'''
     Minimal error to send updates across network. Using a smaller value can make
     Minimal error to send updates across network.
    units  observed by binoculars or sniper rifle to move smoother.
    Using a smaller value can make units  observed by binoculars or sniper rifle to move smoother at the trade off of
     ''Default: 0.01''
    increased network traffic.
     '''Default: 0.001''' ('''was 0.01''' until ARMA 2:OA version 1.60, ARMA 2 version 1.11 uses 0.01)
   
   
'''MinErrorToSendNear=<limit>;'''
    Minimal error to send updates across network for near units.
    Using larger value can reduce traffic sent for near units. Used to control client to server traffic as well.
    '''Introduced in Arma 2 1.60, Default: 0.01'''
* METS:
** Example: A unit 1km (distance d = 1km) from the player with MinErrorToSend = 0.001 (METS = 0.001) would send an update when that unit moves 50m (error value E = 50).
** Formula: d = sqrt[(20E)/METS] ; 1000 = sqrt[(20E)/0.001] -> E = 50
** In reality, other factors about the object are taken into effect as well according to a weighted scale.
** When the error value (E) between the master copy of an object (whoever "owns" the object) and a client's perceived/simulated copy of the same object >= MinErrorToSend (METS), a network update message will be sent for it.
* METSN:
** When using MinErrorToSend alone, for small values of distance (d) the frequency of high errors (E) would cause excessive network messages that are not necessary but could negatively impact FPS.
** Too large of a value for METSN can prevent timely desirable network update messages which can result in units appearing to "warp"
* detailed explanation of METS and METSN by Suma: http://forums.bistudio.com/showthread.php?125396-Arma-2-OA-beta-build-84984&p=2103305&highlight=minerrortosend#post2103305
== Networking Tuning Options ==
'''class sockets{maxPacketSize = <limit>;};'''
    Maximal size of packet sent over network.
    This '''can be set for both''' client-to-server AND server-to-client(s) independently''!
    ''see client([[arma2.cfg#Generic_config]] or [[arma2oa.cfg#Generic_config]], )''
    '''Default: 1400'''
    {{Feature|important|Only use in the case your router or ISP enforces lower packet size and you have connectivity issues with the game.}}
    ''Desync might happen if used '''MaxSizeGuaranteed/MaxSizeNonguaranteed values over the maxPacketSize'''.
    maxPacketSize default reduced from 1490 to 1400 since 1.60, thus MaxSize... values over 1300 could be affected negatively.''
== Other Tuning Options ==
{{Feature|important|NOTE: See the [[Talk:basic.cfg|talk page]] for some more background info by Suma.}}
  '''MaxCustomFileSize=<size_in_bits>;'''
  '''MaxCustomFileSize=<size_in_bits>;'''
     Users with custom face or custom sound larger than this size are kicked when
     Users with custom face or custom sound larger than this size are kicked when trying to connect.
    trying to connect.
 
  '''Note'''
  '''Note'''
  The greatest level of optimization can be achieved by setting the MaxMsgSend
  The greatest level of optimization can be achieved by setting the MaxMsgSend
Line 53: Line 87:
     MinBandwidth = 768000;
     MinBandwidth = 768000;


While connected to the dedicated server, you can use the [[Multiplayer Server Commands|admin command]] <code>#monitor</code> to monitor server resource usage. (You have to be logged in as or voted as game admin to do this.) The server never runs at more than 50 fps. When running slower, it always uses all available CPU processing power to maintain the smoothest possible gameplay. When running at less than 15 fps, you can consider the server overloaded – the mission currently played is probably too complex for given server. If you see the server is not using bandwidth that it could use, you can try increasing values MaxMsgSend and MinBandwidth.
While connected to the dedicated server, you can use the [[Multiplayer Server Commands|admin command]] <code style="display: block">#monitor</code> to monitor server resource usage. (You have to be logged in as or voted as game admin to do this.) The server never runs at more than 50 fps. When running slower, it always uses all available CPU processing power to maintain the smoothest possible gameplay. When running at less than 20 fps, you can consider the server overloaded – the mission currently played is probably too complex for given server. If you see the server is not using bandwidth that it could use, you can try increasing values MaxMsgSend and MinBandwidth.




== Example Configuration File ==


<syntaxhighlight lang="cpp">
// These options are created by default
language = "English";
adapter = -1;
3D_Performance = 1.000000;
Resolution_W = 800;
Resolution_H = 600;
Resolution_Bpp = 32;


Editing server.cfg (section)
From Bohemia Interactive Community
Jump to: navigation, search
Bold textItalic textInternal linkExternal link (remember http:// prefix)Level 2 headlineEmbedded imageMedia file linkMathematical formula (LaTeX)Ignore wiki formattingYour signature with timestampHorizontal line (use sparingly)
==Example Configuration File== <pre> // // server.cfg // // comments are written with "//" in front of them. // GLOBAL SETTINGS hostname="[UNA] United Nations Army - Clan 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="warcry"; // Password to become server admin. When Youre in Arma MP and connected to the server, type '#login xyz' reportingIP="armedass.master.gamespy.com"; // This is the default setting. If you change this, your server might not turn up in the public list. Leave empty for private servers logFile="z_run/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[]={ "", "", "", "Welcome to the United Nations Army server.", "Server Settings: Veteran, Crosshair=off, 3rdPerson=off, MapInfo=off, VoN=off, CustomFiles=200KByte, Voting=33%, PersistentMaps=on", "We are recruiting players - Join us Now !", "http://www.una-clan.org/", "", "We use Mumble VoIP client to communicate when plaing ARMA", "TS2 Server for recruits: gbks.net:8767" }; motdInterval=5; // Time interval (in seconds) between each message // JOINING RULES checkfiles[]={ // Checks if these files are equal to the servers files. If one or more is not, player will be kicked from server "HWTL\dta\data3d.pbo", "dta\data3d.pbo" }; maxPlayers=30; // Maximum amount of players. Civilians and watchers, beholder, bystanders and so on also count as player. maxCustomFileSize=200000; // Maximum amount of Bytes allowed to each player for his custom files like face and music Kickduplicate=1; // Each ArmA version has its onw 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=0; // Verifies the players files by checking them with the .bisign signatures. Works properly from 1.08 on equalModRequired=0; // If set to 1, player has to use exactly the same -mod= startup parameter as the server. // 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=1; // If set to 1, Voice over Net will not be available vonCodecQuality=0; // Quality from 1 to 10 persistent=1; // If 1, missions still run on even after the last player disconnected. 3rdPersonView=0; // Probably does not work here, should be set in the .armaprofile file of the server difficulty="veteran"; // Probably does not work here, should be set in the .armaprofile file of the server // SCRIPTING ISSUES onUserConnected=""; // self-explaining onUserDisconnected=""; doubleIdDetected=""; regularCheck=""; onDifferentData=""; onUnsignedData="server globalChat format['Player %1 is using unsigned data.', (_this select 0)];"; // unsigned data detected onHackedData=""; // tampering of the signature detected, see also verifySignatures above // MISSIONS CYCLE (see below) class Missions { }; </pre> ===ArmA Demo Configuration=== When running the [[ArmA: Demo]] in server mode, there are 3 multi player missions included. The following example is for the missions included with the demo only. class Missions { class MPCTF_01 // name for the mission, can be anything { template = M02CaptureTheFlag.SaraLite; cadetMode = 1; // difficulty 0=veteran 1=cadet (not only AI, but radar, map etc) }; class MPCOOP_01 // name for the mission, can be anything { template = M01Cooperative.SaraLite; cadetMode = 1; // difficulty 0=veteran 1=cadet (not only AI, but radar, map etc) }; class MPCTI_01 // name for the mission, can be anything { template = M03ConquerTheIsland.SaraLite; cadetMode = 1; // difficulty 0=veteran 1=cadet (not only AI, but radar, map etc) }; };


Please note that all contributions to Bohemia Interactive Community may be edited, altered, or removed by other contributors. If you don't want your writing to be edited mercilessly, then don't submit it here.
// These options are important for performance tuning
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Project:Copyrights for details). DO NOT SUBMIT COPYRIGHTED WORK WITHOUT PERMISSION!
Summary:


This is a minor edit Watch this page
MinBandwidth = 131072; // Bandwidth the server is guaranteed to have (in bps). This value helps server to estimate bandwidth available. Increasing it to too optimistic values can increase lag and CPU load, as too many messages will be sent but discarded. Default: 131072
Cancel | Editing help (opens in new window)
MaxBandwidth = 10000000000; // Bandwidth the server is guaranteed to never have. This value helps the server to estimate bandwidth available.
Retrieved from "http://community.bistudio.com/wiki/server.cfg"
Views


    * Article
MaxMsgSend = 128; // Maximum number of messages that can be sent in one simulation cycle. Increasing this value can decrease lag on high upload bandwidth servers. Default: 128
    * Discussion
MaxSizeGuaranteed = 512; // Maximum size of guaranteed packet in bytes (without headers). Small messages are packed to larger frames. Guaranteed messages are used for non-repetitive events like shooting. Default: 512
    * Edit
MaxSizeNonguaranteed = 256; // Maximum size of non-guaranteed packet in bytes (without headers). Non-guaranteed messages are used for repetitive updates like soldier or vehicle position. Increasing this value may improve bandwidth requirement, but it may increase lag. Default: 256
    * History
    * Move
    * Watch


Personal tools
MinErrorToSend = 0.001; // Minimal error to send updates across network. Using a smaller value can make units observed by binoculars or sniper rifle to move smoother. Default: 0.001
MinErrorToSendNear = 0.01; // Minimal error to send updates across network for near units. Using larger value can reduce traffic sent for near units. Used to control client to server traffic as well. Default: 0.01


    * Sir hC
MaxCustomFileSize = 0; // (bytes) Users with custom face or custom sound larger than this size are kicked when trying to connect.
    * My talk
</syntaxhighlight>
    * Preferences
    * My watchlist
    * My contributions
    * Log out


Navigation


    * Main Page
== See Also ==
    * Community portal
    * Current events
    * Recent changes
    * Random page
    * The Village Pump
    * Help
 
Search
Toolbox


    * What links here
* [[Arma 2: Startup Parameters]]
    * Related changes
* [[Arma 2: Server Config File]]
    * Upload file
* [[ArmA: Armed Assault: Server configuration]]
    * Special pages
* [[Armed Assault:Dedicated Server]]
* [[Operation Flashpoint:Dedicated Server]]


Buy ArmA now!
MediaWiki


    * Privacy policy
{{GameCategory|ofp|Multiplayer}}
    * About Bohemia Interactive Community
{{GameCategory|arma1|Multiplayer}}
    * Disclaimers
{{GameCategory|arma2|Multiplayer}}

Latest revision as of 19:31, 1 February 2023

Arma 3
This page is for games before Arma 3. For a dedicated Arma 3 page, see Arma 3: Basic Server Config File.


This article deals with the basic.cfg, the name means nothing, and can be called anything. The real name is determined by the -cfg command line option when launching the dedicated server or the game executable - in other words it also works for clients. When you do not provide a name, a default .cfg file is loaded with a name depending on a product, located in the Documents area of the OS user profile. (For Arrowhead the name is ArmA2OA.cfg, for Arma 2 it is arma2.cfg).

In this configuration file you should configure your server's connectivity, mainly for performance tuning.


Performance Tuning Options

There are also some parameters that can be used to fine-tune network performance. You can add following entries to arma.cfg (the main Armed Assault configuration file)

MaxMsgSend=<limit>; 
   Maximum number of packets (aggregate messages) that can be sent in one simulation cycle ("frame").
   Increasing this value can decrease lag on high upload bandwidth servers.
   Default: 128

MaxSizeGuaranteed=<limit>; 
   Maximum size (payload) of guaranteed packet in bytes (without headers).
   Small messages are packed to larger packets (aggregate messages).
   Guaranteed packets (aggregate messages) are used for non-repetitive events like shooting.
   Default: 512

MaxSizeNonguaranteed=<limit>; 
   Maximum size (payload) of non-guaranteed packet in bytes (without headers).
   Small messages are packed to larger packets (aggregate messages).
   Non-guaranteed packets (aggregate messages) are used  for repetitive updates like soldier or vehicle position.
   Increasing this value may improve bandwidth requirement, but it may increase lag.
   Default: 256

MinBandwidth=<bottom_limit>;
   Bandwidth the server is guaranteed to have (in bps).
   This value helps server to estimate bandwidth available.
   Increasing it to too optimistic values can increase lag and CPU load, as too many messages will be sent but discarded.
   Default: 131072

MaxBandwidth=<top_limit>;
   Bandwidth the server is guaranteed to never have (in bps).
   This value helps the server to estimate bandwidth available.

MinErrorToSend=<limit>;
   Minimal error to send updates across network.
   Using a smaller value can make units  observed by binoculars or sniper rifle to move smoother at the trade off of
   increased network traffic.
   Default: 0.001 (was 0.01 until ARMA 2:OA version 1.60, ARMA 2 version 1.11 uses 0.01)

MinErrorToSendNear=<limit>;
   Minimal error to send updates across network for near units.
   Using larger value can reduce traffic sent for near units. Used to control client to server traffic as well.
   Introduced in Arma 2 1.60, Default: 0.01
  • METS:
    • Example: A unit 1km (distance d = 1km) from the player with MinErrorToSend = 0.001 (METS = 0.001) would send an update when that unit moves 50m (error value E = 50).
    • Formula: d = sqrt[(20E)/METS] ; 1000 = sqrt[(20E)/0.001] -> E = 50
    • In reality, other factors about the object are taken into effect as well according to a weighted scale.
    • When the error value (E) between the master copy of an object (whoever "owns" the object) and a client's perceived/simulated copy of the same object >= MinErrorToSend (METS), a network update message will be sent for it.
  • METSN:
    • When using MinErrorToSend alone, for small values of distance (d) the frequency of high errors (E) would cause excessive network messages that are not necessary but could negatively impact FPS.
    • Too large of a value for METSN can prevent timely desirable network update messages which can result in units appearing to "warp"
  • detailed explanation of METS and METSN by Suma: http://forums.bistudio.com/showthread.php?125396-Arma-2-OA-beta-build-84984&p=2103305&highlight=minerrortosend#post2103305


Networking Tuning Options

class sockets{maxPacketSize = <limit>;};
   Maximal size of packet sent over network. 
   This can be set for both client-to-server AND server-to-client(s) independently!
   see client(arma2.cfg#Generic_config or arma2oa.cfg#Generic_config, ) 
   Default: 1400
Only use in the case your router or ISP enforces lower packet size and you have connectivity issues with the game.
   Desync might happen if used MaxSizeGuaranteed/MaxSizeNonguaranteed values over the maxPacketSize. 
   maxPacketSize default reduced from 1490 to 1400 since 1.60, thus MaxSize... values over 1300 could be affected negatively.


Other Tuning Options

NOTE: See the talk page for some more background info by Suma.
MaxCustomFileSize=<size_in_bits>;
   Users with custom face or custom sound larger than this size are kicked when trying to connect.

Note
The greatest level of optimization can be achieved by setting the MaxMsgSend
and MinBandwidth parameters. For a server with 1024 kbps we recommend the
following values:
   MaxMsgSend = 256;
   MinBandwidth = 768000;

While connected to the dedicated server, you can use the admin command #monitor to monitor server resource usage. (You have to be logged in as or voted as game admin to do this.) The server never runs at more than 50 fps. When running slower, it always uses all available CPU processing power to maintain the smoothest possible gameplay. When running at less than 20 fps, you can consider the server overloaded – the mission currently played is probably too complex for given server. If you see the server is not using bandwidth that it could use, you can try increasing values MaxMsgSend and MinBandwidth.


Example Configuration File

// These options are created by default
language = "English";
adapter = -1;
3D_Performance = 1.000000;
Resolution_W = 800;
Resolution_H = 600;
Resolution_Bpp = 32;


// These options are important for performance tuning

MinBandwidth = 131072;			// Bandwidth the server is guaranteed to have (in bps). This value helps server to estimate bandwidth available. Increasing it to too optimistic values can increase lag and CPU load, as too many messages will be sent but discarded. Default: 131072
MaxBandwidth = 10000000000;		// Bandwidth the server is guaranteed to never have. This value helps the server to estimate bandwidth available.

MaxMsgSend = 128;				// Maximum number of messages that can be sent in one simulation cycle. Increasing this value can decrease lag on high upload bandwidth servers. Default: 128
MaxSizeGuaranteed = 512;		// Maximum size of guaranteed packet in bytes (without headers). Small messages are packed to larger frames. Guaranteed messages are used for non-repetitive events like shooting. Default: 512
MaxSizeNonguaranteed = 256;		// Maximum size of non-guaranteed packet in bytes (without headers). Non-guaranteed messages are used for repetitive updates like soldier or vehicle position. Increasing this value may improve bandwidth requirement, but it may increase lag. Default: 256

MinErrorToSend = 0.001;			// Minimal error to send updates across network. Using a smaller value can make units observed by binoculars or sniper rifle to move smoother. Default: 0.001
MinErrorToSendNear = 0.01;		// Minimal error to send updates across network for near units. Using larger value can reduce traffic sent for near units. Used to control client to server traffic as well. Default: 0.01

MaxCustomFileSize = 0;			// (bytes) Users with custom face or custom sound larger than this size are kicked when trying to connect.


See Also