• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

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

Status
Not open for further replies.
Level 3
Joined
Jul 5, 2024
Messages
17
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.
 
Can you please post your triggers.
 
Last edited:
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)
 
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
 
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:
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.
 
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?
 
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:
Status
Not open for further replies.
Back
Top