Jump to content
[frl]myke

Increasing AI engagement distance

Recommended Posts

Hey lads,

actually i'm experimenting with missile values to increase engagement distance of pilots. At the moment i'm stuck. Although i have increased the relevant config parts, they don't engage farther than ~6000m.

cfgVehicles

	irScanRangeMin = 35000;
	irScanRangeMax = 35000;
	irScanToEyeFactor = 1;
	ejectDamageLimit = 0.85;
	accuracy = 0.01;
	camouflage = 20;

cfgWeapons

	minRange = 500;
	minRangeProbab = 0.2;
	midRange = 10000;
	midRangeProbab = 0.4;
	maxRange = 30000;
	maxRangeProbab = 0.9;
	aiRateOfFire = 5.0;
	aiRateOfFireDistance = 30000;

The missile itself (R-73) can easily reach and hit targets in 20km range, tested it myself. Also lock is possible.

Probably i'm missing one config entry but i can't see which. Any help is much appreciated.

Again, it is about how AI handles it, not player.

Share this post


Link to post
Share on other sites

Does _unit reveal _target change any of that?

I think it has to do with the various AI settings for vehicles, and CfgAISkill, see for example:

http://dev-heaven.net/projects/ace-mod2/repository/revisions/develop/entry/Addons/c_ai_skill/CfgAISkill.hpp

http://dev-heaven.net/projects/ace-mod2/repository/revisions/develop/entry/Addons/c_ai_sensors/CfgVehicles.hpp

Diff between ACE and Vanilla: /configclasses/diff/CfgAISkill?versions=1,2

Edited by Sickboy

Share this post


Link to post
Share on other sites

Reveal doesn't change anything on that behaviour. Although they had me at a range of ~28km on their targetlist (checked with nearTargets) AI opened fire still around 6km.

I used this script to gather a few info's. It's a dirty script but good enough for rough testing:

private ["_this"];
_list = [];
while {alive _this} do {
_list = _list + [{_x select 4} foreach ((gunner _this) nearTargets 50000)];
//{_x reveal player} foreach (crew _this);
hintsilent format ["%1\n%2\n%3\n%4", _list, _this knowsabout player, _this distance (vehicle player), time];
sleep 0.5;
_list = [];
};

I know, there is a error with the _list variable but was too lazy to fix it since it isn't that important and i got the info needed anyway.

Odd thing is, knowsabout level didn't changed itself. Using reveal set it to 1 and it stayed one all the time, even when AI fired at me. Without reveal, it stayed at 0.

Share this post


Link to post
Share on other sites
Tried changing the AI ROF and Distance to 0 ?

Didn't changed anything.

Share this post


Link to post
Share on other sites

probably has to do with your viewdistance setting? Ive noticed that tanks drop their engagement range from normal down to 500m if you set the view distance at 500m. So if you have your viewdistance at 6000, your planes cant engange unless they are inside the 6000m radius. I think that should be right, havent tested it extensively, just something i notice from time to time.

Share this post


Link to post
Share on other sites

@Jelliz

thanks for your input but this case i already could exclude. I have my VD up to 10km, also the config settings are set that VD is no longer taken into consideration. Did countercheck by setting VD down to 500 meters (which is ugly btw) and AI still shot at ~6000 meters.

But thanks for your attempt, much appreciated.

Share this post


Link to post
Share on other sites

well guess you are at the point where I was some weeks ago... :D

I did the same thing as you and came to the conclusion that the AI isnt capable of successfully aquire targets beyond 5-6km. Even on a perfectly flat map like Sand from GNT.

Guess its some kind of enginge limitation. The only way I can think of is forcing the AAA to look at the direction of the target, force it to shoot, delete the missile via eventhandler and creating a new one (with mando missile?)...

Hope anyone can prove me wrong as I dont like this bruteforce method very much ;)

EDIT: Sorry overread the fact that you are doing it for aircrafts. But well its basically the same idea just the opposit place of the missle´s direction *g*

Edited by Perfect Dark

Share this post


Link to post
Share on other sites
Hey lads,

actually i'm experimenting with missile values to increase engagement distance of pilots. At the moment i'm stuck. Although i have increased the relevant config parts, they don't engage farther than ~6000m.

cfgVehicles

	irScanRangeMin = 35000;
	irScanRangeMax = 35000;
	irScanToEyeFactor = 1;
	ejectDamageLimit = 0.85;
	accuracy = 0.01;
	camouflage = 20;

cfgWeapons

	minRange = 500;
	minRangeProbab = 0.2;
	midRange = 10000;
	midRangeProbab = 0.4;
	maxRange = 30000;
	maxRangeProbab = 0.9;
	aiRateOfFire = 5.0;
	aiRateOfFireDistance = 30000;

The missile itself (R-73) can easily reach and hit targets in 20km range, tested it myself. Also lock is possible.

Probably i'm missing one config entry but i can't see which. Any help is much appreciated.

Again, it is about how AI handles it, not player.

What program do I need to look at these values?

Where are they located / the files for each of these units, that is....

Thanks for any help....

Share this post


Link to post
Share on other sites

It's been a long time since I've messed with this missile/lockon area (early arma1). I can't say for sure I had them engage past 6000m. I might have been able to get 5000-10000, I cant remember. All I remember was that in a couple tests, the distance was longer then the rockets fuel because it would fall out of the sky, lol. Maybe you did reach a limit though. :confused:

Have you tried increasing the "irScanToEyeFactor"? This was the magic parameter for lockon/radar ability.

Try this and see if AI engage farther..

//irScanRangeMin = 35000; (you might want to comment this out to use the default value for MIN, just in case this causes any issues)
irScanRangeMax = 35000;
irScanToEyeFactor = 5; (something larger then 1. I think I tested up to 5, but there may be a cap on this parameter, not sure)

Also when testing,

1) make the plane fly at "limited" speed to give it time to fire.

2) have ai armor targets moving, not idle.

Share this post


Link to post
Share on other sites
All I remember was that in a couple tests, the distance was longer then the rockets fuel because it would fall out of the sky, lol. Maybe you did reach a limit though.

I can exclude that. As i have already stated, the missile itself can lock on and hit targets in +20km without problem...if fired by human player.

class M_R73_AA : MissileBase {
	hit = 150;
	indirectHit = 64;
	indirectHitRange = 8;
	trackLead = 1.0;
	trackOversteer = 1.0;
	maxControlRange = 30000;
	sideAirFriction = 0.1;
	timeToLive = 60;
	maxSpeed = 1005;
	thrustTime = 24.0;
	thrust = 400;
	effectsMissile = "GLT_Missile1";
	cost = 1;
};

class R73Launcher : MissileLauncher {
	minRange = 500;
	minRangeProbab = 0.2;
	midRange = 10000;
	midRangeProbab = 0.8;
	maxRange = 30000;
	maxRangeProbab = 0.78;
	aiRateOfFire = 0;
	aiRateOfFireDistance = 0;
};

class Su34 : Plane {
	irScanRangeMin = 35000;
	irScanRangeMax = 35000;
	irScanToEyeFactor = 5;
	ejectDamageLimit = 0.85;
	accuracy = 0.01;
	camouflage = 20;
	sensitivity = 0.1;
	class Turrets {
		class MainTurret : NewTurret {
			weapons[] = {"GSh301", "GLT_Ch29LauncherLaser", "GLT_Ch29Launcher_IR", "R73Launcher", "80mmLauncher"};
			magazines[] = {"180Rnd_30mm_GSh301", "GLT_2Rnd_Ch29L", "GLT_4Rnd_Ch29T", "4Rnd_R73", "40Rnd_S8T"};
		};
	};
};

Those are the actual settings. I've alread switched values up and down of all these settings but AI refuses to fire missiles at targets further than ~6km.

Let me also explain the test situation:

myself in a AV-8B

AI in SU34

Starting distance: +30km

AI Skill is maxed, AI has WP "Destroy" at my starting position, Combat and red.

We're facing each other at start and we fly directly to each other. So it's face-to-face.

At ~15km i can lock the SU (fits with the settings of the AV-8B) and we're still facing each other.

When we're ~6km apart, a hint is shown by fired EH so i see the SU has fired.

Viewdistance is @ 10000m, weather is sunny, no fog.

So god damn it, how do i get the AI engaging at larger distances? Performing true BVR air combat? I start to think that it is somehow hardcoded and there wont be any solution.

Share this post


Link to post
Share on other sites

try to incrase sensitivity = 0.1 to 10???

and

maxRange = 30000;

maxRangeProbab = 0.78 to 0.88 or 98

aiRateOfFire = 0; to 1

aiRateOfFireDistance = 0; to 30000

Share this post


Link to post
Share on other sites

Hell, i can't believe it:

	irScanRangeMin = 3500000;
	irScanRangeMax = 3500000;

This will make lock and engagement distance 35km. Now look at it, seems like the used scale for this setting is centimeters. WTF?!?!?

Anyway, now it works in general, now i can do the finetune.

Thanks to all who provided input.

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

×