Posted: Wed Jun 19, 2019 4:13 am Post subject:
Why does the AI obsess over Aircraft?
It is probably well known that when it comes to RA2 AI, aircraft will be the most important target to AA units if it is an option. This problem occurs unless the AI units are scripted to attack specific objects such as factories, infantry, or vehicles.
However, if a script type specifies that AI units should attack everything (the script code 0,1) then they will always choose aircraft as their first target. And I mean they will allow aircraft to interrupt their attack pattern. For example, if a group of IFVs are instructed to attack everything, they will attack the nearest units/structures as expected, but should a spy plane or paradrop plane spawn, or have enemy units present on an airpad or in flight, the IFVs will cease whatever they are attacking and immediately go after said aircraft.
I spend a lot of time testing and balancing the AIs, and I find it really kills their efficiency in destroying an opponent if their AA capable units keep wandering off to attack some spy plane on the complete other side of the map that doesn't even threaten them, often getting their units destroyed in the process. As such, I am forced to keep AA units scripted to attacking only vehicles, structures, or whatever else, despite that they would be far more effective against their opponent if they targeted everything (for example, an Apocalypse).
Has anyone ever found a solution to this, or will we have to wait for something like Ares to implement a fix? It's quite obnoxious to watch. I will say CanApproachTarget does not help this, as it only keeps them from following nearby aircraft across the map when in guard mode around their base. _________________ Tiberium Uprising (a few missions for TS): http://www.ppmsite.com/forum/viewtopic.php?t=31029 QUICK_EDIT
Try if setting TargetDistanceCoefficientDefault=-1 helps. More details at ModEnc.
You should also check if any AI TeamType needing the same set of units has higher Priority= and recruiting those specific units and assigning them to its own missions. Check with Tutorial. QUICK_EDIT
I can't say I saw any difference, as AA units told to attack everything still went out of their way to chase Spy Planes and literally the rockets from a V3 being launched at other opponents on the other side of the map. _________________ Tiberium Uprising (a few missions for TS): http://www.ppmsite.com/forum/viewtopic.php?t=31029 QUICK_EDIT
Try by setting AreTeamMembersRecruitable=no for the TeamTypes being tested. Can achieve the same by setting Priority to the highest value being used in the TeamTypes.
If you are not sure of the teamtype being tested is the same one executing attack anything script, could increase the units in taskforce or add some unique unit to the taskforce to identify or even test it on SP map. QUICK_EDIT
As I understand, that only stops units from chasing after they have already acquired a target, or from closing the distance when in guard mode and acquiring a target that's outside their weapon range. That doesn't affect target selection on the Attack Anything script action.
That said, I've never observed AA units prioritizing AircraftTypes over VehicleTypes on an Attack Anything mission. Do your taskforces have exclusively AA units, or a mix? Generally the order of threat scanning on Attack Anything goes VehicleTypes, AircraftTypes, InfantryTypes, and then BuildingTypes last. QUICK_EDIT
You could try DistributedFire on AA units so if they manage to fire on the aircraft they'll turn to something else?
That is generally what happens anyway. They will leave their current target to destroy a single particular aircraft, and once it is gone they will return to their primary mission. Although if there are many aircraft present, they made end up going around in circles chasing them all down.
I've already had CanApproachTarget=no attached on just about every AA unit, but as Worm pointed out, that has to do with chasing an acquired target. Say they are sitting in their base on guard mode and a spy plane flies by, CanApproachTarget=no just prevents them from traveling to chase it down.
But yeah, this issue has entirely to do with the actual target selection priorities. I can only imagine it has something to do with AircraftTypes themselves. _________________ Tiberium Uprising (a few missions for TS): http://www.ppmsite.com/forum/viewtopic.php?t=31029 QUICK_EDIT
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum