Modding - Some type of actions doesn't work anymore on friendly units

  • Game Version: Premium

  • Build Number: v.100.19.12998.0 (602822R)

  • Platform: Steam

  • Operating System: Windows 11

Issue:

On one of my local mod, I gave the taotie the ability to devour allies too.
So in powers_mods I added the following, ie removing “enemy= placement”

<power name="AbilityTaotieDevour" type="UnitAction" mergemode="replace">
	<displaynameid>STR_ABILITY_TAOTIE_DEVOUR</displaynameid>
	<rolloverid>STR_ABILITY_TAOTIE_DEVOUR_LR</rolloverid>
	<icon>chinese\static_color\abilities\taotie_ability_a_icon.png</icon>
	<placement disallowwhenattackingdisabled="">Unit</placement>
	<abstractplacementtargettype>HumanSoldier</abstractplacementtargettype>
	<abstractplacementtargettype>LogicalTypeVillagerNotHero</abstractplacementtargettype>
	<unitaction>Devour</unitaction>
</power>

It worked perfectly fine before, the taotie could devour any unit, friendly or enemy. Manual casting was required to target an ally but it was fine.
But now, when it targets an ally, it bugs out, the unit seems stuck in a loop. It seems to be the same for all “Throw” type of action.

From the testing with another user, at least another action type “TeleportAttack” has the same issue.

Please fix this behavior, it’s very useful in modding to have the ability to target allies.

Trigger Event:

A patch broke it

Repro Steps:

  1. Create a new mod
  2. In powers_mods, add the code above
  3. Playtest in editor and try to manually cast the ability on a friendly human soldier (either yours or ally one), the unit move to it but don’t perform the action