Jump to content
Sign in to follow this  
Scud

AI a bit low

Recommended Posts

f100atk.jpg

As you can see in pic, when AI attack they come in below tree level which for these fella's is really a major health risk.

How do I make them keep it up abit higher?

Is it something to do with accuracy?

Also nother prob is making them use correct weapons like bombs instead of guns?

Which is main reason why I want attack bit higher so they dont blow they're ass off.

Share this post


Link to post
Share on other sites

Oh Scud, welcome to a _world_ of hurt  tounge_o.gif

All the AI planes will swoop to attack. It's built into the game,

and it's hard to convince the AI to do otherwise.

If you want to stop them blowing themselves up, the best

thing to do is to adjust the sideairfriction on the bomb's in

cfgammo. Then, adjust the min/mid/max probabs and ranges

so that the bomb is released at around 500 m out.

The AI 'knows about' the cost and the explosive power of

the weapons it carries. So, it won't put a high powered bomb

on a 'jeep' - it will save the bomb for any 'tank' it comes

across. Try putting a SCUD launcher in the middle of those

trucks - the AI _will_ use bombs then.

Looking good, BTW.

Share this post


Link to post
Share on other sites

adjust the min/mid/max probabs and ranges

oky doky will give that ago

Thanx

p.s; I have been in the "world of hurt" for a long time now wink_o.gif

Share this post


Link to post
Share on other sites

Ok put a scud launcher in and t55 and they still blast 'em with guns so must be something missing in myammo and weapons cfg.

The funny thing is the AIM9B is used over guns and that was on the urals.

Share this post


Link to post
Share on other sites

Scud - Hmm. Is your bomb deriving from LaserGuidedBomb?

Try reducing the hit power of the guns, and see if the AI

likes the bombs better.

Maybe post CfgAmmo and CfgWeapons?

And yes, the AI will use AA weapons on ground targets. The

only way to stop this that I've found is to set irScanGround

to 0 in the plane cfg. That means you have to have separate

A2A and A2G versions.

Share this post


Link to post
Share on other sites
Quote[/b] ]hit=100;indirectHit=20;indirectHitRange=2;

guns are quite low already

bombs are from LGB's class and are standard from comcfg

just new class name and model.

A2A is sep but I haven't got irScanGround = 0; (well I have now)

Its funny that the A2A pref the rockets to guns can I derive the bombs from the AA ??

Share this post


Link to post
Share on other sites

The bomb launcher (in CfgWeapons) should be derived from

HellfireLauncher, in the same way as the AIM-9 launcher is.

You could try this - in order for the AI to attack with bombs,

it has to recognise the units far enough away that it can

set up a good bomb run. Try increasing irScanRangeMax to

5000 or so.

PM me the config, if you like, and I'll see if I can spot what's

happening.

Share this post


Link to post
Share on other sites

atk2.jpg

My Aim is from AA

and bombs are default LGB's

I will change and see what happens

Quote[/b] ]{

hit=100;indirectHit=20;indirectHitRange=2;

minRange=400;minRangeProbab=0.20;

midRange=600;midRangeProbab=0.50;

maxRange=800;maxRangeProbab=0.05;

cost = 10

};

This is guns but they still buzzing abit close.

Share this post


Link to post
Share on other sites

What's the reload time in CfgWeapons? If the AI can put

more 'damage' on the target with the guns rather than the

bombs, then it will select the guns:

Damage per unit time = 'hit' / 'reloadTime'

The AI 'knows' all these numbers, so you have to be a bit

careful sometimes.

The 100 for the hit is still a little high, IMO.

Share this post


Link to post
Share on other sites

"And yes, the AI will use AA weapons on ground targets. The

only way to stop this that I've found is to set irScanGround

to 0 in the plane cfg. That means you have to have separate

A2A and A2G versions. "

Err, Footmunch, what does it really means? What's the effect of "irScanGround=0"? The AI won't attack ground targets?

And I can see Scud's F-100 now. Nice.

Share this post


Link to post
Share on other sites

LizardX -

Yep. If irScanGround=0, ground vehicles won't appear on the

radar bar for the plane. Since the AI doesn't know about

them, it doesn't attack them.

Share this post


Link to post
Share on other sites

Ok changed all as above

A2A still fires Aim's instead of guns (not a major prob)

All bombs reload times are quicker then guns

changed to hellfire L. no diff Mav L. no diff

then AA now atleast bombs are dropped 3 outa 5 passes.

but havent changed guns hit yet. Will do

It just standard Bullet30E

Share this post


Link to post
Share on other sites

you could try writing a script that checks when the plane arms a certain weapon (bomb) and then "setflyinheight" to 60? chacks when its fired and resets height to normal or something like that crazy_o.gif

I was going to try this with the p51 im working on but havn't got to it yet

Share this post


Link to post
Share on other sites

Its mainly the guns that are the problem, when dropping bombs etc the planes don't swoop so low.

The script idea is a good one though, maybe just set a min height

?(getpos _plane select 2) <=25 : (getpos _plane select 2) ==25

or something to that effect

edited

lol I had ": ("  and it came up as  sad_o.gif

Share this post


Link to post
Share on other sites

at the mo bombs are dropped 500m pre target.

Can't get 'em any closer.

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

{

class Default {};

class BulletSingle : Default{};

class Bullet7_6: BulletSingle{};

class Bullet12_7: Bullet7_6 {};

class F10020mm: Bullet12_7

{

hit=60;indirectHit=20;indirectHitRange=2;

minRange=400;minRangeProbab=0.20;

midRange=600;midRangeProbab=0.95;

maxRange=1000;maxRangeProbab=0.35;

cost = 7

};

class AT3: Default {};

class Hellfire : AT3{};

class CarlGustav : AT3{};

class AA : CarlGustav{};

class LaserGuidedBomb : Default{};

class F100Napalm : LaserGuidedBomb

{

hit=990;indirectHit=300;indirectHitRange=20;

model=\csjf100\F100Napalm;

sideAirFriction = 0.3;

simulation=shotMissile;

thrustTime=0;

soundContinuous=0;

thrust=0;

irLock = true;

cost =2000;

soundHit[]={Explosions\expl2,db40,1};

minRange=50;minRangeProbab=0.90;

midRange=100;midRangeProbab=0.55;

maxRange=1000;maxRangeProbab=0.30;

maxSpeed=250;

simulationStep=0.05;

laserLock=false;

manualControl=false;

maneuvrability=1;

maxControlRange=500; // max range for manual control

soundFly[]={"\csjf100\bombdrop.wss",db+60,2};

};

class F100cbu24 :LaserGuidedBomb

{

hit=990;indirectHit=300;indirectHitRange=20;

model=\csjf100\F100cbu24;

sideAirFriction = 0.4;

simulation=shotMissile;

thrustTime=0;

soundContinuous=0;

thrust=0;

irLock = true;

cost =2000;

soundHit[]={Explosions\expl2,db40,1};

minRange=50;minRangeProbab=0.90;

midRange=150;midRangeProbab=0.55;

maxRange=1000;maxRangeProbab=0.30;

maxSpeed=250;

simulationStep=0.05;

laserLock=false;

manualControl=false;

maneuvrability=1;

maxControlRange=500; // max range for manual control

soundFly[]={"\csjf100\bombdrop.wss",db+70,2};

};

class F100Bomb : LaserGuidedBomb

{

hit=900;indirectHit=200;indirectHitRange=20;

model=\csjf100\F100Bomb;

sideAirFriction = 0.8;

simulation=shotMissile;

thrustTime=0;

soundContinuous=0;

thrust=0;

irLock = true;

cost =2000;

soundHit[]={Explosions\expl2,db40,1};

minRange=50;minRangeProbab=0.90;

midRange=200;midRangeProbab=0.55;

maxRange=1000;maxRangeProbab=0.30;

maxSpeed=250;

simulationStep=0.05;

laserLock=false;

manualControl=false;

maneuvrability=1;

maxControlRange=500; // max range for manual control

soundFly[]={"\csjf100\bombdrop.wss",db+80,2};

};

class F100DropTank : LaserGuidedBomb

{

hit=1;indirectHit=0;indirectHitRange=0;

model=\csjf100\F100DropTank;

sideAirFriction = 0.7;

irLock = false;

cost =300;

soundContinuous=0;

// soundHit[]={Explosions\expl2,db40,1};

minRange=0;minRangeProbab=0;

midRange=0;midRangeProbab=0;

maxRange=0;maxRangeProbab=0;

maxSpeed=150;

simulationStep=0.05;

laserLock=false;

manualControl=false;

maneuvrability=0.0;

maxControlRange=500; // max range for manual control

};

class F100Aim9B : AA

{

hit=800;indirectHit=180;indirectHitRange=2.5;

minRange=150;minRangeProbab=0.20;

midRange=500;midRangeProbab=0.95;

maxRange=1000;maxRangeProbab=0.30;

model=\csjf100\f100Aim9b;

simulation=shotMissile;

proxyShape= "\csjf100\F100Aim9B.p3d";

irLock = false;

airLock = true;

cost=20000;

manualControl=false;

maxControlRange=1000;

maxSpeed=750;

thrustTime=3.0;

thrust=300;

maneuvrability=6.0;

soundHit[]={Explosions\explosion_at3,db30,1};

soundFly[]={weapons\rocketflying,db-40,2};

};

};

// ------------------------------------------------------------------------------------------

-----------------

class CfgWeapons

{

class Default{};

class MGun: Default{};

class MachineGun7_6: MGun{};

class Bullet12_7: MachineGun7_6{};

class F10020mm: Bullet12_7

{

//--

displayName = "20mm Guns";

displayNameMagazine = $STR_MN_MG30;

shortNameMagazine = $STR_SN_MG30;

ammo=Bullet30E;

count=800;

reloadTime=0.2;

initSpeed=1000;

sound[]={"\csjf100\f100cannon.wss",db60,1};

flashSize=.5;

maxLeadSpeed=450; // max estimated speed km/h

optics = true;

aiRateOfFireDistance=1000;

};

class LAWLauncher: Default {};

class CarlGustavLauncher : LAWLauncher {};

class AT3Launcher: CarlGustavLauncher {};

class HellfireLauncher: AT3Launcher {};

class MaverickLauncher: HellfireLauncher {};

class ZuniLauncher38: AT3Launcher {};

class F100Napalm : HellfireLauncher

{

scopeWeapon = public;

scopeMagazine = public;

ammo=F100Napalm;

model= "\csjf100\F100Napalm.p3d";

proxyShape= "\csjf100\F100Napalm.p3d";

displayName="Napalm";

displayNameMagazine="F100Napalm";

shortNameMagazine={"F100Napalm"};

magazine= "F100Napalm";

magazines[]= {"F100Napalm"};

count=2;

reloadTime=1;

aiRateOfFire=5; // delay between shots at given distance

aiRateOfFireDistance=1000; // 1000 at shorter distance delay goes lineary to zero

sound[]={"\csjf100\f100bombdrop.wss",db+90,1};

reloadSound[]={Weapons\missload,db-70,1};

initSpeed=0;

autoFire = false;

};

class F100CBU24 : HellfireLauncher

{

scopeWeapon = public;

scopeMagazine = public;

ammo=f100cbu24;

model= "\csjf100\F100CBU24.p3d";

proxyShape= "\csjf100\F100CBU24.p3d";

displayName="CBU";

displayNameMagazine="F100CBU24";

shortNameMagazine={"F100CBU24"};

magazine= "F100CBU24";

magazines[]= {"F100CBU24"};

count=2;

reloadTime=1;

aiRateOfFire=5; // delay between shots at given distance

aiRateOfFireDistance=1000; // 1000 at shorter distance delay goes lineary to zero

sound[]={Weapons\rocket1,db-30,1};

reloadSound[]={Weapons\missload,db-70,1};

initSpeed=0;

autoFire = true;

};

class F100Bomb :HellfireLauncher

{

scopeWeapon = public;

scopeMagazine = public;

ammo=F100Bomb;

model= "\csjf100\F100Bomb.p3d";

proxyShape= "\csjf100\F100Bomb.p3d";

displayName="Bombs";

displayNameMagazine="F100Bomb";

shortNameMagazine={"F100Bomb"};

magazine= "F100Bomb";

magazines[]= {"F100Bomb"};

count=8;

reloadTime=1;

aiRateOfFire=2; // delay between shots at given distance

aiRateOfFireDistance=1000; // 1000 at shorter distance delay goes lineary to zero

sound[]={"\csjf100\f100bombdrop.wss",db+150,1};

reloadSound[]={Weapons\missload,db-70,1};

initSpeed=0;

autoFire = false;

};

class F100DropTank : HellfireLauncher

{

scopeWeapon = public;

scopeMagazine = public;

ammo=F100DropTank;

model= "\csjf100\F100DropTank.p3d";

proxyShape= "\csjf100\F100DropTank.p3d";

displayName="Jettison Fuel Tanks";

displayNameMagazine="F100DropTank";

shortNameMagazine={"F100DropTank"};

magazine= "F100DropTank";

magazines[]= {"F100DropTank"};

count=2;

reloadTime=0;

aiRateOfFire=0; // delay between shots at given distance

aiRateOfFireDistance=0; // 1000 at shorter distance delay goes lineary to zero

// sound[]={Weapons\rocket1,db-30,1};

// reloadSound[]={Weapons\missload,db-70,1};

initSpeed=0;

autoFire = true;

};

class F100Aim9B: MaverickLauncher

{

ammo=F100Aim9B;

displayName="Aim 9b";

displayNameMagazine="F100Aim9B";

shortNameMagazine="f100Aim9b";

count=4;

reloadTime=0.5;

sound[]={Weapons\Missile,db-60,1};

reloadSound[]={,0,1};

initSpeed=0;

};

};

Share this post


Link to post
Share on other sites

bombrange.jpg

Ok now we are getting somewhere.

Still not what I want but much closer.

Big thanx to Footmunch for throwing a few suggestions at me

(none of which sounded like hiss cough) wink_o.gif

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

// Ammo

class F100Bomb : Zuni

{

model=\csjf100\F100Bomb;

cost =2000;

hit=700;indirectHit=300;indirectHitRange=3;

minRange=50;minRangeProbab=0.20;

midRange=200;midRangeProbab=0.20;

maxRange=1000;maxRangeProbab=0.05;

maxSpeed=200;

maneuvrability=0.0;

maxControlRange=0; // max range for manual control

simulation=shotRocket;

simulationStep=0.05;

soundFly[]={"\csjf100\bombdrop.wss",db+60,2};

soundHit[]={Explosions\expl1,db40,1};

sideAirFriction = 0.1;

soundContinuous=false;

irLock=false;

laserLock=false;

initTime=0;

thrustTime=.005;

thrust=.005;

};

//weapons

class F100Bomb :HellfireLauncher

{

scopeWeapon = public;

scopeMagazine = public;

ammo=F100Bomb;

model= "\csjf100\F100Bomb.p3d";

proxyShape= "\csjf100\F100Bomb.p3d";

displayName="Bombs";

displayNameMagazine="F100Bomb";

shortNameMagazine={"F100Bomb"};

magazine= "F100Bomb";

magazines[]= {"F100Bomb"};

count=8;

reloadTime=1;

aiRateOfFire=2; // delay between shots at given distance

aiRateOfFireDistance=550; // 1000 at shorter distance delay goes lineary to zero

sound[]={"\csjf100\f100bombdrop.wss",db+150,1};

reloadSound[]={Weapons\missload,db-70,1};

initSpeed=50;

autoFire = false;

};

Share this post


Link to post
Share on other sites

Remove all the planes ordinance except for what you want him to use in the mission

Share this post


Link to post
Share on other sites

No good have gone back orig cpp

that 1 was 90% for AI but bloody shocker for player.

crazy_o.gif

Share this post


Link to post
Share on other sites

About the accuracy of the bombs..

I had a plane with 500kg bombs (RL) and 500 mass in O2.. AI couldn't hit a thing.. I changed the O2 mass to 50 and the AI could drop the bombs spot on .. maybe fiddle around with that a bit (for anyone still having probs) smile_o.gif

Share this post


Link to post
Share on other sites

Ok thanks all I think bombs are working as good as I can get them.

The problem being a combination of a few things one of hich is I am too fussy.

Thanx for help.

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  

×