AIs can no longer train serjeants from donjons

:play_button: GAME INFORMATION

:backhand_index_pointing_down: These details are CRITICAL; DO NOT skip them or your issue may not be reviewed.

  • GAME BUILD #: 155976
  • GAME PLATFORM: Steam
  • OPERATING SYSTEM: Windows 10

:play_button: ISSUE EXPERIENCED

:backhand_index_pointing_down: DESCRIBE THE ISSUE IN DETAIL (below). LIMIT TO ONE BUG PER THREAD.

AI scripting training commands don’t seem to have been updated to be able to use the new feature that allows units to be trained from multiple building locations. For example, right now, the serjeant and elite serjeant (ID 1658 and 1659) can now be trained from both the castle and the donjon. However, the can-train, train, can-train-with-escrow, up-can-train, and up-train commands do not check if a serjeant can be trained from a donjon or allow serjeants to be trained from donjons. They can only be trained from castles with these commands. The only command that allows serjeants to be trained from donjons is to use (up-target-point 0 action-train c: serjeant-line) after doing a DUC search for a donjon.

Before this change, AIs used to be able to train serjeants from donjons by using IDs 1660 and 1661 or by using donjon-serjeant-line. However, when the change was made to be able to train serjeants from both castles and donjons, the IDs 1660 and 1661 were disabled.

The same bug prevents konniks from being trained from kreposts, spearmen from donjons, huskarls from barracks, and tarkans from stables, unless the up-target-point command is used with action-train.

:play_button: FREQUENCY OF ISSUE

:backhand_index_pointing_down: How often does the issue occur? CHOSE ONE; DELETE THE REST !

  • 100% of the time / matches I play (ALWAYS)

:play_button: REPRODUCTION STEPS

:backhand_index_pointing_down: List CLEAR and DETAILED STEPS we can take to reproduce the issue ourselves… Be descriptiv e !

Here’s the steps to reproduce the issue:

Run a game with player 1 using this AI code, and control the AI to build a donjon and then a castle. Only the first rule will ever train serjeants and send the chat message, and it only works if the AI has a castle, not a donjon.

;Rule #1
(defrule
(can-train serjeant-line)
=>
(train serjeant-line)
(chat-to-all "can train serjeants")
)
;Rule #2
(defrule
(can-train donjon-serjeant-line)
=>
(train donjon-serjeant-line)
(chat-to-all "can train donjon serjeants")
)

:play_button: EXPECTED RESULT

:backhand_index_pointing_down: What was SUPPOSED to happen if the bug you encountered were not prese n t?

Now that units can have multiple train locations, the can-train, train, can-train-with-escrow, up-can-train, and up-train commands should be updated to check every train location for that unit, rather than just the first train location.

:play_button: IMAGE

:backhand_index_pointing_down: ALWAYS attach a PICTURE (.jpg, .png, .gif) or VIDEO (.mp4, YouTube link) that highlights the prob l em.

:play_button: GAME FILES (SAVE / RECORDING)

:backhand_index_pointing_down: Attach a SAVE GAME (.aoe2spgame) or GAME RECORDING (.aoe2record) of the match where you encountered the issue. Link it below if using an external file ser v ice.

  • Use the test AI code listed above.

Hi @LeifEricson7029 Ç

Thanks for reporting this issue with the AI. I already let the team know about it