Home   Help Search Login Register  

Author Topic: Ammo woes  (Read 1538 times)

0 Members and 2 Guests are viewing this topic.

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Ammo woes
« on: 20 Jan 2005, 11:27:56 »
been trying to make my own ammunition (only done it on vehicles so far) for a sniper rifle of ours... now it was initially based on the Jam 7.62x51 5 round magazine for the west, and calibrated to that effect, hence i sniffed around in Jam to get the same values etc... we just wanted our own sound to work for the weapon firing... im not sure where i'm going wrong, but i get the error:

no configbin: UKF_L96A1Mag

or something to that effect - i've double checked my spelling, and cant find anything obvious... but most of this ammo thing is beyond me

Code: [Select]


// AI L96A1 made by Tim for Project: UK Forces


#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

#define private 0
#define protected 1
#define public 2

#define WeaponNoSlot         0
#define WeaponSlotPrimary      1
#define WeaponSlotSecondary      16
#define WeaponSlotItem         256
#define WeaponSlotBinocular      4096
#define WeaponHardMounted      65536

class CfgPatches
{
   class UKF_L96A1pack
   {
      units[] = {UKF_L96A1Marksman,UKF_L96A1Sniper};
      weapons[] = {"UKF_L96A1", "UKF_L96A1Camo", "UKF_L96A1Black", "UKF_L96A1Desert"};
      requiredVersion = 1.91;
   };
};

class CfgModels
{
   class Default{};
   class Weapon: Default{};
   class L96A1: Weapon {};
   class L96A1camo: Weapon {};
   class L96A1Black: Weapon {};
   class L96A1Desert: Weapon {};
};

class CfgRecoils
{
   UKF_L96A1[]={0.012000,0,0,0.060000,0.014000,0.005000,0.050000,0.006000,0.060000,0.100000,0,0};
};

class CfgAmmo
{
class default {};
class M21: default {};
class UKF_L96A1Mag: M21
   {
      
      tracercolor[]= {0,0,0,0};
      hit=8;indirectHit=0.5;indirectHitRange=0.5;
      minRange=0;minRangeProbab=100;
      midRange=1000;midRangeProbab=0.90;
      maxRange=2500;maxRangeProbab=0.1;
      cost=30;
      cartridge="FxCartridgeSmall";
      scopeWeapon=0;
      scopeMagazine=2;
      displayNameMagazine = "10x 7.62x51 Round";
      shortNameMagazine = "10x 7.62x51 Round";
      picture="";
      initspeed=792;
      maxLeadSpeed=50;
      drySound[]={"\JAM_Sounds\sounds\Dry.wss",0.010316,1};
      count=10;
      modes[]= {"Single"};
      class Single
      {
         ammo=UKF_L96A1Mag;
         multiplier=1;
         burst=1;
         displayName="7.62x51";
         soundContinuous= 0;
         sound[]={"\UKF_L96A1\L96A1_single.wav",db0,1};
         ffCount=1;
         dispersion=0.00004275;
         reloadTime=2.300000;
         autofire=0;
         aiRateOfFire=5.0000;
         aiRateOfFireDistance = 500;
         UseAction=0;
         useActionTitle="";
         recoil=UKF_L96A1;
      };
      canDrop = true;
   };

};

class CfgWeapons
{
   class Default   {};
   class MGun : Default {};
   class Riffle: MGun {};
   class SniperRiffle: Riffle {};
   class UKF_L96A1Camo : SniperRiffle
   {
      scopeWeapon=2;
      scopeMagazine=2;
      weaponType=WeaponSlotPrimary;
                modelOptics="\UKF_L96A1\L96A1_optic.p3d";
      model="\UKF_L96A1\L96A1camo.p3d";
                picture="\UKF_L96A1\L96A1_texture.paa";
      displayName="L96A1 (Camo)";   
                cursor="w_weapon";
      cursorAim="w_lock";
      modes[] = {Single};
      count=5;
      magazines[]={UKF_L96A1Mag};
                recoil=UKF_L96A1;
                reloadTime=3.0;
      reloadMagazineSound[]={"\UKF_L96A1\L96A1_reload.wav",0.05,1};
      opticsZoomMin=0.025;
      opticsZoomMax=0.025;
};

class UKF_L96A1 : SniperRiffle
   {
      scopeWeapon=2;
      scopeMagazine=2;
      weaponType=WeaponSlotPrimary;
                modelOptics="\UKF_L96A1\L96A1_optic.p3d";
      model="\UKF_L96A1\L96A1.p3d";
                picture="\UKF_L96A1\L96A1_texture.paa";
      displayName="L96A1";   
                cursor="w_weapon";
      cursorAim="w_lock";
      modes[] = {Single};
      count=5;
      magazines[]={UKF_L96A1Mag};
                recoil=UKF_L96A1;
                reloadTime=3.0;
      reloadMagazineSound[]={"\UKF_L96A1\L96A1_reload.wav",0.05,1};
      opticsZoomMin=0.025;
      opticsZoomMax=0.025;
      
};

class UKF_L96A1Black : SniperRiffle
   {
      scopeWeapon=2;
      scopeMagazine=2;
      weaponType=WeaponSlotPrimary;
                modelOptics="\UKF_L96A1\L96A1_optic.p3d";
      model="\UKF_L96A1\L96A1black.p3d";
                picture="\UKF_L96A1\L96A1_texture.paa";
      displayName="L96A1 (Black & Green)";   
                cursor="w_weapon";
      cursorAim="w_lock";
      modes[] = {Single};
      count=5;
      magazines[]={UKF_L96A1Mag};
                recoil=UKF_L96A1;
                reloadTime=3.0;
      reloadMagazineSound[]={"\UKF_L96A1\L96A1_reload.wav",0.05,1};
      opticsZoomMin=0.025;
      opticsZoomMax=0.025;
      
};

class UKF_L96A1Desert : SniperRiffle
   {
      scopeWeapon=2;
      scopeMagazine=2;
      weaponType=WeaponSlotPrimary;
                modelOptics="\UKF_L96A1\L96A1_optic.p3d";
      model="\UKF_L96A1\L96A1Desert.p3d";
                picture="\UKF_L96A1\L96A1_texture.paa";
      displayName="L96A1 (Desert)";   
                cursor="w_weapon";
      cursorAim="w_lock";
      modes[] = {Single};
      count=5;
      magazines[]={UKF_L96A1Mag};
                recoil=UKF_L96A1;
                reloadTime=3.0;
      reloadMagazineSound[]={"\UKF_L96A1\L96A1_reload.wav",0.05,1};
      opticsZoomMin=0.025;
      opticsZoomMax=0.025;
      
};

};

class CfgVehicles
{
    class All{};
    class AllVehicles:All{};
    class Land:AllVehicles{};
    class Man:Land{};
    class Soldier:Man{};
    class SoldierWB:Soldier{};
    class UKF_L96A1Marksman:SoldierWB
{
      side=1;      
      displayName="Marksman (L96A1)";
      weapons[]={UKF_L96A1,binocular,GlockS};
      nightVision=1;
      canHideBodies=1;
      magazines[]={JAM_W762_5mag,JAM_W762_5mag,JAM_W762_5mag,JAM_W762_5mag,JAM_W762_5mag,JAM_W762_5mag,JAM_W
762_5mag,JAM_W762_5mag,Glocksmag,Glocksmag,Glocksmag};
};

    class SoldierWSniper:SoldierWB{};
    class UKF_L96A1Sniper:SoldierWSniper
{
      side=1;      
      displayName="Sniper (L96A1 Camo)";
      weapons[]={UKF_L96A1Camo,binocular,GlockS};
      nightVision=1;
      canHideBodies=1;
      magazines[]={JAM_W762_5mag,JAM_W762_5mag,JAM_W762_5mag,JAM_W762_5mag,JAM_W762_5mag,JAM_W762_5mag,JAM_W
762_5mag,JAM_W762_5mag,Glocksmag,Glocksmag,Glocksmag};
};

};

class CfgNonAIVehicles
{
   class ProxyWeapon {};
   class ProxyUKF_L96A1: ProxyWeapon {};
};


hope that all makes sense to you... the jam magazine worked nicely, but the sound was pants with what we needed - i was hoping i could do a copy and paste job of the ammo it used intially, but the config of jam is somewhat confusing - all over the place etc... i'm also asuming i need to add some sounds in the config for where it hits a bloke, soil, etc

cheers
Proud Member of the Volunteer Commando Battalion

GI-YO

  • Guest
Re:Ammo woes
« Reply #1 on: 20 Jan 2005, 12:51:28 »
I dont anything about making addons but you seem to have spelt rifle wrong a few times, you put riffle!
"class UKF_L96A1Camo : SniperRiffle"
"class UKF_L96A1Black : SniperRiffle"

Keep up the good work!

GI-YO


Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:Ammo woes
« Reply #2 on: 20 Jan 2005, 13:07:23 »
thats czech english for u... like setdammage ;)
Proud Member of the Volunteer Commando Battalion

GI-YO

  • Guest
Re:Ammo woes
« Reply #3 on: 20 Jan 2005, 13:34:08 »
Oh right, well then i'm stumped, looks likes its all there.

GI-YO

Offline Messiah

  • Honourary OFPEC Patron & Drinking Buddy of Wolfsbane
  • Honoured Contributor
  • ***
  • OFPEC Veteran
    • Project UK Forces
Re:Ammo woes
« Reply #4 on: 20 Jan 2005, 13:55:22 »
the rifles worked before minus the ammo section with Jam ammo... now im just struggling to get the ammo working
Proud Member of the Volunteer Commando Battalion

bennyboy

  • Guest
Re:Ammo woes
« Reply #5 on: 23 Jan 2005, 10:25:39 »
You've done it the wrong way round mate, magazines are defined within cfgweapons, you've configured yours within cfgammo.

PM me for more info.