Difference between revisions of "configFile"
Jump to navigation
Jump to search
Dr Eyeball (talk | contribs) m (see also: other config files) |
Lou Montana (talk | contribs) m (Text replacement - "{{Command " to "{{RV|type=command ") |
||
(45 intermediate revisions by 12 users not shown) | |||
Line 1: | Line 1: | ||
− | {{ | + | {{RV|type=command |
− | |||
− | | | + | | arma1 |
− | | | + | |gr1= Config |
− | |||
− | | | + | |1.00 |
− | |||
− | | [[Config]] | + | | Return root of config entries hierarchy.<br> |
+ | See [[AllInOne Config]] for a full config extract as example. | ||
− | | [[Config]] | + | | [[Config]] <nowiki>=</nowiki> '''configFile''' |
− | |||
− | | [[ | + | | [[Config]] |
+ | |x1= <code>_isMyClassActive = [[isClass]] ([[configFile]] / "CfgPatches" / "MyClass");</code> | ||
+ | |||
+ | | [[configClasses]], [[configProperties]], [[missionConfigFile]], [[campaignConfigFile]], [[config/name]], [[config greater greater name|config >> name]], [[configName]], [[count]], [[getArray]], [[getText]], [[getNumber]], [[inheritsFrom]], [[isArray]], [[isClass]], [[isNumber]], [[isText]], [[select]], [[configHierarchy]], [[getMissionConfigValue]], [[configSourceAddonList]] | ||
}} | }} | ||
− | |||
<dl class="command_description"> | <dl class="command_description"> | ||
<!-- Note Section BEGIN --> | <!-- Note Section BEGIN --> | ||
− | + | <dd class="notedate">Posted on Jul 19, 2014 - 20:08 | |
+ | <dt class="note">[[User:ffur2007slx2_5|ffur2007slx2_5]]<dd class="note"> | ||
+ | (ArmA3 1.24) It is recommended to use [[configClasses]] instead of [[BIS_fnc_getCfgSubClasses]] and [[BIS_fnc_uniqueClasses]] on subclasses collection or conditional selection. | ||
+ | <code> | ||
+ | _faces = "[[true]]" [[configClasses]] ([[configFile]] >> "Cfgfaces"); | ||
+ | //same as: _faces = (configfile >> "CfgFaces") [[call]] [[BIS_fnc_getCfgSubClasses]]; | ||
+ | </code> | ||
+ | <code> | ||
+ | //Extract all animals: | ||
+ | animals = "(([[configName]] _x) [[isKindOf]] 'animal')" [[configClasses]] ([[configFile]] >> "CfgVehicles"); | ||
+ | /*same as: | ||
+ | aniamls = []; | ||
+ | [([[configFile]] >> "CfgVehicles"),{ | ||
+ | [[if]] (([[configName]] _this) [[isKindOf]] “animal”) [[then]] { | ||
+ | animals [[set]] [<nowiki/>[[count]] animals, _this] | ||
+ | } | ||
+ | } | ||
+ | ] [[call]] [[BIS_fnc_uniqueClasses]];*/ | ||
+ | </code> | ||
+ | Return nested subclasses, currently still [[BIS_fnc_returnChildren]] | ||
+ | <code> | ||
+ | //Return all nested config classes.<br> | ||
+ | [([[configFile]] >> "CfgFaces"),1, [[true]], [[true]] ] [[call]] [[BIS_fnc_returnChildren]]; | ||
+ | </code> | ||
<!-- Note Section END --> | <!-- Note Section END --> | ||
</dl> | </dl> | ||
− | |||
[[Category:Scripting Commands|CONFIGFILE]] | [[Category:Scripting Commands|CONFIGFILE]] | ||
− | + | {{GameCategory|arma1|Scripting Commands}} | |
− | + | ||
− | + | {{GameCategory|arma2|Scripting Commands}} | |
− | + | {{GameCategory|arma3|Scripting Commands}} | |
+ | {{GameCategory|tkoh|Scripting Commands}} |
Latest revision as of 22:59, 22 January 2021
Hover & click on the images for descriptions
Description
- Description:
- Return root of config entries hierarchy.
See AllInOne Config for a full config extract as example.
Syntax
Examples
- Example 1:
_isMyClassActive = isClass (configFile / "CfgPatches" / "MyClass");
Additional Information
- See also:
- configClassesconfigPropertiesmissionConfigFilecampaignConfigFileconfig/nameconfig >> nameconfigNamecountgetArraygetTextgetNumberinheritsFromisArrayisClassisNumberisTextselectconfigHierarchygetMissionConfigValueconfigSourceAddonList
- Groups:
- Config
Notes
- Posted on Jul 19, 2014 - 20:08
- ffur2007slx2_5
-
(ArmA3 1.24) It is recommended to use configClasses instead of BIS_fnc_getCfgSubClasses and BIS_fnc_uniqueClasses on subclasses collection or conditional selection.
_faces = "true" configClasses (configFile >> "Cfgfaces"); //same as: _faces = (configfile >> "CfgFaces") call BIS_fnc_getCfgSubClasses;
//Extract all animals: animals = "((configName _x) isKindOf 'animal')" configClasses (configFile >> "CfgVehicles"); /*same as: aniamls = []; [(configFile >> "CfgVehicles"),{ if ((configName _this) isKindOf “animal”) then { animals set [count animals, _this] } } ] call BIS_fnc_uniqueClasses;*/
Return nested subclasses, currently still BIS_fnc_returnChildren//Return all nested config classes.
[(configFile >> "CfgFaces"),1, true, true ] call BIS_fnc_returnChildren;