Rinaldi 2 Posted April 23, 2020 Hey guys, I've been doing some testing playing the latest patched version of SF2 merged with Vietnam and Israel and Europe, on the Op Darius mod and I've been getting some interesting results with wingmen in campaign but I've had trouble re-creating it in single battle. When ordered to attack something when they have mavericks they will often either: Make several runs without firing; or Follow the maverick down and slam into the ground; or Successfully attack but fail to call rifle This appears to occur less frequently in single battle, and rarely appears to occur unless they're attacking secondary targets. I've had to refly some missions to avoid losing wingmen to what I believe is a bug; any thoughts or fixes? Share this post Link to post Share on other sites
+Gunrunner 314 Posted April 23, 2020 (edited) There is a problem with the AI and missiles. 1) The AI can't use Laser weapons (well, that's not entirely true, under specific conditions your wingmen might use them, but not always, and no other AI plane, it's better to avoid them for AI use). 2) The AI uses the RocketAttackAI statements of their DATA.ini to attack, which means that while it is suited for rockets, it usually fails for modern, long range missiles. 3) Modifying the RocketAttackAI statement means you will tailor it for a certain range-class of missiles but means the AI won't correctly handle rockets and classes of missiles requiring another attack profile. You could tailor planes to have a better attack profile for Mavericks, but then the planes won't be able to have an efficient dumb rocket attack, or missiles with a different profile requirement. The parameters in the plane's DATA.INI are (values are there as an example for dumb rockets, not missiles) : [RocketAttackAI] RollInRange=8000.0 RollInAlt=1400.0 PullOutRange=900.0 PullOutAlt=200.0 ReleaseRange=2000.0 SecondPassRange=4500.0 SecondPassAlt=750.0 ReleaseCount=16 ReleaseInterval=0.08 AimPitchOffset=0.6 Everything is in meters, except ReleaseCount (in number of weapons fired), ReleaseInterval (in seconds) and Aim PitchOffset (in degrees). RollInRange and RollInAlt are the distance to target and altitude the AI tries to reach before starting its attack pattern. PullOutRange and PullOutAlt are the distance to target and altitude from which the AI will break out of its attack pattern. ReleaseRange is the distance to target at which the AI will try to fire its rocket/missiles. SecondPassRange and SecondPassAlt are the parameters for an eventual second (or subsequent passes), useful if you want to have a first pass at long range but don't want to wait for the AI to go all the way back to do another pass if the missile can be launched at closed range. ReleaseCount is the number of missiles launched per attack run, ReleaseInterval is the interval between each release. AimPitchOffset is for dumb rockets, and the number of degrees above or below the target the AI should fire (to attack for gravity and the pitch angle of rocket attachments), it's mostly useless for guided missiles. In the example above that means the AI will try to be 8km away from its target, at an altitude of 1400m, then will dive toward it, aiming 0.6° above and firing 16 rockets, 1 every 0.08 seconds when it is 2km away from the target. I can't remember if the PullOut values are the limits after which the plane disengage or a target to reach after firing. Once disengaged from it's first pass, if the AI still can fire the same ordnance it will try to get 4.5km away from the target, at an altitude of 750m and repeat the process. What happens in your case is probably that the plane tries to use the default, suited for dumb rockets, attack profile, meaning by the time it tries to fire the Maverick, it's already closer than the MiniLaunchRange for the missile, hence the passes without firing. The slamming into the ground might be solved by changing the PullOut parameters. The failure to call Rifle though is a bug that probably can't be solved that way and is probably tied to the number of sound voices playable simultaneously and their priority. Edited April 23, 2020 by Gunrunner 5 1 Share this post Link to post Share on other sites
Wilches 1,172 Posted April 23, 2020 I prefer to set everything ralated on second pass to =0. This forces the plane to spend all ammo on the first pass as the real thing. Share this post Link to post Share on other sites
+Gunrunner 314 Posted April 24, 2020 Actually to guarantee a single pass you'd also need to specify a ReleaseCount superior or equal to the max number of ordnance, and set your attack run so all ordnance has time to be released before PullOut, otherwise there will be ordnance remaining and you take the risk of the AI doing another attack run using the original RollIn parameters. Share this post Link to post Share on other sites
Rinaldi 2 Posted April 24, 2020 Cheers guys, that helped - turns out the modders had the precognizance to see this problem too. I usually fiddle around with loadouts depending on the circumstances of the mission but it seems the default loadout for SEAD has a bunch of 'AI' friendly smart munitions, I just have to swap my own out. Share this post Link to post Share on other sites
+guuruu 5,910 Posted April 24, 2020 The best ammo for A(not so)I are freefalls and ARM. They really can do miracles with other weapons ;-) 1 Share this post Link to post Share on other sites
+Crusader 2,101 Posted April 24, 2020 Excellent summary by Gunrunner And the default values for all AI attack profiles are in the AIRCRAFTAIDATA.ini (ObjectData001.cat). Share this post Link to post Share on other sites
JosefK 912 Posted April 24, 2020 OK, I've had this idea for a while.... But how do AI handle optically guided weapons? Maybe if LGBs became optically guided for AI they'd actually come off the AI rails. I've seen this very same problem - send a F-15 with precision bombs directly over a target and it won't drop. 1 Share this post Link to post Share on other sites
Rinaldi 2 Posted April 24, 2020 45 minutes ago, JosefK said: Maybe if LGBs became optically guided for AI they'd actually come off the AI rails. I've seen this very same problem - send a F-15 with precision bombs directly over a target and it won't drop. That seems to be exactly what the mod team for OP Darius has done. I shoulda RTFM'd. There's 'AI' variants that are all EOGB of what would otherwise be LGB. 1 Share this post Link to post Share on other sites
+Gunrunner 314 Posted April 25, 2020 EOGR and EOGB, provided a correct AI attack pattern, do work fine for all AIs, in most cases. CGR is a little more random and you must ensure the AI only has one in flight at a time and that the carrier still dives toward the target until it hits, because the game seems to properly track if the AI launcher "guides" the missile. Share this post Link to post Share on other sites
+Gunrunner 314 Posted April 29, 2020 Actually, I was not entirely right, after extensive testing using adjusted MaxVisibleDistance for targets it seems the ATG_AGM behaviour is not always following the RocketAttackAI profile, provided the AI starts its attack far enough from the target it seems to do its own thing properly, without an explicit AI profile, only firing one missile, at long range; but if it's too close to the target (or the target has too short a MaxVisibleDistance) it seems to revert to the behaviour set by RocketAttackAI (I thought it a coincidence but altering RocketAttackAI seems to affect that close range behaviour), with all the limitations and issues discussed previously. My hypothesis is that the attack profile for AGMs is either dynamic, based on the weapon's data, or hard coded (but why TK decided to do it that way when he added entries for the newer CruiseMissile remains a mystery), but similar to how the engine determines whether to conduct a LevelBombAI or DiveBombAI bombing run, there is a distance to target element to which of two behaviours it uses. Reasons it might not always work as intended thus are not really related to AI profile but possibly problems linked to warping (and thus the AI being too close to the target), or possibly a visibility issue, the target becoming visible to the AI at too short a range for the AI not to revert to the RocketAttackAI profile. Editing the AI profile thus helps mitigate the problem but isn't properly dealing with it as it creates its own issues. My previous statements are still valid for weapons set as guided rockets such as APKWS and Vikhr which are set up as ammo for Rocket Pods (at least the ones I use). Anyway... lots of things to change to take that into account, dammit, for years I was wrong on that one. 2 Share this post Link to post Share on other sites