Opened 7 years ago

Closed 7 years ago

#4543 closed defect (fixed)

[PATCH] Melee cavalry should not preferentially target siege

Reported by: causative Owned by: elexis
Priority: Should Have Milestone: Alpha 22
Component: UI & Simulation Keywords: patch
Cc: Grugnas Patch: Phab:D394

Description

The templates for melee cavalry have <PreferredClasses>Siege Human</PreferredClasses>. This means for example that if there is an enemy army with a siege engine behind it, your cavalry on an attack-move order will try to run around/through the army to hit the siege engine, instead of engaging the army. Usually this means your cavalry die. Another scenario would be if there are archers you want your cavalry to engage and have walked your cavalry up to, but there's also a siege engine way off to the side near edge of LOS, your cavalry will ignore the adjacent archers and run far away to hit the siege engine. There is basically no scenario where it is helpful to have Siege as the most preferred class for melee cavalry.

This patch updates the various templates for melee cavalry and removes Siege as a preferred class, so they only have Human as a preferred class, like most other land units have.

To test: make a scenario with a hero cavalry spearman, a hero cavalry swordsman, a champion cavalry spearman, a champion cavalry swordsman, a citizen cavalry spearman, a citizen cavalry swordsman, a few enemy humans, and an enemy siege engine off to the side. Verify that if you order your cavalry to attack-walk past the humans, or halt them near the humans, they will attack the humans instead of the siege engine.

Attachments (1)

cavalrypreferredclasses.diff (3.3 KB ) - added by causative 7 years ago.

Download all attachments as: .zip

Change History (10)

by causative, 7 years ago

comment:1 by elexis, 7 years ago

Milestone: BacklogAlpha 22

We have phabricator for patches now. If you still use trac for that, set the milestone to work in progress or alpha 22 if it's imminent.

Since the problem is clear (40 champs in front of the siege engines that are happy to kill the units trying to reach the siege engine), borg- and Grugnas reported that too and I agree with the approach.

Should that remaining prefered class become Unit so that it focuses the closes unit, even if the unit is surrounded by rams? Maybe Unit without Ship?

I guess you've searched for all occurances of "<PreferredClasse" ?

Some players also weren't fond of elephants focusing structures, I kinda like it, because if they would focus units, one would have a hard time doing micro management when trying to do a quick big invasion

comment:2 by elexis, 7 years ago

Cc: Grugnas added

comment:3 by fatherbushido, 7 years ago

Just swap the preference order.

Last edited 7 years ago by fatherbushido (previous) (diff)

comment:4 by causative, 7 years ago

I used trac because I figured it's considered a bug. Should I move it to phabricator?

comment:5 by fatherbushido, 7 years ago

It was not a bug but intentional. (That said I am fine with changing it).

comment:6 by causative, 7 years ago

Yes, I did a search for PreferredClasses.

Could go for Unit, but it's not consistent with other templates, and possibly that could lead to them attacking sheep? Dunno.

Added a phabricator revision: https://code.wildfiregames.com/D394 I did swap the classes.

By the way, note that most land units, such as spearmen, archers, slingers, pikemen, etc, have only the PreferredClass Human. The exception is swordsmen and champ/hero swordsmen, who effectively have PreferredClass Human Siege. A reasonable possibility therefore would be to let the sword cavalry have Human Siege, and the spear cavalry have just Human.

comment:7 by Lionkanzen, 7 years ago

Make the announcement.

Last edited 7 years ago by Lionkanzen (previous) (diff)

comment:8 by elexis, 7 years ago

Keywords: review removed
Patch: Phab:D394

Make the announcement.

What announcement?

comment:9 by elexis, 7 years ago

Owner: set to elexis
Resolution: fixed
Status: newclosed

In 19590:

Revert the decision from rP18765 to let cavalry units prefer siege engines over human units, because they most often don't reach the siege engines before being massacred by the attackers.

Differential Revision: https://code.wildfiregames.com/D394
Fixes #4543
Refs #4194
Patch By: causative
Reviewed By: Grugnas
Reported By: borg-, ffm

Note: See TracTickets for help on using tickets.