• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] Updating Extended Tooltip of Unit does work but UI is not showing the changes

Level 3
Joined
Jul 5, 2024
Messages
13
I am updating the extended Tooltlip of a Unit with a custom script. The debugging has shown that the value has indeed been set but ingame the tooltip itself in the UI is not updated. Is this a known issue? Is there a trick to update it? It's a unit to train where the tooltip is updated so I have tried making it unavailable/available again but no success.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
Can you please post your triggers.
 
Last edited:
Level 3
Joined
Jul 5, 2024
Messages
13
sorry, here it is:
JASS:
Custom script:   call BlzSetAbilityExtendedTooltip(udg_my_unit_type, udg_temp_string, 0)

I have tried changing the level parameter but to no avail.

Right after setting it, I can get it again and print it and it indeed shows that the value has been updated:
JASS:
Custom script:   set udg_my_string = BlzGetAbilityExtendedTooltip(udg_my_unit_type,0)
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
sorry, here it is:
JASS:
Custom script:   call BlzSetAbilityExtendedTooltip(udg_my_unit_type, udg_temp_string, 0)

I have tried changing the level parameter but to no avail.

Right after setting it, I can get it again and print it and it indeed shows that the value has been updated:
JASS:
Custom script:   set udg_my_string = BlzGetAbilityExtendedTooltip(udg_my_unit_type,0)
Those functions are for updating the tooltips of Abilities. I don't think they work for Units.

Things to know:
1) Levels for these new functions are usually indexed starting at 0.
2) You often have to "refresh" an Ability to cause any updates to take effect.
  • Unit - Set ability field...
  • Unit - Increase level of ability
  • Unit - Decrease level of ability
 
Level 24
Joined
Feb 27, 2019
Messages
833
What does the string say if you try returning the extended ability tooltip of a unit? (Before changing it) By using ctrl + d I can see that an abilities extended tooltip is called auu1 (Unubertip) whilst for a unit its called utub (ubertip) which makes me think they are different fields. Then again I heard the icon of an item is interchangable with an icon of a unit and they have different names for their fields. Im just speculating.
 
Last edited:
Level 28
Joined
Dec 3, 2020
Messages
970
as I mentioned it does work. Don't let the function name fool you :p

relevant: Doc - BlzGetAbilityExtendedTooltip

it's not an ability so there is no ability to increase the level of or similar.
Disable and then instantly enable production of said unit for the player?
At least on structures it should update and newly produced units.

For current units you can replace them with the exact same unit.
 
Level 3
Joined
Jul 5, 2024
Messages
13
What does the string say if you try returning the extended ability tooltip of a unit? (Before changing it) By using ctrl + d I can see that an abilities extended tooltip is called auu1 (Unubertip) whilst for a unit its called utub (ubertip) which makes me think they are different fields. Then again I heard the icon of an item is interchangable with an icon of a unit and they have different names for their fields. Im just speculating.
it does print the previous tooltip

Disable and then instantly enable production of said unit for the player?
At least on structures it should update and newly produced units.

For current units you can replace them with the exact same unit.
i tried that, had no effect. What do you mean by replacing? How would I do this?
 
Level 28
Joined
Dec 3, 2020
Messages
970
Ah I see, rip.

I meant that you should use triggers to do the following:

Event: (any event that would be of use to you)
Conditions: (the required conditions for your specific case)
Actions:
- Pick every unit of type X and replace it with type X (same type), keeping old relative stats of each unit
 
Last edited:

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
Top