{"name":"configHierarchy","title":"configHierarchy","type":"command","url":"https://community.bistudio.com/wiki/configHierarchy","revid":378521,"updated":"2026-05-04T01:50:46Z","groups":["Config"],"status":"ok","games":{"arma3":"1.48"},"since":"arma3 1.48","arma3_since":"1.48","description":"Returns hierarchy of the given config class. Just like with inheritsFrom, only complete config classes are supported (before Arma 3 v2.14). Since Arma 3 v2.22, an alt syntax is added, which allows to return parents identical to BIS_fnc_returnParents (see Example 2)","syntaxes":[{"syntax":"configHierarchy config","params":[{"name":"config","type":"Config","description":"target config","type_expr":"Config"}],"returns":{"type":"Array of Configs","type_expr":"Array<Config>","description":"ordered from parent to child"},"form":"unary","right":{"text":"config"}},{"syntax":"configHierarchy [config, classesOnly, includeBases, reversedOrder, configNames]","since":"arma3 2.22","params":[{"name":"config","type":"Config","description":"target config","type_expr":"Config"},{"name":"classesOnly","type":"Boolean","description":"when true, only classes are included in output and not properties","type_expr":"Boolean"},{"name":"includeBases","type":"Boolean","description":"when true, returned parents will include base classes (see description)","type_expr":"Boolean"},{"name":"reversedOrder","type":"Boolean","description":"when true, the return order is from child to parent","type_expr":"Boolean"},{"name":"configNames","type":"Boolean","optional":true,"default":"false","description":"when true, the return is Array of Strings, when false - Array of Configs.","type_expr":"Boolean","text":"configNames: Boolean - (Optional) when true, the return is Array of Strings, when false - Array of Configs. Default: false"}],"returns":{"type":"Array of Configs or Strings","type_expr":"Array<Config | String>","description":"Strings represent config names"},"form":"unary","right":{"text":"[config, classesOnly, includeBases, reversedOrder, configNames]"}}],"examples":[{"code":["_hierarchy = configHierarchy (configFile >> \"CfgVehicles\" >> \"Car\");\n// Returns [bin\\config.bin, bin\\config.bin/CfgVehicles, bin\\config.bin/CfgVehicles/Car]"]},{"code":["_bis_fnc_returnParents = configHierarchy [configFile >> \"CfgVehicles\" >> \"Land_FirePlace_F\", true, true, true, true];\n// Returns [\"Land_FirePlace_F\",\"House_F\",\"House\",\"HouseBase\",\"NonStrategic\",\"Building\",\"Static\",\"All\"]"]}],"see_also":["configClasses","configProperties","missionConfigFile","campaignConfigFile","a / b","config greater greater name","configName","count","getArray","getText","getNumber","inheritsFrom","isArray","isClass","isNumber","isText","select","isKindOf","BIS_fnc_returnParents"]}