trnapster 12 Posted December 23, 2013 Hi guys. Does anyone know how BIS_fnc_uniqueClasses is used (or what it actually does)? The Header: Author: Karel Moricky Description: Composes array of classes with unique param (based on returned value of passed code). If class inherits the param from parent, it's not listed. Parameter(s): 0: CONFIG - class which is searched 1: CODE - code executed on class, which is passed as _this Returns: ARRAY - classes in format [class,value] class: CONFIG - class with unique param value: ANY - value returned by the passed code for the given class For me the Description reads like it takes a class, modifies some parameters defined inside a code block and returns the modified class. I thought that's not possible. Anyways I haven't got it to work.... Share this post Link to post Share on other sites
Falsche9 11 Posted December 23, 2013 (edited) _ret = [ configfile >> "CfgVehicles" >> "I_Heli_light_03_F", {getText (configfile >> "CfgVehicles" >> "I_Heli_light_03_F" >> "displayName")} ] call BIS_fnc_uniqueClasses; copyToClipboard (str (_ret)); _ret: [[config.bin/CfgVehicles/I_Heli_light_03_base_F/SpeechVariants,"WY-55 Hellcat"],[config.bin/CfgVehicles/I_Heli_light_03_base_F/Sounds,"WY-55 Hellcat"],[config.bin/CfgVehicles/I_Heli_light_03_base_F/RenderTargets,"WY-55 Hellcat"],[config.bin/CfgVehicles/I_Heli_light_03_base_F/Armory,"WY-55 Hellcat"],[config.bin/CfgVehicles/I_Heli_light_03_base_F/Reflectors,"WY-55 Hellcat"],[config.bin/CfgVehicles/I_Heli_light_03_base_F/Exhausts,"WY-55 Hellcat"],[config.bin/CfgVehicles/I_Heli_light_03_base_F/MFD,"WY-55 Hellcat"],[config.bin/CfgVehicles/I_Heli_light_03_base_F/AnimationSources,"WY-55 Hellcat"],[config.bin/CfgVehicles/I_Heli_light_03_base_F/Damage,"WY-55 Hellcat"],[config.bin/CfgVehicles/I_Heli_light_03_base_F/Turrets,"WY-55 Hellcat"],[config.bin/CfgVehicles/Helicopter_Base_F/HitPoints,"WY-55 Hellcat"],[config.bin/CfgVehicles/Helicopter_Base_F/CamShake,"WY-55 Hellcat"],[config.bin/CfgVehicles/Helicopter_Base_F/Eventhandlers,"WY-55 Hellcat"],[config.bin/CfgVehicles/Helicopter/ViewPilot,"WY-55 Hellcat"],[config.bin/CfgVehicles/Helicopter/CargoSpec,"WY-55 Hellcat"],[config.bin/CfgVehicles/Helicopter/ViewOptics,"WY-55 Hellcat"],[config.bin/CfgVehicles/Helicopter/RotorLibHelicopterProperties,"WY-55 Hellcat"],[config.bin/CfgVehicles/Helicopter/DestructionEffects,"WY-55 Hellcat"],[config.bin/CfgVehicles/Air/MarkerLights,"WY-55 Hellcat"],[config.bin/CfgVehicles/Air/TransportItems,"WY-55 Hellcat"],[config.bin/CfgVehicles/AllVehicles/SquadTitles,"WY-55 Hellcat"],[config.bin/CfgVehicles/AllVehicles/NewTurret,"WY-55 Hellcat"],[config.bin/CfgVehicles/AllVehicles/ViewCargo,"WY-55 Hellcat"],[config.bin/CfgVehicles/AllVehicles/PilotSpec,"WY-55 Hellcat"],[config.bin/CfgVehicles/AllVehicles/SoundEvents,"WY-55 Hellcat"],[config.bin/CfgVehicles/All/NVGMarkers,"WY-55 Hellcat"],[config.bin/CfgVehicles/All/NVGMarker,"WY-55 Hellcat"],[config.bin/CfgVehicles/All/HeadLimits,"WY-55 Hellcat"],[config.bin/CfgVehicles/All/TransportWeapons,"WY-55 Hellcat"],[config.bin/CfgVehicles/All/TransportMagazines,"WY-55 Hellcat"],[config.bin/CfgVehicles/All/SoundEnvironExt,"WY-55 Hellcat"],[config.bin/CfgVehicles/All/SoundEquipment,"WY-55 Hellcat"],[config.bin/CfgVehicles/All/SoundGear,"WY-55 Hellcat"],[config.bin/CfgVehicles/All/SoundBreath,"WY-55 Hellcat"],[config.bin/CfgVehicles/All/SoundBreathSwimming,"WY-55 Hellcat"],[config.bin/CfgVehicles/All/SoundBreathInjured,"WY-55 Hellcat"],[config.bin/CfgVehicles/All/SoundHitScream,"WY-55 Hellcat"],[config.bin/CfgVehicles/All/SoundInjured,"WY-55 Hellcat"],[config.bin/CfgVehicles/All/SoundBreathAutomatic,"WY-55 Hellcat"],[config.bin/CfgVehicles/All/SoundDrown,"WY-55 Hellcat"],[config.bin/CfgVehicles/All/SoundChoke,"WY-55 Hellcat"],[config.bin/CfgVehicles/All/SoundRecovered,"WY-55 Hellcat"],[config.bin/CfgVehicles/All/SoundBurning,"WY-55 Hellcat"],[config.bin/CfgVehicles/All/PulsationSound,"WY-55 Hellcat"],[config.bin/CfgVehicles/All/SoundDrowning,"WY-55 Hellcat"],[config.bin/CfgVehicles/All/FxExplo,"WY-55 Hellcat"],[config.bin/CfgVehicles/All/GunFire,"WY-55 Hellcat"],[config.bin/CfgVehicles/All/GunClouds,"WY-55 Hellcat"],[config.bin/CfgVehicles/All/MGunClouds,"WY-55 Hellcat"]] Do not ask me what it means - no clue. Diagnostic function to see what information feeds to the class from the config tree? Edited December 23, 2013 by Falsche9 Share this post Link to post Share on other sites
Rydygier 1309 Posted December 23, 2013 It is not changing the config on-the-fly, that is impossible, unfortunatelly. As far, as I can see (I'm not config specialist) it lists unique (not inherited from parent class as is) "params" of passed class (if you open that heli class in editor's ConfigViewer, you'll see all these _ret entries listed there in form of "sub-classes" of that heli class). Second value in each resulting array entry is effect of operation done with given param using passed code (where param is provided as "_this"). In Falsche9's example passed code do not use _this for anything, so resulting value (string - displayName) is same all the time. Haven't idea atm, for what purpose all this is used. Diagnostics perhaps, as said, maybe something more, if it allows to run passed code with each "param"... IMHO seems rather like part of something bigger than thing designed as useful standalone. Someone dealing more with configs may know better. Share this post Link to post Share on other sites
trnapster 12 Posted December 23, 2013 Thanks for the info... Share this post Link to post Share on other sites