{"name":"difficultyEnabled","title":"difficultyEnabled","type":"command","url":"https://community.bistudio.com/wiki/difficultyEnabled","revid":348496,"updated":"2023-11-08T13:01:31Z","groups":["Difficulty"],"status":"ok","games":{"arma1":"1.05","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.05","arma3_since":"0.50","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).","syntaxes":[{"syntax":"difficultyEnabled flagName","params":[{"name":"flagName","type":"String","description":"difficulty flag name. Following values are available:\n\n- 3rdPersonView\n- armor\n- autoAim\n- autoGuideAT\n- autoSpot\n- autoTrimEnabled\n- cameraShake\n- clockIndicator\n- deathMessages\n- enemyTag\n- extendetInfoType\n- friendlyTag\n- hud\n- hudGroupInfo\n- hudPerm\n- hudWp\n- hudWpPerm\n- map\n- mineTag\n- netStats\n- roughLanding\n- stanceIndicator\n- stressDamageEnabled\n- unlimitedSaves\n- vonID\n- weaponCursor\n- windEnabled\n\n- 3rdPersonView\n- armor\n- autoSpot\n- autoGuideAT\n- autoAim\n- allowSeagull\n- clockIndicator\n- deathMessages\n- enemyTag\n- friendlyTag\n- hud\n- hudPerm\n- hudWp\n- hudWpPerm\n- map\n- netStats\n- suppressPlayer\n- tracers\n- realisticFatigue\n- ultraAI\n- unlimitedSaves\n- weaponCursor","type_expr":"String"}],"returns":{"type":"Boolean","type_expr":"Boolean"},"form":"unary","right":{"text":"flagName"}}],"examples":[{"code":["hint str (difficultyEnabled \"armor\");"]},{"text":"List current difficulty settings:\n\n```sqf\ncall {\n    private [\"_diff\", \"_cfg\", \"_flags\", \"_res\"];\n    _diff = [];\n    _cfg = configFile >> \"CfgDifficulties\";\n    {\n        _flags = _cfg >> configName _x >> \"Flags\";\n        for \"_i\" from 0 to count _flags - 1 do {\n            _diff pushBack configName (_flags select _i);\n        };\n    } forEach (\"true\" configClasses _cfg);\n    _diff = _diff arrayIntersect _diff;\n    _diff sort true;\n    _res = text \"\";\n    {\n        _res = composeText [_res, parseText format [\n            \"<t align='left'>%1 - %2</t>\",\n            _x,\n            [0, 1] select difficultyEnabled _x\n        ], lineBreak];\n    } forEach _diff;\n    hint _res;\n};\n```","code":["call {\n\tprivate [\"_diff\", \"_cfg\", \"_flags\", \"_res\"];\n\t_diff = [];\n\t_cfg = configFile >> \"CfgDifficulties\";\n\t{\n\t\t_flags = _cfg >> configName _x >> \"Flags\";\n\t\tfor \"_i\" from 0 to count _flags - 1 do {\n\t\t\t_diff pushBack configName (_flags select _i);\n\t\t};\n\t} forEach (\"true\" configClasses _cfg);\n\t_diff = _diff arrayIntersect _diff;\n\t_diff sort true;\n\t_res = text \"\";\n\t{\n\t\t_res = composeText [_res, parseText format [\n\t\t\t\"<t align='left'>%1 - %2</t>\", \n\t\t\t_x, \n\t\t\t[0, 1] select difficultyEnabled _x\n\t\t], lineBreak];\n\t} forEach _diff;\n\thint _res;\n};"]}],"multiplayer":"This command checks the difficulty flags of the computer (client/server) where it is executed.\n\n> [!NOTE]\n> This command is **deprecated since Arma 3 v1.58**. Since this version it always returns false. Use difficultyOption instead.\n>\n> See Arma 3 Difficulty Overhaul for further details.\n>\n> - Stress damage is a separate difficulty setting. There are two dedicated commands for it:\n>   - enableStressDamage\n>   - isStressDamageEnabled\n> - Auto trim is also a separate difficulty setting. There are also two dedicated commands for it:\n>   - enableAutoTrimRTD\n>   - isAutoTrimOnRTD","see_also":["difficultyOption","difficulty","difficultyEnabledRTD","Arma 3: Difficulty Settings"]}