Difference between revisions of "configFile"

From Bohemia Interactive Community
Jump to navigation Jump to search
(see also)
Line 19: Line 19:
| [[missionConfigFile]], [[campaignConfigFile]], [[config/name]], [[config greater greater name|config >> name]], [[configName]], [[count]], [[getArray]], [[getText]], [[getNumber]], [[inheritsFrom]], [[isArray]], [[isClass]], [[isNumber]], [[isText]], [[select]] |= See also
| [[configClasses]], [[missionConfigFile]], [[campaignConfigFile]], [[config/name]], [[config greater greater name|config >> name]], [[configName]], [[count]], [[getArray]], [[getText]], [[getNumber]], [[inheritsFrom]], [[isArray]], [[isClass]], [[isNumber]], [[isText]], [[select]] |= See also

Revision as of 01:09, 7 July 2014

-wrong parameter ("Arma") defined!-1.00
Hover & click on the images for description


Return root of config entries hierarchy.
See AllInOne Config for a full config extract as example.


Config = configFile
Return Value:


Example 1:
_isMyClassActive = isClass (configFile / "CfgPatches" / "MyClass");

Additional Information

See also:
configClassesmissionConfigFilecampaignConfigFileconfig/nameconfig >> nameconfigNamecountgetArraygetTextgetNumberinheritsFromisArrayisClassisNumberisTextselect


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


Posted on Apr 3, 2014 - 00:37
In ArmA3 ver 1.14 there’re several comfortable workarounds with configFile for collecting subclasses. As for traditional workaround like: (configfile >> "CfgFaces") call { private ["_classes"]; _classes = []; for "_i" from 0 to ((count _this) - 1) do { if (isClass (_this select _i)) then { _classes set [count _classes, configName (_this select _i)]; }; }; _classes }; //return: ["Default"……"O_Colonel"] 8 items Alternative recommended workaround by using: BIS fnc getCfgSubClasses e.g. (configfile >> "CfgFaces") call BIS_fnc_getCfgSubClasses //Same as traditional workaround Another powerful replacement is using BIS fnc returnChildren to collect grandchildren classes with desired level, e.g. [(configfile >> "CfgFaces"),1,true,true] call BIS_fnc_returnChildren; //Return all children faces with a total number at 68 And as for another advanced workaround for direct processing collected classes, use BIS fnc uniqueClasses. E.g. my_array = []; [(configfile >> "BombCrater"), { my_array set [count my_array,(_this select 2) call bis_fnc_getcfgdata] } ] call BIS_fnc_uniqueClasses; //return [[0,0,0],[0,0,0],[0,0,0]]

Bottom Section