Jump to content
Sign in to follow this  
Spectre-63

Wierdness has infected my mod!

Recommended Posts

I need to go back and do more testing but I've run into an oddity that I just can't explain and I'm hoping some of the more experienced modders might have some hints:

I've created two versions of the same .cpp file - one 'tagged' with my prefix, one that is 'untagged' to make it easier to integrate into existing missions. If you enter the Armory with my mod loaded (both the 'tagged' and 'untagged' versions), you should see two M16A4 ACOG GL entries. The top one is the 'untagged' version and the bottom is the 'tagged' version. For some reason, the GL will work for the 'tagged' but not the 'untagged' and the configs are identical for both. At first I thought it might've been an issue with the M16A4_ACG_GL entry in the Weapons3.pbo but if you unload my mod, the original functions properly.

When you look at the soldier inside the Armory, he spawns without grenades, which is clearly the problem. The question is: why does it work for one and not the other?huh.gif I thought it might've been ArmA objecting to the files being overriden, but the M16A4GL WITHOUT the ACOG works just fine. help.gifcrazy_o.gif

config.cpp for the 'untagged' version of my mod below:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class CfgPatches

{

class GrenadierPack

{

units[] = {"SoldierWG", "SoldierWSaboteurAssault", "SoldierGG"};

weapons[] = {"M16A2GL", "M16A4_GL", "M16A4_ACG_GL", "M4GL","M4A1GL"};

requiredVersion = 1.000000;

requiredAddons[] = {"CACharacters", "CAWeapons", "CAWeapons3"};

};

};

class CfgAmmo

{

/*extern*/ class Default;

/*extern*/ class GrenadeCore;

/*extern*/ class GrenadeBase;

/*extern*/ class SmokeShell;

class G_40mm_HEDP : GrenadeBase

{

model = "\ca\Weapons\granat";

hit = 175;

indirectHit = 10;

indirectHitRange = 7;

visibleFire = 16;

audibleFire = 18;

visibleFireTime = 3;

explosive = 1;

cost = 10;

deflecting = 10;

};

class G_40mm_Smoke : SmokeShell

{

model = "\ca\Weapons\granat";

smokeColor[] = {1,1,1,0};

visibleFire = 16;

audibleFire = 18;

visibleFireTime = 3;

deflecting = 15;

};

class G_40mm_RedSmoke : G_40mm_Smoke

{

smokeColor[] = {1, 0.13, 0.13, 0};

};

class G_40mm_YellowSmoke : G_40mm_Smoke

{

smokeColor[] = {1, 1, 0, 0};

};

};

class CfgMagazines

{

/*extern*/ class Default;

/*extern*/ class CA_Magazine;

class 5Rnd_HE_M203 : CA_Magazine

{

scope = 2;

type = 16;

displayName = "M203 HE 5rnd magazine";

picture = "\Ca\weapons\Data\Equip\m_40mmHP_CA.paa";

ammo = "G_40mm_HE";

initSpeed = 80;

count = 5;

};

class 5Rnd_HEDP_M203 : CA_Magazine

{

scope = 2;

type = 16;

displayName = "M203 HEDP 5rnd magazine";

picture = "\Ca\weapons\Data\Equip\m_40mmHP_CA.paa";

ammo = "G_40mm_HEDP";

initSpeed = 80;

count = 5;

};

class 5Rnd_Smoke_M203 : CA_Magazine

{

scope = 2;

type = 16;

displayName = "M203 Smoke 5rnd magazine";

picture = "\Ca\weapons\Data\Equip\m_FlareGreen_CA.paa";

ammo = "G_40mm_Smoke";

initSpeed = 80;

count = 5;

};

class 5Rnd_SmokeRed_M203 : 5Rnd_Smoke_M203

{

displayName = "M203 Smoke (Red) 5rnd magazine";

picture = "\Ca\weapons\Data\Equip\m_FlareGreen_CA.paa";

ammo = "G_40mm_RedSmoke";

initSpeed = 80;

count = 5;

};

class 5Rnd_SmokeYellow_M203 : 5Rnd_Smoke_M203

{

displayName = "M203 Smoke (Yellow) 5rnd magazine";

picture = "\Ca\weapons\Data\Equip\m_FlareGreen_CA.paa";

ammo = "G_40mm_YellowSmoke";

initSpeed = 80;

count = 5;

};

class 1Rnd_Smoke_M203 : CA_Magazine

{

scope = 2;

type = 16;

displayName = "M203 Smoke round";

picture = "\Ca\weapons\Data\Equip\m_FlareGreen_CA.paa";

ammo = "G_40mm_Smoke";

initSpeed = 80;

count = 1;

};

};

class CfgWeapons

{

/*extern*/ class Default;

/*extern*/ class Rifle;

/*extern*/ class GrenadeLauncher;

/*extern*/ class M16A2;

/*extern*/ class M16A4;

/*extern*/ class M4;

class M16A2GL : M16A2

{

displayName = "$STR_DN_M16A2GL";

model = "\ca\Weapons\m16_granatomet_proxy.p3d";

picture = "\CA\weapons\data\equip\w_m16m203_ca.paa";

UiPicture = "\CA\weapons\data\Ico\i_regular_CA.paa";

dexterity = 1.460000;

muzzles[] = {"M16Muzzle", "M203Muzzle"};

class M16Muzzle : M16A2

{

};

class M203Muzzle : GrenadeLauncher

{

displayName = "$STR_DN_M203";

magazines[] = {"1Rnd_HE_M203","5Rnd_HE_M203","5Rnd_HEDP_M203","5Rnd_Smoke_M203", "5Rnd_SmokeRed_M203","5Rnd_SmokeYellow_M203","1Rnd_Smoke_M203","FlareWhite_M203","FlareGreen_M203","FlareRed_M203","FlareYellow_M203"};

sound[] = {"\ca\Weapons\Data\Sound\Grenade_launch1_A",0.100000,1};

reloadMagazineSound[] = {"\ca\Weapons\Data\Sound\flare_reload",0.000316,1};

magazineReloadTime = 3;

reloadTime = 3.100000;

optics = 1;

modelOptics = "-";

cameraDir = "GL look";

memoryPointCamera = "GL eye";

opticsZoomMin = 0.220000;

opticsZoomMax = 0.950000;

opticsZoomInit = 0.420000;

};

};

class M16A4_GL : M16A4

{

displayName = "$STR_DN_m16a4_gl";

model = "\ca\weapons3\m16a4_gl\m16a4_gl";

picture = "\CA\weapons3\data\W_m16a4_gl_CA.paa";

UiPicture = "\CA\weapons\data\Ico\i_regular_CA.paa";

dexterity = 1.410000;

muzzles[] = {"M16Muzzle", "M203Muzzle"};

class M16Muzzle : M16A4

{

};

class M203Muzzle : GrenadeLauncher

{

displayName = "$STR_DN_M203";

magazines[] = {"1Rnd_HE_M203","5Rnd_HE_M203","5Rnd_HEDP_M203","5Rnd_Smoke_M203", "5Rnd_SmokeRed_M203","5Rnd_SmokeYellow_M203","1Rnd_Smoke_M203","FlareWhite_M203","FlareGreen_M203","FlareRed_M203","FlareYellow_M203"};

sound[] = {"\ca\Weapons\Data\Sound\Grenade_launch1_A",0.100000,1};

reloadMagazineSound[] = {"\ca\Weapons\Data\Sound\flare_reload",0.000316,1};

magazineReloadTime = 3;

reloadTime = 3.100000;

optics = 1;

modelOptics = "-";

cameraDir = "GL look";

memoryPointCamera = "GL eye";

opticsZoomMin = 0.220000;

opticsZoomMax = 0.950000;

opticsZoomInit = 0.420000;

};

};

class M16A4_ACG_GL: M16A4_GL {

displayName = "$STR_DN_m16a4_acg_gl";

picture = "\CA\weapons3\data\W_m16a4_acg_gl_CA.paa";

UiPicture = "\CA\weapons\data\Ico\i_regular_CA.paa";

model = "\ca\weapons3\m16a4_acg_gl\m16a4_acg_gl";

dexterity = 1.410000;

muzzles[] = {"M16Muzzle", "M203Muzzle"};

class M16Muzzle: M16A4_GL {

modelOptics = "\ca\weapons\optika_acog";

opticsZoomMin = 0.062500;

opticsZoomMax = 0.062500;

distanceZoomMin = 100;

distanceZoomMax = 100;

opticsFlare = "true";

opticsDisablePeripherialVision = "true";

class M203Muzzle : GrenadeLauncher {

displayName = "$STR_DN_M203";

magazines[] = {"1Rnd_HE_M203","5Rnd_HE_M203","5Rnd_HEDP_M203","5Rnd_Smoke_M203", "5Rnd_SmokeRed_M203","5Rnd_SmokeYellow_M203","1Rnd_Smoke_M203","FlareWhite_M203","FlareGreen_M203","FlareRed_M203","FlareYellow_M203"};

sound[] = {"\ca\Weapons\Data\Sound\Grenade_launch1_A",0.100000,1};

reloadMagazineSound[] = {"\ca\Weapons\Data\Sound\flare_reload",0.000316,1};

magazineReloadTime = 3;

reloadTime = 3.100000;

optics = 1;

modelOptics = "-";

cameraDir = "GL look";

memoryPointCamera = "GL eye";

opticsZoomMin = 0.220000;

opticsZoomMax = 0.950000;

opticsZoomInit = 0.420000;

};

};

class M4GL : M4

{

displayName = "$STR_DN_M4_GL";

model = "\ca\Weapons\M4_GL_ACOG";

picture = "\CA\weapons\data\equip\w_m4gl_acog_ca.paa";

UiPicture = "\CA\weapons\data\Ico\i_regular_CA.paa";

dexterity = 1.590000;

muzzles[] = {"M4Muzzle", "M203Muzzle"};

class M4Muzzle : M4

{

modelOptics = "\ca\Weapons\optika_ACOG";

opticsZoomMin = 0.062500;

opticsZoomMax = 0.062500;

distanceZoomMin = 100;

distanceZoomMax = 100;

};

class M203Muzzle : GrenadeLauncher

{

displayName = "$STR_DN_M203";

magazines[] = {"1Rnd_HE_M203","5Rnd_HE_M203","5Rnd_HEDP_M203","5Rnd_Smoke_M203", "5Rnd_SmokeRed_M203","5Rnd_SmokeYellow_M203","1Rnd_Smoke_M203","FlareWhite_M203","FlareGreen_M203","FlareRed_M203","FlareYellow_M203"};

reloadMagazineSound[] = {"\ca\Weapons\Data\Sound\flare_reload",0.000316,1};

sound[] = {"\ca\Weapons\Data\Sound\Grenade_launch1_A",0.100000,1};

reloadTime = 3.100000;

magazineReloadTime = 3;

optics = 1;

modelOptics = "-";

cameraDir = "GL look";

memoryPointCamera = "GL eye";

opticsZoomMin = 0.220000;

opticsZoomMax = 0.950000;

opticsZoomInit = 0.420000;

};

class Library

{

libTextDesc = "$STR_LIB_M4";

};

};

class M4A1GL : M4GL

{

displayName = "$STR_DN_M4A1_GL";

modes = {"Single","FullAuto"};

class Library

{

libTextDesc = "$STR_LIB_M4A1";

};

};

};

class CfgVehicleClasses {

class GrenadierClass

{

displayName = "Grenadiers";

};

};

class cfgVehicles {

/*extern*/ class All;

/*extern*/ class AllVehicles;

/*extern*/ class Land;

/*extern*/ class Man;

/*extern*/ class CAManBase;

/*extern*/ class SoldierWB;

/*extern*/ class SoldierWSaboteur;

/*extern*/ class SoldierWSaboteurPipe;

/*extern*/ class SoldierGB;

class SoldierWG: SoldierWB

{

displayName = "Hi-Cap Grenadier";

vehicleClass = "GrenadierClass";

weapons[] = {"M4GL", "Throw", "Put"};

magazines[] = {"30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "5Rnd_HE_M203", "5Rnd_HE_M203", "5Rnd_HE_M203", "5Rnd_HE_M203", "5Rnd_HEDP_M203", "5Rnd_HEDP_M203", "5Rnd_Smoke_M203", "5Rnd_SmokeRed_M203"};

respawnWeapons[] = {"M4GL", "Throw", "Put"};

respawnMagazines[] = {"30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "5Rnd_HE_M203", "5Rnd_HE_M203", "5Rnd_HE_M203", "5Rnd_HE_M203", "5Rnd_HEDP_M203", "5Rnd_HEDP_M203", "5Rnd_Smoke_M203", "5Rnd_SmokeRed_M203"};

};

class SoldierWSaboteurAssault: SoldierWSaboteurPipe

{

displayName = "SF Hi-Cap Assault";

vehicleClass = "GrenadierClass";

weapons[] = {"M4A1GL", "NVGoggles", "Throw", "Put", "M9SD"};

magazines[] = {"30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "5Rnd_HE_M203", "5Rnd_HE_M203", "5Rnd_HE_M203", "5Rnd_HE_M203", "5Rnd_HEDP_M203", "5Rnd_HEDP_M203", "5Rnd_Smoke_M203", "5Rnd_SmokeRed_M203"};

respawnWeapons[] = {"M4A1GL", "Throw", "Put"};

respawnMagazines[] = {"30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "5Rnd_HE_M203", "5Rnd_HE_M203", "5Rnd_HE_M203", "5Rnd_HE_M203", "5Rnd_HEDP_M203", "5Rnd_HEDP_M203", "5Rnd_Smoke_M203", "5Rnd_SmokeRed_M203"};

};

class SoldierGG: SoldierGB {

displayName = "Independent Hi-Cap Grenadier";

vehicleClass = "GrenadierClass";

weapons[] = {"M16A2GL", "Throw", "Put"};

magazines[] = {"30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "5Rnd_HE_M203", "5Rnd_HE_M203", "5Rnd_HE_M203", "5Rnd_HE_M203", "5Rnd_HEDP_M203", "5Rnd_HEDP_M203", "5Rnd_Smoke_M203", "5Rnd_SmokeRed_M203"};

respawnWeapons[] = {"M16A2GL", "Throw", "Put"};

respawnMagazines[] = {"30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "30Rnd_556x45_Stanag", "5Rnd_HE_M203", "5Rnd_HE_M203", "5Rnd_HE_M203", "5Rnd_HE_M203", "5Rnd_HEDP_M203", "5Rnd_HEDP_M203", "5Rnd_Smoke_M203", "5Rnd_SmokeRed_M203"};

};

};

Any assistance would be greatly appreciated! Between this strangeness and the inability to get the soldiers with the modified loadouts to appear, I'm about ready to pull all my already prematurely-grey hair out! help.gifhelp.gifhelp.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×