{"name":"Startup Parameters Config File","title":"Startup Parameters Config File","type":"topic","url":"https://community.bistudio.com/wiki/Startup_Parameters_Config_File","revid":364391,"updated":"2024-05-13T10:51:55Z","aliases":[],"markdown":"The startup parameters config file can be used to put startup parameters in, instead of specifying them in a shortcut/commandline.\n\n> [!IMPORTANT]\n> Low level parameters are NOT supported:\n>\n> .par file does not (and will not) support some low level parameters, namely:\n>\n> - -cpuCount\n> - -malloc\n> - -exThreads\n> - -maxMem\n> - -profiles (confirmed on Arma 3 version 1.66.139586, options does not work from parameter file)\n> - -debug\n>\n> The reason is those need to be initialized before any file operations are done.\n\n### Usage\n\n**-par** startup parameter allows to specify the file.\nWhether using Plain Text Format or .par Format, **the file is preprocessed before parsing**, allowing C++ style comments and `#define`s to be used.\n\n> [!NOTE]\n> Before Arma 2: Operation Arrowhead v1.60.86060, only the `.par` format was supported.\n\n#### Windows\n\n**-par** won't work being passed by cmd as variable to quotes; a specific format must be applied:\n\n```bat\nsetlocal enableDelayedExpansion enableExtensions\n\nset v=!v! \"-profiles=!cd!\\acc\"\nset v=!v! \"-par=D:\\par\\startupParameters.txt\"\n\nstart \"\" \"D:\\arma3\\arma3.exe\" !v!    &rem need \"start\" for closing cmd window;\ntimeout /t 1                        &rem need for keeping game window (starting from logo) foreground after cmd window close;\n```\n\n### Plain Text Format\n\n- The file extension must be anything **but** `.par`, otherwise the .par Format syntax will be assumed.\n- The file can be located either inside or outside of the game folder for organizational purposes.\n- The file must have one command line option per line.\n\n#### Location\n\nLocation can be defined with -par=parameterFileName startup parameter.\n\n#### Format\n\nWhitespace is ignored.\n\n```cpp\n-startupParameter\n-startupParameter2=value1;value2\nMissionFileToOpenInTheEditor\n```\n\n#### Examples\n\n##### Simple Example\n\n```cpp\n-nosplash\n-skipIntro\n-world=none\n-mod=Expansion;Expansion\\beta;Expansion\\beta\\Expansion;@cwr2\n\"C:\\arma2\\Users\\USERNAME\\missions\\MissionName.Desert_E\\mission.sqm\"\n```\n\n##### Host and Client\n\nThe following example allows you to launch two instances of the game with common startup parameters. One for hosting from Eden and another one as a client to test for locality issues.\n\n**base.txt**\n\n```cpp\n-mod=\"!Workshop\\@Mod1;!Workshop\\@Mod2\"\n-skipIntro\n-noSplash\n-filePatching\n-noSound\n-noLand\n```\n\n**host.txt**\n\n```cpp\n#include \"base.txt\"\n\"C:\\Users\\USERNAME\\Documents\\Arma 3\\missions\\BIKI.VR\"\n```\n\n**client.txt**\n\n```cpp\n#include \"base.txt\"\n-name=ClientTest\n```\n\n### .par Format\n\n> [!WARNING]\n> The `.PAR` file extension is apparently no longer read correctly on a dedicated server.\n\n#### Location\n\nAt game directory's root.\n\n#### Naming\n\n| Arma 2 | Arma 2: Operation Arrowhead | Take On Helicopters |\n|---|---|---|\n| `ArmA2.par` | `ArmA2OA.par` | `TakeOnH.par` |\n\n#### Format\n\n```cpp\nclass Arg\n{\n    startupParameter=\"-startupParameter\"\n    startupParameter2=\"-startupParameter2=value1;value2\"\n};\n```\n\n#### Example\n\n```cpp\nclass Arg\n{\n    nosplash=\"-nosplash\";\n    skipIntro=\"-skipIntro\";\n    world=\"-world=none\";\n    mod=\"-mod=Expansion;Expansion\\beta;Expansion\\beta\\Expansion;@cwr2\";\n};\n```\n\n### External links\n\n- *Feature is discussed here by Suma* (dead link)","sections":[{"heading":null,"level":1,"markdown":"The startup parameters config file can be used to put startup parameters in, instead of specifying them in a shortcut/commandline.\n\n> [!IMPORTANT]\n> Low level parameters are NOT supported:\n>\n> .par file does not (and will not) support some low level parameters, namely:\n>\n> - -cpuCount\n> - -malloc\n> - -exThreads\n> - -maxMem\n> - -profiles (confirmed on Arma 3 version 1.66.139586, options does not work from parameter file)\n> - -debug\n>\n> The reason is those need to be initialized before any file operations are done."},{"heading":"Usage","level":3,"markdown":"**-par** startup parameter allows to specify the file.\nWhether using Plain Text Format or .par Format, **the file is preprocessed before parsing**, allowing C++ style comments and `#define`s to be used.\n\n> [!NOTE]\n> Before Arma 2: Operation Arrowhead v1.60.86060, only the `.par` format was supported."},{"heading":"Windows","level":4,"markdown":"**-par** won't work being passed by cmd as variable to quotes; a specific format must be applied:\n\n```bat\nsetlocal enableDelayedExpansion enableExtensions\n\nset v=!v! \"-profiles=!cd!\\acc\"\nset v=!v! \"-par=D:\\par\\startupParameters.txt\"\n\nstart \"\" \"D:\\arma3\\arma3.exe\" !v!    &rem need \"start\" for closing cmd window;\ntimeout /t 1                        &rem need for keeping game window (starting from logo) foreground after cmd window close;\n```"},{"heading":"Plain Text Format","level":3,"markdown":"- The file extension must be anything **but** `.par`, otherwise the .par Format syntax will be assumed.\n- The file can be located either inside or outside of the game folder for organizational purposes.\n- The file must have one command line option per line."},{"heading":"Location","level":4,"markdown":"Location can be defined with -par=parameterFileName startup parameter."},{"heading":"Format","level":4,"markdown":"Whitespace is ignored.\n\n```cpp\n-startupParameter\n-startupParameter2=value1;value2\nMissionFileToOpenInTheEditor\n```"},{"heading":"Examples","level":4,"markdown":""},{"heading":"Simple Example","level":5,"markdown":"```cpp\n-nosplash\n-skipIntro\n-world=none\n-mod=Expansion;Expansion\\beta;Expansion\\beta\\Expansion;@cwr2\n\"C:\\arma2\\Users\\USERNAME\\missions\\MissionName.Desert_E\\mission.sqm\"\n```"},{"heading":"Host and Client","level":5,"markdown":"The following example allows you to launch two instances of the game with common startup parameters. One for hosting from Eden and another one as a client to test for locality issues.\n\n**base.txt**\n\n```cpp\n-mod=\"!Workshop\\@Mod1;!Workshop\\@Mod2\"\n-skipIntro\n-noSplash\n-filePatching\n-noSound\n-noLand\n```\n\n**host.txt**\n\n```cpp\n#include \"base.txt\"\n\"C:\\Users\\USERNAME\\Documents\\Arma 3\\missions\\BIKI.VR\"\n```\n\n**client.txt**\n\n```cpp\n#include \"base.txt\"\n-name=ClientTest\n```"},{"heading":".par Format","level":3,"markdown":"> [!WARNING]\n> The `.PAR` file extension is apparently no longer read correctly on a dedicated server."},{"heading":"Location","level":4,"markdown":"At game directory's root."},{"heading":"Naming","level":4,"markdown":"| Arma 2 | Arma 2: Operation Arrowhead | Take On Helicopters |\n|---|---|---|\n| `ArmA2.par` | `ArmA2OA.par` | `TakeOnH.par` |"},{"heading":"Format","level":4,"markdown":"```cpp\nclass Arg\n{\n    startupParameter=\"-startupParameter\"\n    startupParameter2=\"-startupParameter2=value1;value2\"\n};\n```"},{"heading":"Example","level":4,"markdown":"```cpp\nclass Arg\n{\n    nosplash=\"-nosplash\";\n    skipIntro=\"-skipIntro\";\n    world=\"-world=none\";\n    mod=\"-mod=Expansion;Expansion\\beta;Expansion\\beta\\Expansion;@cwr2\";\n};\n```"},{"heading":"External links","level":3,"markdown":"- *Feature is discussed here by Suma* (dead link)"}],"categories":["Startup Parameters"],"groups":["Multiplayer and Server"]}