Jump to content
Sign in to follow this  
earl

Usmc weapon configs

Recommended Posts

Here's my current config.cpp for my weapons.  I'm sure a lot can be done to clean it up, I should have made a base rifle instead of duplicating so many lines, but I ran into some problems and this was the easy way to play with my rifles in-game.

If you can help me clean it up, and offer new ideas/solutions as I go along, please do.

At the moment, I'm mostly looking for a good shotgun config.  Right now my M1014 is just an M4 with a shotgun model, which is just no fun.  I have a good sound that I'll use, I'm looking for some buckshot.

Also, I tried making my own M16 and M4 mags - which I thought would be easy, but I always got a "No Entry .modelSpecial." or something like that in the editor.

And the "M4 Zoom" rifle is just my camera for getting easy closeups of the rifles. Pretty handy tool, kinda fun to shoot with at full zoom too, you really see the trajectory of the tracers.

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

// some basic defines

#define TEast 0

#define TWest 1

#define TGuerrila 2

#define TCivilian 3

#define TSideUnknown 4

#define TEnemy 5

#define TFriendly 6

#define TLogic 7

#define true 1

#define false 0

// type scope

#define private 0

#define protected 1

#define public 2

#define WeaponNoSlot 0// dummy weapons

#define WeaponSlotPrimary 1// primary weapons

#define WeaponSlotSecondary 16// secondary weapons

#define WeaponSlotItem 256// items

#define WeaponSlotBinocular 4096// binocular

#define WeaponHardMounted 65536

class CfgPatches

{

class C8X_USMC

{

weapons[] = {"C8XM16","C8XM16acog","C8XM16reflex","C8XM16M203","C8XM4SOPMOD","C8XM4","C8XM4acog","C8XM4M203","C8XM4zoom","C8XM1014","C8XM1014cco"};

units[] = {"C8XRifleman","C8XRiflemanReflex","C8XRiflemanAcog","C8XFRecon","C8XFReconSopmod","C8XFReconAcog","C8XFReconGrenadier","C8XFReconAssaulter"};

requiredVersion = 1.85;

};

};

class CfgModels

{

class default {};

class Weapon: default {};

class C8XM16: Weapon {};

class C8XM16acog: Weapon {};

class C8XM16reflex: Weapon {};

class C8XM16M203: Weapon {};

class C8XM4: Weapon {};

class C8XM4acog: Weapon {};

class C8XM4sopmod: Weapon {};

class C8XM4M203: Weapon {};

class C8XM1014: Weapon {};

class C8XM1014cco: Weapon {};

};

class CfgWeapons

{

class default{};

class MGun: default {};

class Riffle: MGun {};

class C8XM16: Riffle

{

scopeWeapon=2;

scopeMagazine=2;

model="\c8x_usmc\C8XM16.p3d";

modelOptics="\c8x_usmc\optic_m16.p3d";

optics=1;

opticsZoomMin=0.350;

opticsZoomMax=0.350;

picture="\c8x_usmc\inv_pics\w_sr47ac.paa";

displayName="M16A4";

drySound[]={"\Sound\weapons\M16dry.wss",0.010000,1};

modes[]={"Single","Burst"};

magazines[]={"M16"};

};

class C8XM16acog: Riffle

{

scopeWeapon=2;

scopeMagazine=2;

model="\c8x_usmc\C8XM16acog.p3d";

modelOptics="\c8x_usmc\optic_acog.p3d";

optics=1;

opticsZoomMin=0.16;

opticsZoomMax=0.16;

picture="\c8x_usmc\inv_pics\w_sr47ac.paa";

displayName="M16A4 ACOG";

drySound[]={"\Sound\weapons\M16dry.wss",0.010000,1};

modes[]={"Single","Burst"};

magazines[]={"M16"};

};

class C8XM16reflex: Riffle

{

scopeWeapon=2;

scopeMagazine=2;

model="\c8x_usmc\C8XM16reflex.p3d";

modelOptics="\c8x_usmc\optic_reflex.p3d";

optics=1;

opticsZoomMin=0.350;

opticsZoomMax=0.350;

picture="\c8x_usmc\inv_pics\w_sr47ac.paa";

displayName="M16A4 Reflex";

drySound[]={"\Sound\weapons\M16dry.wss",0.010000,1};

modes[]={"Single","Burst"};

magazines[]={"M16"};

};

class C8XM4 : Riffle

{

scopeWeapon=2;

scopeMagazine=2;

model="\c8x_usmc\C8XM4.p3d";

modelOptics="\c8x_usmc\optic_m16.p3d";

optics=1;

opticsZoomMin=0.35;

opticsZoomMax=0.35;

picture="\c8x_usmc\inv_pics\w_sr47ac.paa";

displayName="M4";

drySound[]={"\Sound\weapons\M16dry.wss",0.010000,1};

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

magazines[] = {"M4"};

};

class C8XM4SOPMOD: Riffle

{

scopeWeapon=2;

scopeMagazine=2;

model="\c8x_usmc\C8XM4sopmod.p3d";

modelOptics="\c8x_usmc\optic_m68.p3d";

optics=1;

opticsZoomMin=0.300;

opticsZoomMax=0.300;

picture="\c8x_usmc\inv_pics\w_sr47ac.paa";

displayName="SOPMOD M4";

drySound[]={"\Sound\weapons\M16dry.wss",0.010000,1};

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

magazines[] = {"M4"};

};

class C8XM4Acog: Riffle

{

scopeWeapon=2;

scopeMagazine=2;

model="\c8x_usmc\C8XM4Acog.p3d";

modelOptics="\c8x_usmc\optic_acog.p3d";

optics=1;

opticsZoomMin=0.16;

opticsZoomMax=0.16;

picture="\c8x_usmc\inv_pics\w_sr47ac.paa";

displayName="M4 ACOG";

drySound[]={"\Sound\weapons\M16dry.wss",0.010000,1};

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

magazines[] = {"M4"};

}

class C8XM4zoom: Riffle

{

scopeWeapon=2;

scopeMagazine=2;

model="\c8x_usmc\C8XM4.p3d";

modelOptics="\c8x_usmc\optic_blank.p3d";

optics=1;

opticsZoomMin=0.005;

opticsZoomMax=0.80;

distanceZoomMin=800;

distanceZoomMax=5;

picture="\c8x_usmc\inv_pics\w_sr47ac.paa";

displayName="M4 Zoom";

drySound[]={"\Sound\weapons\M16dry.wss",0.010000,1};

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

magazines[] = {"M4"};

};

class GrenadeLauncher: Default{};

class C8XM16M203: GrenadeLauncher

{

scopeWeapon = public;

scopeMagazine = private;

picture="\c8x_usmc\inv_pics\w_sr47ac.paa";

weaponType = WeaponSlotPrimary;

displayName = "M16/M203";

model="\c8x_usmc\C8XM16M203.p3d";

muzzles[] = {M16Muzzle, M203Muzzle};

class M16Muzzle : C8XM16

{

magazines[] = {M16};

};

class M203Muzzle : GrenadeLauncher

{

displayName="M203";

modelOptics="\c8x_usmc\optic_m203.p3d";

optics = 1;

opticsZoomMin=0.40;

opticsZoomMax=0.40;

sound[]={weapons\M16GrenadeLaunch, db-70,1};

magazines[] = {GrenadeLauncher, Flare, FlareGreen, FlareRed, FlareYellow};

}

canDrop = true;

};

class C8XM4M203: GrenadeLauncher

{

scopeWeapon = public;

scopeMagazine = private;

picture="\c8x_usmc\inv_pics\w_sr47ac.paa";

weaponType = WeaponSlotPrimary;

displayName = "M4/M203";

model="\c8x_usmc\C8XM4M203.p3d";

muzzles[] = {M4Muzzle, M203Muzzle};

class M4Muzzle : C8XM4

{

magazines[] = {M4};

};

class M203Muzzle : GrenadeLauncher

{

displayName="M203";

modelOptics="\c8x_usmc\optic_m203.p3d";

optics = 1;

opticsZoomMin=0.40;

opticsZoomMax=0.40;

sound[]={weapons\M16GrenadeLaunch, db-70,1};

magazines[] = {GrenadeLauncher, Flare, FlareGreen, FlareRed, FlareYellow};

}

canDrop = true;

};

class C8XM1014: Riffle

{

scopeWeapon=2;

scopeMagazine=2;

model="\c8x_usmc\C8XM1014.p3d";

modelOptics="\c8x_usmc\optic_m16.p3d";

optics=1;

opticsZoomMin=0.35;

opticsZoomMax=0.35;

picture="\c8x_usmc\inv_pics\w_sr47ac.paa";

displayName="M1014";

drySound[]={"\Sound\weapons\M16dry.wss",0.010000,1};

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

magazines[] = {"M4"};

};

class C8XM1014cco: Riffle

{

scopeWeapon=2;

scopeMagazine=2;

model="\c8x_usmc\C8XM1014cco.p3d";

modelOptics="\c8x_usmc\optic_m68.p3d";

optics=1;

opticsZoomMin=0.300;

opticsZoomMax=0.300;

picture="\c8x_usmc\inv_pics\w_sr47ac.paa";

displayName="M1014";

drySound[]={"\Sound\weapons\M16dry.wss",0.010000,1};

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

magazines[] = {"M4"};

};

};

<span id='postcolor'>

Share this post


Link to post
Share on other sites

Okay, heres a config, for the M1014, have a look... I didnt compile it, so there may be some errors... But it should be alright.

// some basic defines

#define TEast 0

#define TWest 1

#define TGuerrila 2

#define TCivilian 3

#define TSideUnknown 4

#define TEnemy 5

#define TFriendly 6

#define TLogic 7

#define true 1

#define false 0

// type scope

#define private 0

#define protected 1

#define public 2

#define WeaponNoSlot 0// dummy weapons

#define WeaponSlotPrimary 1// primary weapons

#define WeaponSlotSecondary 16// secondary weapons

#define WeaponSlotItem 256// items

#define WeaponSlotBinocular 4096// binocular

#define WeaponHardMounted 65536

class CfgPatches

{

class XXM1014

{

units[] = {};

weapons[] = {XXM1014,XXM1014ACOG};

requiredVersion = 1.75;

};

};

class CfgModels

{

class Default{};

class Weapon: Default{};

class XXM1014_proxy: Weapon {};

class XXM1014_acog_proxy: Weapon {};

};

class CfgAmmo

{

class default {};

class BulletSingle : default {};

class BulletSingleW : BulletSingle {};

class XXM1014A : BulletSingleW

{

hit=5;

indirectHit=0.100000;

indirectHitRange=0.100000;

minRange=1;

minRangeProbab=0.100000;

midRange=20;

midRangeProbab=0.20000;

maxRange=40;

maxRangeProbab=0.700000;

tracerColor[]={0,0,0,0.000000};

tracerColorR[]={0,0,0,0.000000};

};

};

class CfgWeapons

{

class Default {};

class MGun: Default {};

class Riffle: MGun {};

class XXM1014 : Riffle

{

scopeWeapon=2;

scopeMagazine=2;

model=""; //M1014 MODEL

modelOptics=""; //M1014 IRONSIGHT OPTICS

picture=""; //M1014 PIC

optics=1;

opticsFlare=0;

opticsZoomMin=0.350000;

opticsZoomMax=0.350000;

displayName="M1014";

displayNameMagazine="M1014 12G SHELLS";

shortNameMagazine="M1014";

drySound[]={"weapons\M16Dry",0.010000,1};

ammo="XXM1014A";

multiplier=1;

burst=8; //ADJUST HOW MANY 'BULLETS' THAT WILL COME OUT

dispersion=0.005000; //ADJUST ACCURACY?

sound[]={"",1.000000,1}; //FIRING SOUND

soundContinuous=0;

reloadTime=0.50000; //ADJUST TO GET PROPER ROF

ffCount=1;

recoil="riffleSingle";

autoFire=0;

aiRateOfFire=5.000000;

aiRateOfFireDistance=50;

useAction=0;

useActionTitle="";

count=7; //I BELIEVE IT'S 7 SHELLS?

magazines[] = {"XXM1014MAG"};

};

class XXM1014ACOG : XXM1014

{

model=""; //M1014 WITH ACOG MODEL

modelOptics=""; //ACOG OPTICS

picture=""; //M1014 WITH ACOG PIC

};

class XXM1014MAG : XXM1014

{

scopeWeapon=2;

scopeMagazine=0;

weaponType=1;

picture=""; //MAGAZINE PICTURE

};

};

class CfgNonAIVehicles

{

class ProxyWeapon {};

class XXM1014: ProxyWeapon {};

class XXM1014ACOG: ProxyWeapon {};

};

Share this post


Link to post
Share on other sites

Thanks a lot for the help, I'll give it a shot wink.gif later tonight.

Share this post


Link to post
Share on other sites

Just curious, but how does one 'compile' the weapon.cpp?

It's interpreted, isn't it?

Quantum

Share this post


Link to post
Share on other sites

yes, I think thats what they mean, although you COULD compile the config.cpp to a config.bin...

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  

×