Opened 7 years ago

Closed 6 years ago

#4622 closed defect (fixed)

Danubius attackers should ignore units on the other side of the map

Reported by: elexis Owned by: elexis
Priority: Nice to Have Milestone: Alpha 23
Component: Maps Keywords:
Cc: Patch: Phab:D1449

Description

After being ungarrisoned from a gaia ship, the attackers look for the N closest enemies around and then patrol.

This prevents them from spending a lot of time doing unneeded things and especially rams will directly go for towers, fortresses and civic centers without further ado.

However it can rarely occur that the gaia attacker choses an enemy on the other side of the river as a target, because that is the closest enemy of that unit. Thus the entire shipload will be stuck at the shoreline trying to reach that unit until that unit died.

AttackAndPatrol of danubius_triggers.js could get a new argument stating whether it should look for enemies on the left or right side of the river (see also the mapsize checks). That argument would have to receive a third value for ships which should look everywhere for enemies (maybe undefined).

Change History (5)

comment:1 by elexis, 7 years ago

targetCount: Another issue is the targetCount = 3 variable making ungarrisoned units attack the 3 closest enemies one after another. But since the units move around, this can mean that the unit is killed by closer enemies chasing one unit that is far away. The number should probably set to 1 for land units and stay 3 for ships. The use of that variable is to not waste time patroling in random areas but to walk straight to the closest enemy. For ships in particular useful from the gaia POV.

Healers receive the same commands as other units, i.e. attack and patrol. So they ignore the attack command and start patroling immediately, which is guaranteed to make them split from their attacker group. Instead they should receive a guard order for some of these units.

comment:2 by elexis, 6 years ago

In r21465:

On Danubius, send soldier attack commands last, so that observers follow these units rather than the ships after the ungarrisoning.

Since healers can't attack enemies, they have left the gaia attacker group immediately to start patroling. To fix that, change healers to guard random soldiers of that group, preferably heroes or champions. Use absolute formation template paths.

comment:3 by elexis, 6 years ago

Keywords: simple removed
Patch: Phab:D1449

comment:4 by elexis, 6 years ago

Milestone: BacklogAlpha 23

comment:5 by elexis, 6 years ago

Owner: set to elexis
Resolution: fixed
Status: newclosed

In 21767:

Fix gaia attackers on the left riverside of Danubius trying to attack units on the right riverside if they happened to be closer, fixes #4622.

At most send an attack order for one target before patroling (targetCount),
because adding further targets can end in the gaia unit being blocked and slaughtered by the player without difficulty and
because the mechanism isn't as relevant for ships as it was envisioned to be (since most ofen the 3 closest ships already are in the same location).

Patch By: (-_-) aka smiley
Differential Revision: https://code.wildfiregames.com/D1449

Note: See TracTickets for help on using tickets.