Is there a way to pull all the magazine classnames for every vehicle and weapon from the CFG file? I know that BIStudio has a listing on their Wiki page, but I am looking to do the same for the addons that I have.
Thanks In Advance
Brandon
_allMags = [];
_sep = " ||| ";
{_magsArray = magazinesAllTurrets _x;
_name = getText (configFile >> "cfgVehicles" >> typeOf _x >> "displayName");
_allMags pushback _sep;
_allMags pushback _name;
{_mag = _x select 0;
_allMags pushback _mag;
} forEach _magsArray;
} forEach (allMissionObjects "LandVehicle");
copyToClipboard str _allMags;
I placed an Ifrit GMG, Ifrit HMG and Qilin (Armed) on the map. Output was:
[" ||| ","Ifrit GMG","SmokeLauncherMag","96Rnd_40mm_G_belt"," ||| ","Ifrit HMG","SmokeLauncherMag","200Rnd_127x99_mag_Tracer_Green","200Rnd_127x99_mag_Tracer_Green"," ||| ","Qilin (Armed)","500Rnd_65x39_Belt_Tracer_Green_Splash","500Rnd_65x39_Belt_Tracer_Green_Splash","500Rnd_65x39_Belt_Tracer_Green_Splash"]
For readability (maybe?) I added a separator before each new vehicle displayName. This version does not exclude duplicates in favor of showing exactly which magazines each vehicle holds.