Startup Parameters Config File: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[(ftp|https?)\:\/\/dev-heaven\.net([^ ]+) (.+)\]" to "{{ExternalLink|link= $1://dev-heaven.net$2|text= $3}}")
(Page refresh)
Line 1: Line 1:
The config file can be used to put startup parameters in, instead of specifying them at a shortcut/commandline.
{{TOC|side}}
 
The startup parameters config file can be used to put startup parameters in, instead of specifying them in a shortcut/commandline.
== Note ==
 
{{Feature|important|NOTE: low level parameters are NOT supported.}}


{{Feature|important|Low level parameters are NOT supported:<br>
.par file does not (and will not) support some low level parameters, namely:
.par file does not (and will not) support some low level parameters, namely:
* -cpuCount
* -cpuCount
* -malloc
* -malloc
* -exthreads
* -exthreads
* -maxMem=
* -maxMem
* -profiles= (confirmed on Arma 3 version 1.66.139586, options does not work from parameter file)
* -profiles (confirmed on {{arma3}} 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.
The reason is those need to be initialized before any file operations are done.
}}


== Using ==
'''-par''' [[Arma 3 Startup Parameters|startup parameter]] lets to specify the file.


== Pre build 86060 ==
== Usage ==


=== Location ===
'''-par''' [[Arma 3 Startup Parameters|startup parameter]] allows to specify the file.
Inside game folder
Whether using {{HashLink|#Plain Text Format}} or {{HashLink|#.par Format}}, '''the file is preprocessed before parsing''', allowing C++ style comments and <tt>#define</tt>s to be used.
{{Feature|informative|Before {{arma2oa}} v1.60.86060, only the <tt>[[#.par Format|.par]]</tt> format was supported.}}
 
=== Windows ===


=== Naming ===
'''-par''' won't work being passed by cmd as variable to quotes; a specific format must be applied:
<syntaxhighlight lang="bat">
setlocal enableDelayedExpansion enableExtensions


Depending on game:
set v=!v! "-profiles=!cd!\acc"
* ArmA2.par
set v=!v! "-par=D:\par\startupParameters.txt"
* ArmA2OA.par
* TakeOnH.par


start "" "D:\arma3\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;
</syntaxhighlight>


=== Format ===
<pre>class Arg
{
    startupParameter="-startupParameter"
    startupParameter2="-startupParameter2=value1;value2"
};</pre>


=== Example ===
== Plain Text Format ==
<pre>class Arg
{
    nosplash="-nosplash";
    skipIntro="-skipIntro";
    world="-world=none";
    mod="-mod=Expansion;Expansion\beta;Expansion\beta\Expansion;@cwr2";
};</pre>


== Post build 86060 ==
* The file extension must be anything '''but''' <tt>.par</tt>, otherwise  the {{HashLink|#.par Format}} syntax will be assumed.
* The file can be located either inside or outside of the game folder for organizational purposes.
* The file must have one command line option per line.


=== Location ===
=== 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
Location can be defined with -par=parameterFileName startup parameter.
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 ===
=== 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.
 
<pre>-startupParameter
Whitespace is ignored.
<syntaxhighlight lang="cpp">
-startupParameter
-startupParameter2=value1;value2
-startupParameter2=value1;value2
MissionFileToOpenInTheEditor</pre>
MissionFileToOpenInTheEditor
</syntaxhighlight>


=== Example ===
=== Example ===
<pre>-nosplash
 
<syntaxhighlight lang="cpp">
-nosplash
-skipIntro
-skipIntro
-world=none
-world=none
-mod=Expansion;Expansion\beta;Expansion\beta\Expansion;@cwr2
-mod=Expansion;Expansion\beta;Expansion\beta\Expansion;@cwr2
"c:\arma2\Users\USERNAME\missions\MissionName.Desert_E\mission.sqm"</pre>
"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);
</syntaxhighlight>
{{Feature|informative|''(not sure that this quoted line will work (most won't), but patches with spaces without the quotes, and quoted '''-mod''''s patches will)''}}
 
 
== .par Format ==
 
{{Feature|warning|The <tt>.PAR</tt> file extension is apparently no longer read correctly on a dedicated server.}}
 
=== Location ===
 
At game directory's root.
 
=== Naming ===
 
{| class="wikitable" style="text-align: center"
! {{arma2}} !! {{arma2oa}} !! {{tkoh}}
|-
| <tt>ArmA2.par</tt> || <tt>ArmA2OA.par</tt> || <tt>TakeOnH.par</tt>
|}
 
=== Format ===
 
<syntaxhighlight lang="cpp">
class Arg
{
startupParameter="-startupParameter"
startupParameter2="-startupParameter2=value1;value2"
};
</syntaxhighlight>
 
=== Example ===
 
<syntaxhighlight lang="cpp">
class Arg
{
nosplash="-nosplash";
skipIntro="-skipIntro";
world="-world=none";
mod="-mod=Expansion;Expansion\beta;Expansion\beta\Expansion;@cwr2";
};
</syntaxhighlight>
 


== External links ==
== External links ==


{{ExternalLink|link= http://dev-heaven.net/issues/26103|text= Feature is discussed here by Suma}}
* {{ExternalLink|link= https://web.archive.org/web/20151114132158/http://dev.withsix.com/issues/26103|text= Feature is discussed here by Suma}}
 


[[Category:Startup_Parameters]]
[[Category:Startup Parameters]]

Revision as of 17:46, 27 July 2021

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

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.


Usage

-par startup parameter allows to specify the file. Whether using Plain Text Format or .par Format, the file is preprocessed before parsing, allowing C++ style comments and #defines to be used.

Before Arma 2: Operation Arrowhead v1.60.86060, only the .par format was supported.

Windows

-par won't work being passed by cmd as variable to quotes; a specific format must be applied:

setlocal enableDelayedExpansion enableExtensions

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

start "" "D:\arma3\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;


Plain Text Format

  • The file extension must be anything but .par, otherwise the .par Format syntax will be assumed.
  • The file can be located either inside or outside of the game folder for organizational purposes.
  • The file must have one command line option per line.

Location

Location can be defined with -par=parameterFileName startup parameter.

Format

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"
(not sure that this quoted line will work (most won't), but patches with spaces without the quotes, and quoted -mod's patches will)


.par Format

The .PAR file extension is apparently no longer read correctly on a dedicated server.

Location

At game directory's root.

Naming

Arma 2 Arma 2: Operation Arrowhead Take On Helicopters
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";
};


External links