pd3 25 Posted August 12, 2012 Now, I know this is something of a sticky area for addon editing as some may waltz in and cry: "HOMAIGAW, DATZ CHEATING!", as it could, yes most certainly facilitate cheating (or it could in the past). However, with a particular addon I currently enjoy, that adds chemical grenades to some of the existing BI grenade launchers via referencing the weapons themselves on a separate .cpp and simply adding magazines[] = {"default magazine", "new additional ammo type"}; Now this seems to work with the 40mm grenade launcher just fine and dandy, however I've always been kind of irked by the fact that the heavy sniper rifles don't have any HE rounds, which may help soften the inability to carry a secondary weapon system, at least for support against light vehicles. I would like to add another magazine type to be usable by the M107 and the KSVK, ideally via the same method in order to bypass having to make a "config clone", of the weapons, and then make a custom unit to carry the weapon etc. I -will- use this method if I absolutely have to, however I would prefer to avoid it for simplicity's sake. It seems like I've pretty much gotten everything set up in my config file as it should be, with the exception that while the game acknowledges that this new magazine/ammo type is intended for use with the m107, the gun itself will not allow me to reload or switch to that ammunition once picked up. The only thing that I can think of is that I know there are certain permissions for some addons, and some are completely closed, meaning they cannot be referenced and edited that way, and that some can. Is it possible that the grenade launchers were for some reason editable via this secondary means, but the m107 does not allow those same permissions? I'm just wondering why this might be happening? Share this post Link to post Share on other sites
eggbeast 3673 Posted November 19, 2012 (edited) hi it's probably to do with inheritance - share your file/config script and i'll take a look you'd want something like this: #define _ARMA_ //Class config.bin{ class CfgPatches { class PD3_M107 { requiredVersion = 1.59; requiredAddons[] = {"CaWeapons","CAweapons_m107","CAweapons_E","CAweapons_E_m107"}; weapons[] = {"m107_TWS_EP1","m107"}; units[] = {"PD3_M107_crate"}; version = "1.0"; author = "PD3"; mail = ""; }; }; //ammo class CfgAmmo { class Default; class BulletCore; class BulletBase; class B_127x99_Ball; class B_127x99_Ball_noTracer: B_127x99_Ball { hit = 26; visibleFire = 20; audibleFire = 22; visibleFireTime = 3; tracerColor[] = {0,0,0,0}; tracerColorR[] = {0,0,0,0}; tracerStartTime = -1; airFriction = -0.0005; muzzleEffect = "BIS_Effects_HeavySniper"; }; class PD3_B_127x99_Ball_HE: B_127x99_Ball_noTracer { hit = 26; //add splash damage indirectHit = 20; indirectHitRange = 1.25; //add HE fx explosive = 0.6; CraterEffects = "ExploAmmoCrater"; explosionEffects = "ExploAmmoExplosion"; // cartridge = "FxCartridge_127"; model = "\ca\Weapons\Data\bullettracer\tracer_red"; muzzleEffect = "BIS_Effects_HeavySniper"; cost = 20; tracerScale = 1.5; tracerEndTime = 2.3; caliber = 2.07; visibleFire = 20; audibleFire = 22; visibleFireTime = 3; tracerColor[] = {0,0,0,0}; tracerColorR[] = {0,0,0,0}; tracerStartTime = -1; airFriction = -0.0005; }; class PD3_B_127x99_Ball_AP: B_127x99_Ball_noTracer { //editing to match other AP ammo hit = 50; indirectHit = 20; indirectHitRange = 0.2; caliber = 3.67; // explosive = 0; cartridge = "FxCartridge_127"; model = "\ca\Weapons\Data\bullettracer\tracer_red"; muzzleEffect = "BIS_Effects_HeavySniper"; cost = 20; tracerScale = 1.5; tracerEndTime = 2.3; visibleFire = 20; audibleFire = 22; visibleFireTime = 3; tracerColor[] = {0,0,0,0}; tracerColorR[] = {0,0,0,0}; tracerStartTime = -1; airFriction = -0.0005; }; }; //mags class CfgMagazines { class Default; class CA_Magazine; class 10Rnd_127x99_m107: CA_Magazine { scope = 2; displayName = "$STR_MN_10RND_M107"; ammo = "B_127x99_Ball_noTracer"; count = 10; initSpeed = 850; picture = "\PD3_M107\Data\Equip\m_107_ca.paa"; descriptionShort = "$STR_DSS_10RND_M107"; }; class PD3_10Rnd_127x99_m107_HE: 10Rnd_127x99_m107 { scope = 2; displayName = "10Rnd. M107 HE"; ammo = "PD3_B_127x99_Ball_HE"; count = 10; initSpeed = 850; picture = "\PD3_M107\Data\Equip\m_107_HE_ca.paa"; descriptionShort = "$STR_DSS_10RND_M107"; }; class PD3_10Rnd_127x99_m107_AP: 10Rnd_127x99_m107 { scope = 2; displayName = "10Rnd. M107 AP"; ammo = "PD3_B_127x99_Ball_AP"; count = 10; initSpeed = 850; picture = "\PD3_M107\Data\Equip\m_107_AP_ca.paa"; descriptionShort = "$STR_DSS_10RND_M107"; }; }; class CfgWeapons { class Rifle; class m107: Rifle { model = "\ca\weapons_E\m107\m107"; htMin = 1; htMax = 420; afMax = 0; mfMax = 0; mFact = 1; tBody = 100; weaponInfoType = "RscWeaponZeroing"; handAnim[] = {"OFP2_ManSkeleton","\Ca\weapons_E\Data\Anim\M107b.rtm"}; //adding mags here magazines[] = {"10Rnd_127x99_m107","PD3_10Rnd_127x99_m107_HE","PD3_10Rnd_127x99_m107_AP"}; //editing to improve usage visionMode[] = {"Normal","NVG"}; class OpticsModes { class StepScope { opticsID = 1; useModelOptics = 1; opticsPPEffects[] = {"OpticsCHAbera1","OpticsBlur1"}; opticsZoomInit = 0.0553; opticsZoomMin = 0.0178; distanceZoomMin = 500; opticsZoomMax = 0.0553; distanceZoomMax = 200; memoryPointCamera = "Konec hlavne"; opticsFlare = 1; opticsDisablePeripherialVision = 1; cameraDir = ""; //editing to improve usage visionMode[] = {"Normal","NVG"}; discreteDistance[] = {100,200,300,400,500,600,700,800,900,1000,1100,1200}; discreteDistanceInitIndex = 4; }; }; }; class m107_TWS_EP1: m107 { model = "\ca\weapons_E\m107\m107_TWS"; picture = "\CA\weapons_e\data\icons\m107_TWS_CA.paa"; UiPicture = "\CA\weapons\data\Ico\i_sniper_CA.paa"; displayname = "$STR_EP1_DN_m107_TWS_EP1"; modelOptics = "\Ca\weapons_E\HWTS_optic.p3d"; opticsPPEffects[] = {}; //editing to improve usage visionMode[] = {"Normal","NVG","Ti"}; thermalMode[] = {0,1,2}; opticsZoomMax = 0.0755; distanceZoomMax = 120; opticsZoomMin = 0.0249; distanceZoomMin = 400; opticsZoomInit = 0.0755; //adding mags here magazines[] = {"10Rnd_127x99_m107","PD3_10Rnd_127x99_m107_HE","PD3_10Rnd_127x99_m107_AP"}; class OpticsModes: OpticsModes { class HWTS: StepScope { opticsPPEffects[] = {}; //editing to improve usage visionMode[] = {"Normal","NVG","Ti"}; thermalMode[] = {0,1,2}; discretefov[] = {0.0755,0.0249}; discreteInitIndex = 0; discreteDistance[] = {100,200,300,400,500,600,700,800,900,1000,1100,1200}; discreteDistanceInitIndex = 2; }; }; }; }; class cfgVehicles { class ReammoBox; class ReammoBox_EP1; class PD3_M107_crate: ReammoBox_EP1 { scope = 2; accuracy = 1000; displayName = "PD3 M107 Ammo Box"; model = "\ca\weapons\AmmoBoxes\USSpecialWeapons.p3d"; class TransportMagazines { class _xx_10Rnd_127x99_m107 { magazine = "10Rnd_127x99_m107"; count = 20; }; class _xx_10Rnd_127x99_m107_AP { magazine = "PD3_10Rnd_127x99_m107_AP"; count = 20; }; class _xx_10Rnd_127x99_m107_HE { magazine = "PD3_10Rnd_127x99_m107_HE"; count = 20; }; }; class TransportWeapons { class _xx_m107_TWS_EP1 { weapon = "m107_TWS_EP1"; count = 2; }; class _xx_m107 { weapon = "m107"; count = 2; }; }; }; }; sample mission and mod here http://www.gitsarma.gamingdeluxe.net/mods/beta/PD3_M107_mod.rar needs a bit of tweaking i reckon - the explosive fx is too large i think not sure how to get AP working properly edit: I made some custom mag icons too - blue dot for HE red dot for AP cheers Edited November 20, 2012 by eggbeast Share this post Link to post Share on other sites
pd3 25 Posted December 8, 2012 Thanks much for the reply, I'm going to mess around with this! Share this post Link to post Share on other sites
eggbeast 3673 Posted December 9, 2012 (edited) no worries - we've extended it to M249, M240 and M2 ammo now as it is such a hit on our server our full version is now called EB_weapons here http://www.gitsarma.gamingdeluxe.net/mods/beta/@EB_pack.rar help yourself - it's all pretty stock stuff Edited December 17, 2012 by eggbeast Share this post Link to post Share on other sites