| 12-05-2004, 07:58 PM | #1 |
The Problem: I told a group of footmen to attack an army of grunts and raiders. If the raiders are behind the grunts the footmen will try to run around the grunts to attack the raiders instead of their nearest enemy. They get killed by the untouched grunts because they won't stand and fight. The Question: Does anyone know how War3 units prioritize targets? I know there is a priority value in the unitdata.slk, but changing that didn't solve this problem. Is there any way around this problem? Would it involve triggers? |
| 12-05-2004, 10:01 PM | #2 |
I have a very similar problem. In my map, I have a bunch of dummy units a player can't control (ship turrets). I would like them to fire randomly at all targets in range, but even though they are not controlled by the player, they prioritize their targets to such an extent that they alway end up focusing fire on a single target; when a guard tower and a canon tower are in range, the guard tower always gets hit first (even though they have same hp; they have different priority values, if that means anything...); then there are two ships, both based on the same original unit, the only thing being modified were hp and armor, and again, one of them gets focuse-fired, even if I see the other ship first... I could do extensive testing, but it's really a lot easier to ask and see if anybody else knows: how do units prioritize targets when auto-acquireing them, and how can I randomize this? |
| 12-06-2004, 12:03 AM | #3 |
Maybe computer AI occurs and footmans attack raiders because they have medium armor and deal more damage. the priority i think is used for tab groups, so units with less priority are displayed more on right and on left the higher priority. |
| 12-06-2004, 06:28 AM | #4 |
After testing I have discovered that it has to do with the unit's defense type. In my mod I had grunts using fortified defense and raiders using large. The AI wanted to attack the large defense before the fortified defnse causing the footmen to run around rather than fight. |
| 12-06-2004, 11:00 AM | #5 |
I still have my question: even on units with same armor types, auto-acquiering seems to prioriterize the targets: I'm assuming that it does it based on hp, shooting at the weakest first, but I'm not entirely sure of that. So, what exactly is the target prioritization based on and how could I randomize it? Edit: new findings: a turret on my ship has in range an enemy tower and an enemy shipyard (it has no attack). You would expect the turrets to fire at the tower first. However, that is only the case untill the tower starts attacking a third player's ship that respawns nearby, in that moment, my turrets find the shipyard to be a more important target. :/ Sooo, target auto-acquisition seems to be an enormly complex mechanism... I guess the only way to randomize would be to order my turrets to target a specific random unit (lol, "specific random") with triggers... By the way, why was this moved to Siberia... err... the JASS vault? Combat auto-acquisition seems like a very general theme... unless there are AI settings that could help me randomize this? |
