Startup Parameters Config File

From Bohemia Interactive Community
Revision as of 17:20, 30 May 2021 by Lou Montana (talk | contribs) (Text replacement - "\[(ftp|https?)\:\/\/dev-heaven\.net([^ ]+) (.+)\]" to "{{ExternalLink|link= $1://dev-heaven.net$2|text= $3}}")
Jump to navigation Jump to search

The config file can be used to put startup parameters in, instead of specifying them at a shortcut/commandline.

Note

NOTE: low level parameters are NOT supported.

.par file does not (and will not) support some low level parameters, namely:

  • -cpuCount
  • -malloc
  • -exthreads
  • -maxMem=
  • -profiles= (confirmed on Arma 3 version 1.66.139586, options does not work from parameter file)

The reason is those need to be initialized before any file operations are done.

Using

-par startup parameter lets to specify the file.

Pre build 86060

Location

Inside game folder

Naming

Depending on game:

  • ArmA2.par
  • ArmA2OA.par
  • TakeOnH.par


Format

class Arg
{
    startupParameter="-startupParameter"
    startupParameter2="-startupParameter2=value1;value2"
};

Example

class Arg
{
    nosplash="-nosplash";
    skipIntro="-skipIntro";
    world="-world=none";
    mod="-mod=Expansion;Expansion\beta;Expansion\beta\Expansion;@cwr2";
};

Post build 86060

Location

Location can be defined with -par=parameterFileName startup parameter. If file extension is .par the formatting described previously is required. With any other extension (like .txt) a plain text is assumed, with one command line option per line. In both cases the file is preprocessed before parsing, allowing C++ style comments and #define-s to be used.

Windows

-par won't work being passed by cmd as variable to quotes

correct .cmd|.bat

setsetlocal enableDelayedExpansion enableExtensions

set v=!v! "-profiles=!cd!\acc"
set v=!v! "-par=D:\pa\startupParameters.txt"

start "" "D:\pa\arma3.exe" !v!		&rem need "start" for closing cmd window;
timeout /t 1		&rem need for keeping game window (starting from logo) foreground after cmd window close;

Format

The file should be named "something.txt" using the .TXT extension, and not use the ".PAR" file extension. The ".PAR" file extension is apparently no longer read correctly on a dedicated server. The file can be located either inside or outside of the game folder for organizational purposes. Whitespace is ignored.

-startupParameter
-startupParameter2=value1;value2
MissionFileToOpenInTheEditor

Example

-nosplash
-skipIntro
-world=none
-mod=Expansion;Expansion\beta;Expansion\beta\Expansion;@cwr2
"c:\arma2\Users\USERNAME\missions\MissionName.Desert_E\mission.sqm"

note: (not sure that this quoted line will work (most won't), but patches with spaces without the quotes, and quoted -mod's patches will);

External links

Feature is discussed here by Suma (dead link)