obrien979 4 Posted March 2, 2019 I am trying to work on a small project of gathering all of the Ammo classnames for each vehicle in my ARMA3 Library. Currently I am using the below code on the init field of my soldier, it works but it is time consuming switch back and forth between my text document and ARMA3. I was wondering if there is a quicker way to gather the information once I have placed all the vehicles I want to check in EDEN. Thank You this addAction["Check Ammo","_mags = magazinesAmmo cursorObject; copyToClipboard str _mags;"]; Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted March 2, 2019 Hello there obrien979 ! Everything is here : https://community.bistudio.com/wiki/Arma_3_CfgMagazines Share this post Link to post Share on other sites
obrien979 4 Posted March 2, 2019 Just now, GEORGE FLOROS GR said: Hello there obrien979 ! Everything is here : https://community.bistudio.com/wiki/Arma_3_CfgMagazines Yes Sir I have looked at that, however I wish to gather the information for mods as well 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted March 2, 2019 You can also then do this : GF_ARL_Magazines_array = ("getNumber (_x >> 'scope') isEqualTo 2 && getNumber (_x >> 'type') in [256,16,2*256,3*256,6*256]"configClasses (configFile >> "CfgMagazines")) apply {configName _x}; copyToClipboard str GF_ARL_Magazines_array; 1 Share this post Link to post Share on other sites
obrien979 4 Posted March 2, 2019 WOW! Well it worked, however now I have no idea which ammo goes with what. Browsing through the listing it appears it is mostly listing ammo for Soldiers, I dont see any Artillery, Tank or Mortar ammo in there. Also is it possible to add the display name of the vehicle/object to help better Identify which ammo goes with what thing? Thank You 1 Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted March 2, 2019 3 hours ago, obrien979 said: Also is it possible to add the display name of the vehicle/object to help better Identify which ammo goes with what thing? These are the soldiers magazines. I need to check more in order to do this and on right now i'm working with something , so if not someone else reply , i'll try if i remember to check about. In any case if the days are passing quote me to check this again. You can always check from the editor the configs. Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted March 2, 2019 I think with a little help of @pierremgi we can get this list ? Share this post Link to post Share on other sites
GEORGE FLOROS GR 4207 Posted March 2, 2019 I noticed that you have also a similar topic here : and it is also solved by Harzach. Spoiler On 3/21/2018 at 9:42 PM, Harzach said: _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. Share this post Link to post Share on other sites
Larrow 2822 Posted March 2, 2019 _fnc_getWeaponInfo = { params[ "_baseCfg", "_dataArray" ]; _turretMagazines = getArray( _baseCfg >> "magazines" ) call BIS_fnc_consolidateArray; { _x params[ "_weaponType" ]; private _index = _dataArray pushBack [ _weaponType, [] ]; { _x params[ "_magazineType" ]; _turretMagsIndex = _turretMagazines findIf{ ( _x select 0 ) == _magazineType }; if ( _turretMagsIndex > -1 ) then { _ammoCount = getNumber( configFile >> "CfgMagazines" >> ( _turretMagazines select _turretMagsIndex select 0 ) >> "count" ); private _nul = _dataArray select _index select 1 pushBack (( _turretMagazines select _turretMagsIndex ) + [ _ammoCount ] ); }; }forEach getArray( configFile >> "CfgWeapons" >> _weaponType >> "magazines" ); }forEach getArray( _baseCfg >> "weapons" ); }; _fnc_getTurretInfo = { params[ "_baseCfg", "_dataArray", "_turretPath" ]; private _index = _dataArray pushBack [ +_turretPath, configName _baseCfg, [] ]; [ _baseCfg, _dataArray select _index select 2 ] call _fnc_getWeaponInfo; private _turretIndex = count _turretPath; { _turretPath set [ _turretIndex, _forEachIndex ]; [ _x, _dataArray, _turretPath ] call _fnc_getTurretInfo; }forEach ( "true" configClasses( _baseCfg >> "turrets" )); }; //_vehicles = "_current = _x; getNumber( _current >> 'scope' ) == 2 && { { configname _current isKindOf _x }count[ 'LandVehicle', 'Ship', 'Air' ] > 0 }" configClasses( configFile >> "CfgVehicles" ); _vehicles = [ configFile >> "CfgVehicles" >> "B_MBT_01_cannon_F" ]; _vehicleWeapons = []; { private _nul = _vehicleWeapons pushBack configName _x; _index = _vehicleWeapons pushBack []; [ _x, _vehicleWeapons select _index, [] ] call _fnc_getTurretInfo; }forEach _vehicles; copyToClipboard str _vehicleWeapons; hint "Done!"; Which will return data in the format of... [ "B_MBT_01_cannon_F",[ //Vehicle [[],"B_MBT_01_cannon_F",[]], //turret path, turret name, weapon/mag info [[0],"MainTurret",[ //turret path, turret name ["cannon_120mm",[ //weapon ["24Rnd_120mm_APFSDS_shells_Tracer_Red",1,24], //magazine, mag count, ammo count ["12Rnd_120mm_HEAT_MP_T_Red",1,12], ["12Rnd_120mm_HE_shells_Tracer_Red",1,12] ]], ["LMG_coax",[ //weapon ["200Rnd_762x51_Belt_Red",20,200] //magazine, mag count, ammo count ]] ]], [[0,0],"CommanderOptics",[ //turret path, turret name ["SmokeLauncher",[ //weapon ["SmokeLauncherMag",1,2] //magazine, mag count, ammo count ]] ]] ] ] 2 Share this post Link to post Share on other sites
obrien979 4 Posted March 4, 2019 @GEORGE FLOROS GR thanks for digging up that old post of mine. I thought I had done this before and was looking around on my computer to see if I had maybe saved it somewhere. Thanks again 1 Share this post Link to post Share on other sites