[JASS] Changing ability tooltip and extended tooltip does not work for passive abilities

Level 29
Joined
Feb 2, 2006
Messages
1,691
Hi,
it seems that changing ability tooltips during the game does not work for abilities which are passive like Phoenix Fire, Drunken Brawler etc.

JASS:
call BlzSetAbilityStringLevelField(a, ABILITY_SLF_TOOLTIP_NORMAL, 0, "Test 1")
call BlzSetAbilityStringLevelField(a, ABILITY_SLF_TOOLTIP_NORMAL_EXTENDED, 0, "Test 2")

For non-passive abilities it seems to work just fine. How can I fix this?
 
Hi,

I’m experiencing the same issue when working with an ability based on Evasion. I’ve reported it to Blizzard here: https://us.forums.blizzard.com/en/warcraft3/t/blzsetabilitystringlevelfield-bug/36653.

I’ve tried several workarounds that unfortunately didn’t help (removing and re-adding the passive ability, switching the ability’s level to another and then back to the original). From what I can tell, the issue seems to be purely interface-related: when I call BlzGetAbilityStringLevelField, it correctly returns the modified tooltip with ABILITY_SLF_TOOLTIP_NORMAL_EXTENDED.

For now, the best workaround seems to be creating a “fake” passive ability (based on an active ability with no effect) and assigning it a passive icon. This requires excluding the corresponding ability ID from any SPELL_CAST/EFFECT events, and accepting that the icon may appear disabled if the unit is affected by Silence.

Warm regards,

Edit: I just managed to successfully change the tooltip of an aura ability (tested with Thorns Aura and Brilliance Aura) using BlzSetAbilityStringLevelField. This approach might actually be simpler than the one I suggested earlier.

By setting all bonuses to 0, regardless of the aura used, and making sure the “targets allowed” field is set to none, you can create a fake aura that exists purely to display cosmetic changes via BlzSetAbilityStringLevelField.

If you also need to modify the values of a genuine passive ability (like Evasion, Critical Strike, or Drunken Brawler), you could place that real passive inside a disabled spellbook. That way, the fake aura handles the tooltip display, while the true passive ability still functions in the background. A workable workaround 😉.
 
Last edited:
Back
Top