-Snafu- 79 Posted March 4, 2011 I've read that in order to get more realistic firefights by increasing AI engagement ranges you need to modify cfgAmmo in the config.cpp. cfgAmmo class CfgAmmo { access=1; class Default { access=3; hit=0; indirectHit=0; indirectHitRange=1; minRange=0.5; minRangeProbab=0.5; midRange=100; midRangeProbab=0.8; maxRange=450; maxRangeProbab=0.05; model=""; proxyShape=""; simulation=""; cost=0; maxSpeed=0; cartridge=""; simulationStep=0.05; tracerColor[]={0.7,0.7,0.5,0.04}; tracerColorR[]={0.7,0.7,0.5,0.04}; soundFly[]={"",1,1}; soundEngine[]={"",1,1}; soundHit[]={"",1,1}; hitGround[]={"soundHit",1}; hitMan[]={"soundHit",1}; hitArmor[]={"soundHit",1}; hitBuilding[]={"soundHit",1}; explosive=1; irLock=0; airLock=0; laserLock=0; manualControl=0; maxControlRange=350; maneuvrability=1.0; sideAirFriction=1; visibleFire=0; audibleFire=0; visibleFireTime=0; initTime=0; thrustTime=1.5; thrust=210; }; class BulletSingle:Default { hit=9; indirectHit=2; indirectHitRange=0.1; model="shell"; simulation="shotBullet"; simulationStep=0.05; soundFly[]={"objects\bulletnoise",0.2511886,0.7}; explosive=0; visibleFire=16; audibleFire=16; visibleFireTime=3; minRange=10; minRangeProbab=0.1; midRange=50; midRangeProbab=0.38; maxRange=200; maxRangeProbab=0.04; soundHit1[]={"weapons\bulletricochet1",0.0316228,1}; soundHit2[]={"weapons\bulletricochet2",0.0316228,1}; soundHit3[]={"weapons\bulletricochet3",0.0316228,1}; soundHitMan1[]={"weapons\bullethitman1",0.0125893,1}; soundHitMan2[]={"weapons\bullethitman2",0.0125893,1}; soundHitArmor1[]={"weapons\small_impact1",0.0316228,1}; soundHitArmor2[]={"weapons\Big_Impact2",0.0316228,1}; soundHitBuilding1[]={"weapons\bulletricochet4",0.0316228,1}; soundHitBuilding2[]={"weapons\bulletricochet5",0.0316228,1}; hitGround[]={"soundHit1",0.33,"soundHit2",0.33,"soundHit3",0.33}; hitMan[]={"soundHitMan1",0.5,"soundHitMan2",0.5}; hitArmor[]={"soundHitArmor1",0.7,"soundHitArmor2",0.3}; hitBuilding[]={"soundHitBuilding1",0.5,"soundHitBuilding2",0.5}; cartridge="FxCartridge"; cost=0.7; }; class BulletBurst:BulletSingle { minRange=0.5; minRangeProbab=0.25; midRange=70; midRangeProbab=0.5; maxRange=250; maxRangeProbab=0.08; visibleFire=25; audibleFire=25; visibleFireTime=5; cost=2.0999999; }; class BulletFullAuto:BulletBurst { cost=2.5; }; class BulletSilencedSingle:BulletSingle { hit=8; indirectHit=1; indirectHitRange=0.1; visibleFire=0.035; audibleFire=0.035; visibleFireTime=2; tracerColor[]={0,0,0,0.005}; tracerColorR[]={0,0,0,0.005}; }; class BulletSilencedBurst:BulletBurst { hit=8; indirectHit=1; indirectHitRange=0.1; visibleFire=0.05; audibleFire=0.05; visibleFireTime=2; tracerColor[]={0,0,0,0.005}; tracerColorR[]={0,0,0,0.005}; }; class BulletSniper:BulletSingle { hit=10; indirectHit=2; indirectHitRange=0.1; minRange=1; minRangeProbab=0.1; midRange=200; midRangeProbab=0.8; maxRange=900; maxRangeProbab=0.05; cost=2; tracerColor[]={0,0,0,0.005}; tracerColorR[]={0,0,0,0.005}; }; class Bullet7_6:BulletSingle { airLock=1; hit=8; indirectHit=2; indirectHitRange=0.1; minRange=1; minRangeProbab=0.9; midRange=100; midRangeProbab=0.5; maxRange=450; maxRangeProbab=0.05; cost=4; }; class Bullet12_7:Bullet7_6 { hit=13; indirectHit=4; indirectHitRange=0.2; minRange=4; minRangeProbab=0.9; midRange=200; midRangeProbab=0.5; maxRange=500; maxRangeProbab=0.05; cost=6; }; I'm guessing minRange is the minimum range with which the AI will engage an enemy using that bullet type and maxRange being the max range at which the AI will engane an enemy. What does Probab mean? I want to increase the engagement ranges like so: Rifle - 500 metres Machinegun - 800 metres M2 - 1200 metres I have highlighted (bold and italics) two other sections that I am unsure of but would they relate to machineguns? Share this post Link to post Share on other sites
zulu1 145 Posted March 5, 2011 (edited) Hi Snafu, It's this area you'll want to edit: minRange=10;minRangeProbab=0.1; midRange=50; midRangeProbab=0.38; maxRange=200; maxRangeProbab=0.04; The ranges and hit probability will determine how far out the AI will engage and what changes they have of a hit for each distance. *edit 1.00=100% chance and .01=1% chance. Keep in mind that a single shot would be more accurate than burst fire and more so over auto fire. If you give single the most distance, then burst a closer distance and auto even closer yet you'll get the most realism. You can also simulate covering or supressing fire like for an m60 or saw by playing with AIfire rate and distance which I think is in the cfgweapons section. Bullet12_7 is for the M2 machinegun. Edited March 5, 2011 by Zulu1 Share this post Link to post Share on other sites
-Snafu- 79 Posted March 5, 2011 Thanks very much Zulu1, I'll have a play about with those numbers. Share this post Link to post Share on other sites