Justin Self 2 Posted July 24, 2019 I am working on a spreadsheet of all stock and mod weapons that I have. Unfortunately there are tons of them, and typing in all these values by hand is quite a pain. I figured there has to be a way I can extract data from converted config.bin files for each weapon. (Spreadsheet would parse through the *.cpp files -- somehow - I don't know how yet). So where I am stuck is... how do I find these values in the config.bin/.cpp (converted) file for example the Khaybar? The values I have used in the spreadsheet are screenshotted, using the ACE virtual arsenal. Where is Range defined? Where is Impact defined? Where is MIL and MOA accuracy defined? Where is weight kg/lbs defined? Where is the ammo type defined? Where is the muzzle velocity in meters/second and feet/second defined? Where is barrel twist and length defined? displayName="$STR_A3_CfgWeapons_arifle_Katiba_F0"; gives me the weapon name, but not in a user-friendly way. How can I find that? Lastly, do any of these numbers have to be multiplied by another number to get the "true" representative number? For example, I see dispersion is for example 0.00145 You'll see in the screenshot below the cheap way I have to figure out range/impact by placing a grid of 10 squares over the graph bars, then deduce from that. 1 Share this post Link to post Share on other sites
Dedmen 2703 Posted July 24, 2019 8 hours ago, Justin Self said: Where is MIL and MOA accuracy defined? CfgWeapons class, and in the muzzle attachment (attachment has a coefficient) 8 hours ago, Justin Self said: from converted config.bin files for each weapon Just grab a "AiO Config" 8 hours ago, Justin Self said: Where is weight kg/lbs defined? nowhere. There is a arbitrary "mass" entry in CfgWeapons >> class > WeaponSlotsInfo >> mass. 8 hours ago, Justin Self said: Where is the ammo type defined? In the magazine, The CfgMagazines class of the loaded magazine. 8 hours ago, Justin Self said: Where is Range defined? 8 hours ago, Justin Self said: Where is Impact defined? in the CfgAmmo class I think. 8 hours ago, Justin Self said: Where is the muzzle velocity in meters/second and feet/second defined? The weapon has it's own speed, then the magazine has one, and I think the ammo has one too, and the weapon attachments can also influence it. The ACE Arsenal stats versions can probably help you https://github.com/acemod/ACE3/tree/master/addons/arsenal/functions 8 hours ago, Justin Self said: Where is barrel twist and length defined? That doesn't exist in the vanilla game? do you want mod values? in that case you'll have different values for muzzle velocity. 8 hours ago, Justin Self said: displayName="$STR_A3_CfgWeapons_arifle_Katiba_F0"; gives me the weapon name, but not in a user-friendly way. How can I find that? Use a AiO config, it has the names already resolved. Or write a ingame script to collect all the data for you. 8 hours ago, Justin Self said: Lastly, do any of these numbers have to be multiplied by another number to get the "true" representative number? As said above, the muzzle attachment has an effect on velocity and dispersion. But if you use mods like ACE that might be different, and probably is different. 2 Share this post Link to post Share on other sites
Justin Self 2 Posted July 24, 2019 6 hours ago, Dedmen said: CfgWeapons class, and in the muzzle attachment (attachment has a coefficient) Just grab a "AiO Config" Very informative, thank you! I will do some digging around. I very much appreciate your input! Share this post Link to post Share on other sites
b3lx 161 Posted July 24, 2019 I use this to extract VTN rifles classnames and descriptions, don't know if it helps: //copy all rifles from VTN mod to clipboard VTNWeapons = " ( getNumber ( _x >> 'scope' ) isEqualTo 2 && { getText ( _x >> 'simulation' ) isEqualTo 'Weapon' && { getNumber ( _x >> 'type' ) isEqualTo 1 } } && getText (_x >> 'author' ) isEqualTo 'VTN') "configClasses ( configFile >> "cfgWeapons" ); VTNWeapNames = []; { VTNWeapNames pushback (configname _x); VTNWeapNames pushback (gettext (configFile >> "CfgWeapons" >> (configname _x) >> "descriptionShort")); VTNWeapNames pushback ">"; } forEach VTNWeapons; copyToClipboard str VTNWeapNames; //copy all rifle attachments VTNWeapons = " ( getNumber ( _x >> 'scope' ) isEqualTo 2 && { getText ( _x >> 'simulation' ) isEqualTo 'Weapon' && { getNumber ( _x >> 'type' ) isEqualTo 131072 } } && getText (_x >> 'author' ) isEqualTo 'VTN') "configClasses ( configFile >> "cfgWeapons" ); VTNWeapNames = []; { VTNWeapNames pushback (configname _x); VTNWeapNames pushback (gettext (configFile >> "CfgWeapons" >> (configname _x) >> "descriptionShort")); VTNWeapNames pushback ">"; } forEach VTNWeapons; copyToClipboard str VTNWeapNames; After this from the description I manually type or automatically (excel) get some values like calibre 1 Share this post Link to post Share on other sites
Justin Self 2 Posted July 27, 2019 On 7/24/2019 at 4:36 PM, b3lx said: I use this to extract VTN rifles classnames and descriptions, don't know if it helps: //copy all rifles from VTN mod to clipboard VTNWeapons = " ( getNumber ( _x >> 'scope' ) isEqualTo 2 && { getText ( _x >> 'simulation' ) isEqualTo 'Weapon' && { getNumber ( _x >> 'type' ) isEqualTo 1 } } && getText (_x >> 'author' ) isEqualTo 'VTN') "configClasses ( configFile >> "cfgWeapons" ); VTNWeapNames = []; { VTNWeapNames pushback (configname _x); VTNWeapNames pushback (gettext (configFile >> "CfgWeapons" >> (configname _x) >> "descriptionShort")); VTNWeapNames pushback ">"; } forEach VTNWeapons; copyToClipboard str VTNWeapNames; //copy all rifle attachments VTNWeapons = " ( getNumber ( _x >> 'scope' ) isEqualTo 2 && { getText ( _x >> 'simulation' ) isEqualTo 'Weapon' && { getNumber ( _x >> 'type' ) isEqualTo 131072 } } && getText (_x >> 'author' ) isEqualTo 'VTN') "configClasses ( configFile >> "cfgWeapons" ); VTNWeapNames = []; { VTNWeapNames pushback (configname _x); VTNWeapNames pushback (gettext (configFile >> "CfgWeapons" >> (configname _x) >> "descriptionShort")); VTNWeapNames pushback ">"; } forEach VTNWeapons; copyToClipboard str VTNWeapNames; How is this used? Do I paste into the debug console? Share this post Link to post Share on other sites
b3lx 161 Posted July 27, 2019 yes, debug console. I also put in there the code for weapon attachments by mistake, remove if you don't need. by the way I got this from here and just adapted it Share this post Link to post Share on other sites
Justin Self 2 Posted July 27, 2019 I did a little more digging and was able to get a 113 MB AIO config file. Thank you for your help! I am still sensing this project is still quite the challenge and I'm not sure I'm up to it. I wish the weapon configs were easier to sift through, it sure makes gathering data from them into a CSV file that much harder (I haven't even begun figuring out how I might do that). But maybe these threads will help someone else. Share this post Link to post Share on other sites