Difficulty Settings – Arma 3 Talk
Killzone Kid (talk | contribs) (→Autogen config code: new section) |
Killzone Kid (talk | contribs) mNo edit summary |
||
Line 1: | Line 1: | ||
== Autogen config code == | == Autogen config code == | ||
<code> | <code>"debug_console" callExtension format ["class Difficulties"]; | ||
"debug_console" callExtension format ["class Difficulties"]; | |||
"debug_console" callExtension format ["{"]; | "debug_console" callExtension format ["{"]; | ||
_cfg = configFile >> "CfgDifficulties"; | _cfg = configFile >> "CfgDifficulties"; | ||
Line 44: | Line 42: | ||
"debug_console" callExtension format [" };"]; | "debug_console" callExtension format [" };"]; | ||
} forEach ("true" configClasses _cfg); | } forEach ("true" configClasses _cfg); | ||
"debug_console" callExtension format ["};"]; | "debug_console" callExtension format ["};"];</code> | ||
</code> |
Revision as of 12:49, 30 June 2015
Autogen config code
"debug_console" callExtension format ["class Difficulties"];
"debug_console" callExtension format ["{"];
_cfg = configFile >> "CfgDifficulties";
{
_class = configName _x;
"debug_console" callExtension format [" class %1", _class];
"debug_console" callExtension format [" {"];
"debug_console" callExtension format [" class Flags"];
"debug_console" callExtension format [" {"];
_flags = _cfg >> _class >> "Flags";
_flagNames = [];
for "_i" from 0 to count _flags - 1 do {
_flag = _flags select _i;
_flagNames pushBack configName _flag;
};
_flagNames sort true;
{
getArray (_flags >> _x) params ["_current", "_canChange"];
if (_canChange == 1) then {
"debug_console" callExtension format [
" %1 = %2;",
_x, _current];
} else {
"debug_console" callExtension format [
" /* %1 = %2; - cannot be changed */",
_x, _current];
}
} forEach _flagNames;
"debug_console" callExtension format [" };"];
{
"debug_console" callExtension format [
" %1 = %2;",
_x, getNumber(_cfg >> _class >> _x)];
} foreach [
"precisionEnemy",
"precisionFriendly",
"skillEnemy",
"skillFriendly"
];
"debug_console" callExtension format [" };"];
} forEach ("true" configClasses _cfg);
"debug_console" callExtension format ["};"];