[MODDING BUG]: "typedanim" only works once if added via additively modding tactics files (details in thread)

:arrow_forward: GAME INFORMATION

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

  • GAME BUILD #: V. 100.15.30007.0 P2
  • GAME PLATFORM: Steam
  • OPERATING SYSTEM: Windows 10

:arrow_forward: ISSUE EXPERIENCED

Modding bug: “typedanim” only works once if added via additively modding tactics files.

For example: If you are adding a name.mods.tactics file to an existing unit (like a Settler), and it has an action with 2 or more lines like < typedanim type=“ResourceName”>ActionName< /typedanim >, then only the LAST one such line will work. This also means that adding any kind of typedanim to a Settler’s default “Gather” action will cause Settlers to be unable to gather from the Native Fur Trade building, since Settlers already have this line: < typedanim type=“deFurTrade”>GatherBush< /typedanim > and the modded line will cause this line to not work.

However, if you create a completely new type of modded unit, with his own brand new name.tactics file, then you can add as many typedanim lines as you want. They will all work properly.

:arrow_forward: FREQUENCY OF ISSUE

:point_down: How often does the issue occur?

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

:arrow_forward: REPRODUCTION STEPS

Here’s the steps to reproduce the issue:

  1. Assign an additively modded tactics file to an existing unit.
  2. Add 2 or more typedanims to an action, or just 1 typedanim for an existing action that already has 1 typedanim.
  3. Test it in the game: only the last typedanim will work, the unit will not interact properly with the object in the first/previous typedanims.

:arrow_forward: EXPECTED RESULT

:point_down: What was SUPPOSED to happen if the bug you encountered were not present?

The action with more than 1 typedanim would properly work and my unit would interact with the object it was assigned to.

:arrow_forward: IMAGE

:arrow_forward: GAME FILES (SAVE / RECORDING)

I don’t think I can link a save file here, since this is a bug in the modding system.

I think you need to use mergeMode='add' here if you want to preserve the original typedanim instead of overwriting it. So in your file you should try:

<typedanim mergeMode="add" type="ModdedResource">GatherChop</typedanim>

Based on the documentation: https://support.ageofempires.com/hc/en-us/articles/360062106732-Additive-Data-Mods

2 Likes

That did the trick. The thing that confused me was that even if I added 2 typedanims to a unit with no vanilla typedanims, only the last modded typedanim would work - because the 2nd typedanim would overwrite the 1st in the modded tactics file in a way that is not very intuitive (because who would think a modded file can overwrite itself? But I guess that’s how additive modding works). And because you can add as many typedanims as you want into a newly created tactics file.

Even after a thousand hours spent modding, one can learn new things!

1 Like