Messiah 2 Posted January 20, 2005 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 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> // 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 Share this post Link to post Share on other sites
Footmunch 0 Posted January 20, 2005 I don't think this is the problem, but the sniper soldiers you use should have 'UKF_L96A1Mag' in their magazines, rather than 'JAM_W762_5mag', non? The hit sounds are defined at the same place as the drySound IIRC. Check the commented configs. Share this post Link to post Share on other sites
Messiah 2 Posted January 20, 2005 i'll replace the ammo in the units once i get this thing sorted... never got hold of the commented configs... must find them Share this post Link to post Share on other sites
Footmunch 0 Posted January 20, 2005 http://www.flashpoint1985.com/breathe/download/Commented_Config_191.zip Probably a better learning tool than the JAM configs, to be honest  Share this post Link to post Share on other sites
Messiah 2 Posted January 20, 2005 hmmmm... still confusing the fook out of me... will try and learn more from these configs, but they'res still rather cryptic Share this post Link to post Share on other sites
DanAK47 1 Posted January 20, 2005 Magazines go in cfgWeapons, not cfgAmmo. cfgAmmo is for BulletSingle and etc. Edit: You seem to have combined the ammo class and the magazine class. should be like this. class cfgAmmo { class gunBullet {}; }; class cfgWeapons { class gun { magazines[]={gunmag}; }; class gunmag: gun { ammo=gunbullet; }; }; Share this post Link to post Share on other sites
Messiah 2 Posted January 20, 2005 i'm not completely sure what you mean... so i put the bullet single stuff in cfgammo and then the other stuff in cfgweapons? Share this post Link to post Share on other sites
bedlam 0 Posted January 21, 2005 in cfgammo u define the bullet. in cfgweapons u define weapon and mag. right now u have the magazine defined in cfgammo when it should be in cfgweapons. it should be like. -------------------------------------- cfgammo { class thebullet  {  your settings for the bullet=damage speed explosive or not.  }; }; ---------------------------------------- cfgweapons { class theweapon  {  magazines []={themagazine}  }; class themagazine  {  ammo="thebullet"  count= "30" = amount of thebullet in themagazine.  }; }; Share this post Link to post Share on other sites
Messiah 2 Posted January 21, 2005 aaah.... ok... i see now - a bullet is defined in the ammo bit... then you make a magazine of that bullet in the weapons bit simple Share this post Link to post Share on other sites