Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: General Battuta on November 01, 2015, 02:00:26 pm

Title: AI evades long range missiles
Post by: General Battuta on November 01, 2015, 02:00:26 pm
We all know the AI is bad at dodging trebs. They evade and pump countermeasures way too late.

Is this because the AI's evade behavior triggers at a set distance from the missile, and Trebs are very high-speed? (If so, this is the same reason birds often hit airplanes in real life: they don't adjust their dodge distance based on the plane's speed!)

If that is true, could we get an AI profile flag, something like $Missile Evade Distance Scales: YES that would cause the AI to adjust its evade behavior based on the missile's speed?
Title: Re: AI evades long range missiles
Post by: niffiwan on November 01, 2015, 04:31:50 pm
I haven't checked but I'm sure what you describe is the problem, i.e. the AI doesn't dodge soon enough.  It also doesn't help that countermeasures only have a default effective radius of 300m (which I'm sure the AI account for), many Treb engagements are head-on, and with a velocity of 280 + targets forward velocity (plus possibly the launchers forward velocity?) there's less than a 1 sec window to pop a countermeasure. I know *I* always dodge Trebs rather than decoy them. 

Anyway, probably can be done, since it's AI code probably not trivial unfortunately.

Fun fact, Trebs speed is 280, Harpoons are 250, so they're not really very-high-speed :)
Title: Re: AI evades long range missiles
Post by: Bryan See on November 15, 2015, 12:10:16 pm
And what about higher velocities of up to 500 m/s? Surprisingly my fighters and bombers were able to evade missiles much like Ace Combat and Tom Clancy's H.A.W.X.
Title: Re: AI evades long range missiles
Post by: niffiwan on November 15, 2015, 03:21:13 pm
Tell us more! What sort of AI options are you using, what sort of speeds are your fighters flying at, are the missiles closing head on or is it a tail-chasing situation?
Title: Re: AI evades long range missiles
Post by: Bryan See on November 15, 2015, 09:48:58 pm
I'm using AI options of that of Fury's: Chance AI Has to Fire Missiles at Player, evasion, etc.

Speeds my fighters flying at 500 m/s.

Missiles on both closing head and a tail-chasing situation.
Title: Re: AI evades long range missiles
Post by: General Battuta on November 30, 2015, 03:04:28 pm
Just checking in! Do we have any idea if this is actually a particular problem with the Treb, or is the AI just real bad at evading face shots?
Title: Re: AI evades long range missiles
Post by: niffiwan on November 30, 2015, 03:24:39 pm
:nervous: Needs more testing to figure out what on earth the AI is doing upon receiving a Treb.
Title: Re: AI evades long range missiles
Post by: Bryan See on November 30, 2015, 08:37:18 pm
A Treb or something similar, niffiwan and General Battuta.