Opened 8 years ago

Closed 8 years ago

Last modified 7 years 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 8 years ago.
let ship without pref classes
prefclasses.2.diff (17.8 KB ) - added by fatherbushido 8 years ago.

Download all attachments as: .zip

Change History (18)

comment:1 by fatherbushido, 8 years ago

Keywords: patch review added
Milestone: BacklogAlpha 21

by fatherbushido, 8 years ago

Attachment: prefclasses.diff added

let ship without pref classes

comment:2 by fatherbushido, 8 years ago

I forgot the tower siege

by fatherbushido, 8 years ago

Attachment: prefclasses.2.diff added

comment:3 by fatherbushido, 8 years ago

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

comment:4 by fatherbushido, 8 years ago

Owner: set to fatherbushido
Resolution: fixed
Status: newclosed

In 18765:

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

comment:5 by elexis, 7 years ago

In 18892:

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

comment:6 by mimo, 7 years ago

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 by elexis, 7 years ago

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 by mimo, 7 years ago

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 by elexis, 7 years ago

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 by mimo, 7 years ago

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 by elexis, 7 years ago

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

comment:12 by mimo, 7 years ago

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 by fatherbushido, 7 years ago

In 18895:

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

comment:14 by elexis, 7 years ago

Keywords: review removed

in reply to:  12 comment:15 by elexis, 7 years ago

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 by elexis, 7 years ago

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.