champ-1 40 Posted May 7, 2014 I want to make one of the vanilla guns accept moded magazine. How do I do that without creating new gun? Share this post Link to post Share on other sites
HJohnson 16 Posted May 7, 2014 You need to make a stand alone addon that not only contains a cfgmagazines.hpp file to define your new magazines but a new cfgweapons file that has authority over the original game files to make the vanilla weapon able to use them. Share this post Link to post Share on other sites
champ-1 40 Posted May 7, 2014 So I need to define every parameter of the vanilla weapon in that config? Or can I just make some sort of reference and overwrite original weapon chaning only 1 parameter I need? Share this post Link to post Share on other sites
warlord554 2065 Posted May 7, 2014 I assume you mean modified ammo, and not the mag model itself correct? Share this post Link to post Share on other sites
champ-1 40 Posted May 7, 2014 Both ammo and magazine. Well I did that. Now I want that mag to fit in the vanilla rifle. ---------- Post added at 20:34 ---------- Previous post was at 20:30 ---------- Here's what I have: class CfgPatches { class 127x108_HEAP { units[] = {}; weapons[] = {}; magazines[] = {}; requiredVersion = 0.1; requiredAddons[] = {"A3_Data_F","A3_Weapons_F"}; }; }; class CfgAmmo { class B_127x108_APDS; class B_127x108_HEAP: B_127x108_APDS { hit = 70; indirectHit=20; indirectHitRange=0.4; explosive=0.1; CraterEffects="ExploAmmoCrater"; explosionEffects="ExploAmmoExplosion"; }; }; class CfgMagazines { class 5Rnd_127x108_APDS_Mag; class 5Rnd_127x108_HEAP_Mag: 5Rnd_127x108_APDS_Mag { ammo="B_127x108_HEAP"; descriptionShort = "Caliber: 12.7x108 mm HEAP<br />Rounds: 5<br />Used in: GM6 Lynx"; displayName = "12.7mm 5Rnd HEAP Mag"; initSpeed = 820; }; }; Share this post Link to post Share on other sites
warlord554 2065 Posted May 7, 2014 you need to modify a weapon config, making it compatible with your mags Share this post Link to post Share on other sites
champ-1 40 Posted May 7, 2014 Yeah, how? Any examples, please? Share this post Link to post Share on other sites
HJohnson 16 Posted May 8, 2014 It's be something like this Its not accurate, I'm not at home with my Arma files. config.cpp= cfgpatches { version number requiredaddons = "the name of the weapon pbo that you are overriding" }; #include cfgammo.hpp #include cfgmagazines.hpp #include cfgweapons.hpp cfgammo.hpp new ammo classes here cfgmagazines.hpp new magazine classes here cfgweapons.hpp class thebaseclasstheweaponinheritsfrom; class thegunyouwanttomodify : thebaseclasstheweaponinheritsfrom { magazines = "all the original vanilla magazines, your new magazine"; }; That's basically it. Share this post Link to post Share on other sites
champ-1 40 Posted May 8, 2014 Thanks, man. But I figured it out on my own already. Though I don't know the proper way to find a base class. I'm just scrolling config till I find something that fits. :D Share this post Link to post Share on other sites
ante185 2 Posted May 9, 2014 You can check stuff like that in the editor in the config viewer :P Share this post Link to post Share on other sites
champ-1 40 Posted May 9, 2014 Yeah, that's what I'm doing. But it's not always all that obvious. ---------- Post added at 17:04 ---------- Previous post was at 16:13 ---------- Ohhh, soo slooooww... Share this post Link to post Share on other sites