Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×

Recommended Posts

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

Share this post


Link to post
Share on other sites
4 minutes ago, Harzach said:

It will return info on the vehicle you call it on.

Yeah that works for individual vehicles perfectly. 

 

However I am looking for a way to pull the same data from the CFG File for all vehicle classes or types (tanks, trucks, etc).

Share this post


Link to post
Share on other sites

if you want the same list as in config viewer:


 

_arr= ((" getNumber (_x >> 'scope') == 2" configclasses (configfile >> "cfgmagazines")) apply {configname _x});
_arr sort true // alphabetical order

 

  • Thanks 1

Share this post


Link to post
Share on other sites
23 hours ago, Harzach said:

m32gfKT.jpg

 

HN63rPK.jpg

 

kaCP8Dp.jpg

Thats great if I wanna look at each individual magazine type. I am looking for a way to pull the types of magazines that are Default loaded on vehicles from the start. Objective is to be able to quick reference a RHS or CUP vehicles loadout prior to placing on the map so That I can have an idea as to what firepower I have. 

 

Thanks

Share this post


Link to post
Share on other sites
11 minutes ago, Harzach said:

Then the method I posted will be what you want.

COuld it be modified to also pull the display name for the vehicle and display it with the magazine listing?

Share this post


Link to post
Share on other sites
On 3/21/2018 at 8: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.

This is perfect!! It works great and will do just what I need.  Thanks for your help

Share this post


Link to post
Share on other sites

×