Opened 15 months ago

Closed 14 months ago

Last modified 6 months ago

#4194 closed defect (fixed)

Missing PreferredClasses

Reported by: elexis Owned by: fatherbushido
Priority: Must Have Milestone: Alpha 21
Component: UI & Simulation Keywords: simple, patch
Cc: fatherbushido Patch:

Description

Many unit templates, especially champions have no PreferredClasses entry. Thus they attack buildings, if they are closer than soldiers. But since nearly all champion types aren't suited to destroy buildings, the entry should be added.

Attachments (2)

prefclasses.diff (16.3 KB) - added by fatherbushido 15 months ago.
let ship without pref classes
prefclasses.2.diff (17.8 KB) - added by fatherbushido 14 months ago.

Download all attachments as: .zip

Change History (18)

comment:1 Changed 15 months ago by fatherbushido

Keywords: patch review added
Milestone: BacklogAlpha 21

Changed 15 months ago by fatherbushido

Attachment: prefclasses.diff added

let ship without pref classes

comment:2 Changed 14 months ago by fatherbushido

I forgot the tower siege

Changed 14 months ago by fatherbushido

Attachment: prefclasses.2.diff added

comment:3 Changed 14 months ago by fatherbushido

It doesn't appear in the patch but for unit_infantry_melee_swordsman it's Human Siege (by tokens concatenation).

comment:4 Changed 14 months ago by fatherbushido

Owner: set to fatherbushido
Resolution: fixed
Status: newclosed

In 18765:

Adds missing preferred classes in some templates. Fixes #4194.

comment:5 Changed 13 months ago by elexis

In 18892:

Add missing preferred classes to ships. Reviewed by fatherbushido, refs #4194.

comment:6 Changed 13 months ago by mimo

Any reason why you've not inverted the order of the preferred classes? I would have expected ships to target primarily enemy ships rather than land units when both are in range.

comment:7 Changed 13 months ago by elexis

Well, garrisoning catapults on a quinquereme makes it highly useful against buildings, but from an economic point triremes garrisoned with 10 men are more efficient in sea battle. The given order means that fighting near an enemy shoreline, the quinquereme will wipe out the towers, walls and forts while the trireme ships kill the human attackers and ships, see also r18427.

Another reason why quinquereme ships are not good in naval battles is that they have a very slow repeat rate (one shot every 5 seconds), a very long range, thus a high chance of missing the target. This means if one wants to wipeout the shoreline, enemy ships can undermine the attack more easily.

comment:8 Changed 13 months ago by mimo

I was talking about land units, not structures. I understand for quinquereme, but what about bireme and trireme? A ship should first counter its more dangereous enemies, which are the other ships and not land units (specially if melee units). In addition, they should protect the quinquereme from being attack by other ships rather than trying to kill a few land units.

comment:9 Changed 13 months ago by elexis

Land units are easy kills, it gets a lot of loot. Usually these units die off within seconds or the enemy pay enough attention to immediately retreat them from the attack.

comment:10 Changed 13 months ago by mimo

If i have a fully garrisoned ship, it has a very high value, and i would not like to loose it because it has used a big part of its arrows to kill a few land units while an enemy ship was targeting it with all its arrows. The final solution will be to remove this BuildingAI arrows for ships (there is a ticket about it), but in the meantime, i think that making "kamikaze" ships with priority to kill a few units instead of assuring their own safety is forcing the players to a certain kind of fight he does not necessarily want (and usually not my way of playing).

comment:11 Changed 13 months ago by elexis

Feel free to change the order. Similarly, there are some swordsmen with "Human Siege" and others with "Siege Human".

comment:12 Changed 13 months ago by mimo

It is less important for standard units ruled by UnitAI, as when attacked, UnitAI will make them retaliate independantly of the preferredClasses (So I would rather put "Siege Human" there). But ships are ruled by BuildingAI!

comment:13 Changed 13 months ago by fatherbushido

In 18895:

Change order of preferred classes for ships attack. Refs #4194.

comment:14 Changed 13 months ago by elexis

Keywords: review removed

comment:15 in reply to:  12 Changed 9 months ago by elexis

Replying to mimo:

ships are ruled by BuildingAI!

Indeed fail (I just noticed yesterday that a catapult ship decided to attack random moving animals on the shoreline rather than the dock and storehouse in that area, annihilating the purpose of the ship). So our commits don't have an effect on the game besides becoming relevant in case BuildingAI is rewritten.

From http://www.ancient.eu/Carthaginian_Naval_Warfare/

Catapults could be mounted on the deck of these large vessels but were probably limited to siege warfare and not used in ship-to-ship battles

But I agree that ships should be targetted before buildings. (Perhaps we can even prefer military buildings and docks over other buildings like storehouses and houses.)

comment:16 Changed 6 months ago by elexis

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.