difficultyEnabled: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Text replacement - "(\|[pr][0-9]+ *= *[^-]+) *- *D([a-z])" to "$1 - d$2")
 
(51 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Command|= Comments
{{RV|type=command
____________________________________________________________________________________________


| arma |= Game name
|game1= arma1
|version1= 1.05


|1.05|= Game version
|game2= arma2
____________________________________________________________________________________________
|version2= 1.00


| Checks specific difficulty settings of the current user. Difficulty flag names can be found in the [[server.armaprofile|ArmA profile]] file under class Difficulties/xxx/Flags (xxx being regular or veteran).
|game3= arma2oa
|version3= 1.50


<br><br>'''Note:''' stress damage for some reason is a separate difficulty so <tt>[[difficultyEnabled]] "stressDamageEnabled"</tt> might not return correct set value. There are however 2 dedicated commands for it:
|game4= tkoh
* [[enableStressDamage]]
|version4= 1.00
* [[isStressDamageEnabled]] |= Description
____________________________________________________________________________________________


| '''difficultyEnabled''' flagName |= Syntax
|game5= arma3
|version5= 0.50


|p1= flagName: [[String]] - difficulty flag name |= Parameter 1
|gr1= Difficulty


| [[Boolean]] |= Return value
|descr= Checks specific difficulty settings of the current user. Difficulty flag names can be found in the [[server.armaprofile|ArmA profile]] file under class Difficulties/xxx/Flags (xxx being regular or veteran).
____________________________________________________________________________________________
 
|x1= <code>[[hint]] [[str]] ([[difficultyEnabled]] "armor");</code>  |= Example 1


|x2= List current difficulty settings:
|mp= This command checks the difficulty flags of the computer (client/server) where it is executed.
<code>[[call]] {
[[private]] ["_diff", "_cfg", "_flags", "_res"];
_diff <nowiki>=</nowiki> [];
_cfg <nowiki>=</nowiki> [[configFile]] >> "CfgDifficulties";
{
_flags <nowiki>=</nowiki> _cfg >> [[configName]] _x >> "Flags";
[[for]] "_i" [[from]] 0 [[to]] [[count]] _flags - 1 [[do]] {
_diff [[pushBack]] [[configName]] (_flags [[select]] _i);
};
} [[forEach]] ("true" [[configClasses]] _cfg);
_diff <nowiki>=</nowiki> _diff [[arrayIntersect]] _diff;
_diff [[sort]] [[true]];
_res <nowiki>=</nowiki> [[text]] "";
{
_res <nowiki>=</nowiki> [[composeText]] [_res, [[parseText]] [[format]] [
"<t align<nowiki>=</nowiki>'left'>%1 - %2</t>",
_x,
[0, 1] [[select]] [[difficultyEnabled]] _x
], [[lineBreak]]];
} [[forEach]] _diff;
[[hint]] _res;
};</code>|=
____________________________________________________________________________________________
 
| [[difficulty]], [[difficultyEnabledRTD]], [[Arma 3 Difficulty Menu]] |= See also


{{Feature|arma3|
This command is '''deprecated since {{arma3}} v1.58'''. Since this version it always returns false. Use [[difficultyOption]] instead.
See [[Arma 3: Difficulty Settings#Difficulty_Overhaul|Arma 3 Difficulty Overhaul]] for further details.
* Stress damage is a separate difficulty setting. There are two dedicated commands for it:
** [[enableStressDamage]]
** [[isStressDamageEnabled]]
* Auto trim is also a separate difficulty setting. There are also two dedicated commands for it:
** [[enableAutoTrimRTD]]
** [[isAutoTrimOnRTD]]
}}
}}


<h3 style="display:none">Notes</h3>
|s1= [[difficultyEnabled]] flagName
<dl class="command_description">


<!-- CONTINUE Notes -->
|p1= flagName: [[String]] - difficulty flag name. Following values are available:<br>
<dd class="notedate">Posted on June 29, 2015 - 23:20 (UTC)</dd>
<spoiler text="Arma 3 Flags">
<dt class="note">[[User:Killzone Kid|Killzone Kid]]</dt>
{{Columns|5|
<dd class="note">
Arma 3 Flags:
<div style="-webkit-column-count:5;-moz-column-count:5;column-count:5;margin-top:1em;">
* 3rdPersonView
* 3rdPersonView
* armor
* armor
Line 88: Line 65:
* weaponCursor
* weaponCursor
* windEnabled
* windEnabled
</div>
}}
 
</spoiler>
<dd class="notedate">
<spoiler text="Arma 2 Flags">
<dt class="note">'''[[User:Crowe|Crowe]]'''
{{Columns|5|
<dd class="note">Possible Values for Arma 2:
<div style="-webkit-column-count:5;-moz-column-count:5;column-count:5;margin-top:1em;">
* 3rdPersonView
* 3rdPersonView
* armor
* armor
Line 116: Line 91:
* unlimitedSaves
* unlimitedSaves
* weaponCursor
* weaponCursor
</div>
}}
<!-- Note Section END -->
</spoiler>
</dl>


<h3 style="display:none">Bottom Section</h3>
|r1= [[Boolean]]


[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
|x1= <sqf>hint str (difficultyEnabled "armor");</sqf>
[[Category:Scripting Commands ArmA|{{uc:{{PAGENAME}}}}]]
 
[[Category:Scripting Commands ArmA2|{{uc:{{PAGENAME}}}}]]
|x2= List current difficulty settings:
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
<sqf>
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
call {
[[Category:Command_Group:_System_Commands|{{uc:{{PAGENAME}}}}]]
private ["_diff", "_cfg", "_flags", "_res"];
_diff = [];
_cfg = configFile >> "CfgDifficulties";
{
_flags = _cfg >> configName _x >> "Flags";
for "_i" from 0 to count _flags - 1 do {
_diff pushBack configName (_flags select _i);
};
} forEach ("true" configClasses _cfg);
_diff = _diff arrayIntersect _diff;
_diff sort true;
_res = text "";
{
_res = composeText [_res, parseText format [
"<t align='left'>%1 - %2</t>",
_x,
[0, 1] select difficultyEnabled _x
], lineBreak];
} forEach _diff;
hint _res;
};
</sqf>
 
|seealso= [[difficultyOption]] [[difficulty]] [[difficultyEnabledRTD]] [[Arma 3: Difficulty Settings]]
}}

Latest revision as of 14:01, 8 November 2023

Hover & click on the images for description

Description

Description:
Checks specific difficulty settings of the current user. Difficulty flag names can be found in the ArmA profile file under class Difficulties/xxx/Flags (xxx being regular or veteran).
Multiplayer:
This command checks the difficulty flags of the computer (client/server) where it is executed.
Arma 3
This command is deprecated since Arma 3 v1.58. Since this version it always returns false. Use difficultyOption instead.

See Arma 3 Difficulty Overhaul for further details.

Groups:
Difficulty

Syntax

Syntax:
difficultyEnabled flagName
Parameters:
flagName: String - difficulty flag name. Following values are available:
  • 3rdPersonView
  • armor
  • autoAim
  • autoGuideAT
  • autoSpot
  • autoTrimEnabled
  • cameraShake
  • clockIndicator
  • deathMessages
  • enemyTag
  • extendetInfoType
  • friendlyTag
  • hud
  • hudGroupInfo
  • hudPerm
  • hudWp
  • hudWpPerm
  • map
  • mineTag
  • netStats
  • roughLanding
  • stanceIndicator
  • stressDamageEnabled
  • unlimitedSaves
  • vonID
  • weaponCursor
  • windEnabled
  • 3rdPersonView
  • armor
  • autoSpot
  • autoGuideAT
  • autoAim
  • allowSeagull
  • clockIndicator
  • deathMessages
  • enemyTag
  • friendlyTag
  • hud
  • hudPerm
  • hudWp
  • hudWpPerm
  • map
  • netStats
  • suppressPlayer
  • tracers
  • realisticFatigue
  • ultraAI
  • unlimitedSaves
  • weaponCursor
Return Value:
Boolean

Examples

Example 1:
hint str (difficultyEnabled "armor");
Example 2:
List current difficulty settings:
call { private ["_diff", "_cfg", "_flags", "_res"]; _diff = []; _cfg = configFile >> "CfgDifficulties"; { _flags = _cfg >> configName _x >> "Flags"; for "_i" from 0 to count _flags - 1 do { _diff pushBack configName (_flags select _i); }; } forEach ("true" configClasses _cfg); _diff = _diff arrayIntersect _diff; _diff sort true; _res = text ""; { _res = composeText [_res, parseText format [ "<t align='left'>%1 - %2</t>", _x, [0, 1] select difficultyEnabled _x ], lineBreak]; } forEach _diff; hint _res; };

Additional Information

See also:
difficultyOption difficulty difficultyEnabledRTD Arma 3: Difficulty Settings

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note