Major Fubar 0 Posted July 31, 2002 Well, I'm still working on my PPSh41 addon, but I need some help, especially with the config.cpp file. I looked at the tutorial on config.cpp editing at OFPEC, but it didn't answer most of my questions (and the links to examples are all broken). Here are the things I am having trouble with/wish to know: - How do I get custom sounds working, in single shot and full auto mode. <span style='color:red'>sound[]={"\PPSh41\600.wav",db0,1};</span> What do the figures after the closing quotes control? - Where can I find the list of ingame weapon models and sights (I will be using the Bizon sights, but cant find the "optika_bizon.p3d" file. I will be using a custom weapon model when it's done, but for now I just want to use an AK47 for a dummy/beta version. - Which line in the config.cpp file controls rate of fire? The PPSH41 fires at around 900rpm. - Is there a list or turorial anywhere that tells me about weapon figures such as dispersion, AI reload time, etc. equate to ingame? I have looked at OFPEC and done a search here, but can't find the answers I am looking for. So far I have dePBO'd a bunch of addons and learned a lot, but I still need some help. Thanks, Fubar Share this post Link to post Share on other sites
Major Fubar 0 Posted July 31, 2002 Oh, also, how to get seperate equipment pics for a weapon and ammo (on the briefing>gear screen) Share this post Link to post Share on other sites
USMC Sniper 0 Posted July 31, 2002 Okay, I think I can answer some of your questions. To control the rate of fire, you have to edit the line that says reloadTime. The lower you put it, the higher the rate of fire. dispersion is the accuracy of the weapon. The lower you put the number in the dispersion line, the more accurate the weapon will be. I don't know what AiReloadTime does ingame, but it is most likely how long it takes the AI to reload the time. I suggest you just edit someone elses .cpp file of a similar gun, and just find out what works best for you. Oh, and the Bizon gunsight will be most likely in the directory of the bizon addon, for example: addons\bizon\optika_bizon.p3d, or something like that. Share this post Link to post Share on other sites
Major Fubar 0 Posted July 31, 2002 Hey, thanks for that...helps a lot! I've made the equipment pics (gun & drum), now I've just got to get them working. Oh, and the custom sounds! Share this post Link to post Share on other sites
Major Fubar 0 Posted July 31, 2002 OK, now I've got the sounds right (sorta, the full auto sound keeps playing for a second or two after you stop firing). The last thing now is equipemnt pics. I've got the weapon and ammo pics ready (in jpg format), my question is how to display 1 pic for weapon and the other for ammo slots (instead of miniature gun pics). Is this possible with jpg, or do I need to make them paa files? Share this post Link to post Share on other sites
Major Fubar 0 Posted July 31, 2002 It seems to have seperate pics for the weapon and mags, you have to define magazine class: magazines[]={PPSh41}; .................................................................................... class PPSh41mag: PPSh41 { displayNameMagazine = PPSh41 Mag; shortNameMagazine = PPSh41; picture="\PPSh41\m_ppsh41.jpg"; count=71; scopeWeapon=0; scopeMagazine=2; }; But this seems to create empty mags, and the pictures are still of the weapon, not the mags...what am i doing wrong? Share this post Link to post Share on other sites
Lansen 0 Posted July 31, 2002 I guess you have a long sound file for the full auto mode (more than 1 shot) and thats why it continiue sound like its firing, from what you say it seems like your file is a couple of seconds. If you want to hear only one shot when you shoot one single round in full automode or just doesnt want the sound to continiue after stop firing do this; Shorten the soundfile so it has only one shot, BANG! then just a little tiny bit of echo, not much... just a little bit. If you add too much it will be to long and you wont get your right firerate. If you want to be precise, make the bang the right length so you get the right fire rate in sound, so if you shoot 30 rnds in 10 sec .... then your sound maximum length us 0.33 seconds. make the Bang short but have a bit echo... then it will sound "live". good luck Share this post Link to post Share on other sites
N.o.R.S.u 0 Posted July 31, 2002 You must create CfgAmmo class if you want weapon using new ammo type. Example: class CfgAmmo { class Default{}; class BulletSingle: Default{}; class PPsh41ammo: BulletSingle { hit=12; indirectHit=0.1; indirectHitRange=0.1; }; }; hit, indirectHit and indirectHitRange decides how much damage ammo does and how accurate it is. Name of the ammo class must be placed like this: class Single { ammo="PPsh41ammo"; multiplier=1; burst=1; etc..... And for Bizon sights, use "\Bizon\optika_bizon.p3d" Hope this helps . Share this post Link to post Share on other sites
Major Fubar 0 Posted July 31, 2002 Thanks guys...got the sights and firing sounds working...the last thing is getting the magazine (drum) equipment pics to work...(get little pics of the gun instead). This is what I've got so far: </span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">#define false 0 #define true 1 class CfgPatches { class PPSh41 { units[] = {PPSh41soldier}; weapons[] = {PPSh41}; requiredVersion = 1.70; }; }; class CfgModels { class default {}; class Weapon: default {}; class Sa61Skorpion : Weapon {}; }; class CfgAmmo {   class default {};   class BulletSingle: Default{};   class BulletSilencedSingle: BulletSingle{};   class PPSh41Ammo: BulletSilencedSingle   {     hit=8;     indirectHit=0.1;     indirectHitRange=0.1;     }; }; class CfgWeapons { class Default {}; class MGun : Default {}; class Riffle: MGun {}; class AK47: Riffle {}; class PPSh41: AK47 { model="\PPSh41\Sa61Skorpion.p3d"; modelOptics="\PPSh41\optika_bizon.p3d"; magazines[]={PPSh41mag}; picture="\PPSh41\w_ppsh41.jpg"; displayName = "PPSh41 SMG"; displayNameMagazine = "PPSh41 Mag"; shortNameMagazine = "PPSh41"; modes[] = {Single, FullAuto}; count=71 class Single { ammo = "PPSh41Ammo"; multiplier = 1; burst=1; displayName = "PPSh 41"; dispersion=0.0002; sound[]={"\PPSh41\ppsh41single.wav",1.000000,1.25}; soundContinuous=false; reloadTime=0.15; ffCount=1; recoil=riffleSingle; autoFire = false; aiRateOfFire=5.0; aiRateOfFireDistance=500; useAction = false; useActionTitle = ""; }; class FullAuto { ammo = "PPSh41Ammo"; multiplier=1; burst=1; displayName = "PPSh41 Auto"; dispersion=0.0008; sound[]={"\PPSh41\ppsh41auto.wav",1.000000,1}; soundContinuous=true; reloadTime=0.05; ffCount=30; recoil=riffleBurst3; autoFire = true; aiRateOfFire=5.0; aiRateOfFireDistance=500; useAction = false; useActionTitle = ""; }; }; class PPSh41mag: PPSh41 { displayNameMagazine = PPSh41 Mag; shortNameMagazine = PPSh41; picture="\PPSh41\m_ppsh41.jpg"; count=71; scopeWeapon=0;  scopeMagazine=2; }; }; class CfgVehicles { class All{}; class AllVehicles : All{}; class Land : AllVehicles{}; class Man : Land{}; class Soldier : Man{}; class SoldierGB: Soldier{}; class PPSh41soldier: SoldierGB { displayName="Soldier (PPSh41)"; weapons[]={"PPSh41","Throw","Put"}; magazines[]={"PPSh41" , "PPSh41", "PPSh41" , "PPSh41" , "HandGrenade", "HandGrenade", "HandGrenade", "HandGrenade", "HandGrenade" , "HandGrenade"}; }; }; class CfgNonAIVehicles { class ProxyWeapon {}; class ProxyPPSh41Soldier : ProxyWeapon {}; };<span id='postcolor'> (Using the Skorpion as a temp model) I am obviously doing something wrong, because the equipment pics look like this: I have messed around with variations, but then I get empty mags... Share this post Link to post Share on other sites
SelectThis 0 Posted July 31, 2002 try adding scopeWeapon=2; scopeMagazine=0; to the class PPSh41: AK47 section. SelectThis Share this post Link to post Share on other sites
N.o.R.S.u 0 Posted July 31, 2002 Since you already have information for the magazine before the "class PPsh41mag: PPsh41" you only need to add this: class PPSh41mag: PPSh41 { picture="\PPSh41\m_ppsh41.jpg"; scopeMagazine=2; }; Share this post Link to post Share on other sites
Major Fubar 0 Posted August 1, 2002 Success! Thanks Norsu, I owe you one! Share this post Link to post Share on other sites
Major Fubar 0 Posted August 1, 2002 The beta version (using the Skorpion model) should be ready in the next day or so (just need to tweak the sounds a bit), let me know if you want it and I'll mail it to you... Share this post Link to post Share on other sites