• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

How to access blank tooltip field? PLEASE HELP

Status
Not open for further replies.
Level 8
Joined
Sep 16, 2016
Messages
227
1706566942706.png


How do I access these fields? I want to check if they are null, but nothing works, its like wc3 doesn't parse these empty fields so you can't touch them at all. I tried:

JASS:
if BlzGetAbilityStringLevelField(abil, ABILITY_SLF_TOOLTIP_NORMAL_EXTENDED, lvl-1) == ""

Please help, can be GUI, Jass, simple world editor tricks, I just need a way to check if this field is null or not
lvl - 1 is the ability level, but I also tried hardcoding it, and "abil" is valid, I printed its name and stuff
 
Last edited:

Uncle

Warcraft Moderator
Level 74
Joined
Aug 10, 2018
Messages
7,959
View attachment 460283

How do I access these fields? I want to check if they are null, but nothing works, its like wc3 doesn't parse these empty fields so you can't touch them at all. I tried:

JASS:
if BlzGetAbilityStringLevelField(abil, ABILITY_SLF_TOOLTIP_NORMAL_EXTENDED, lvl-1) == ""

Please help, can be GUI, Jass, simple world editor tricks, I just need a way to check if this field is null or not
lvl - 1 is the ability level, but I also tried hardcoding it, and "abil" is valid, I printed its name and stuff
Can you store it in a string variable and test that?
vJASS:
local string str = BlzGetAbilityStringLevelField(abil, ABILITY_SLF_TOOLTIP_NORMAL_EXTENDED, lvl-1)
Perhaps something like this?
vJASS:
local string str = "!"
set str = BlzGetAbilityStringLevelField(abil, ABILITY_SLF_TOOLTIP_NORMAL_EXTENDED, lvl-1)
if str == "!" then
    // it failed
endif
 
Level 8
Joined
Sep 16, 2016
Messages
227
Can you store it in a string variable and test that?
vJASS:
local string str = BlzGetAbilityStringLevelField(abil, ABILITY_SLF_TOOLTIP_NORMAL_EXTENDED, lvl-1)
Perhaps something like this?
vJASS:
local string str = "!"
set str = BlzGetAbilityStringLevelField(abil, ABILITY_SLF_TOOLTIP_NORMAL_EXTENDED, lvl-1)
if str == "!" then
    // it failed
endif

It doesn't work :( it seems it still has the value from the last working "field"

JASS:
                local string str = "!"
                set str = BlzGetAbilityStringLevelField(abil, ABILITY_SLF_TOOLTIP_NORMAL_EXTENDED, lvl-1)
                if str == "!" then
                    print("null: "+str) // this is bjdebugmsh
                else
                    print("not null: "+str)

What value prints BlzGetAbilityStringLevelField(abil, ABILITY_SLF_TOOLTIP_NORMAL_EXTENDED, lvl-1)?

It printed the value from the last working field, when I try to fetch a field that doesn't exist (eg. lvl 4 tooltip in an ability that has 5 levels)

print(BlzGetAbilityStringLevelField(abil, ABILITY_SLF_TOOLTIP_NORMAL_EXTENDED, lvl-1), 3) // print is bjdebugmsg
But I still can't seem to compare "" or null, doesn't work
 
Last edited:
Level 8
Joined
Sep 16, 2016
Messages
227
Apparently something like this works, because the empty field apparently retains the old value from the last working field

JASS:
            BlzSetAbilityTooltip(skill, COLOR_BLUE+"Ability 6"+COLOR_RESET, lvl-1)
            BlzSetAbilityExtendedTooltip(skill, COLOR_GOLD+
            "This ability does not have a description yet. Will change with time."+
            "\n\n• Damage Output: "+COLOR_LIGHT_RED+dmg.toString()+COLOR_GOLD+
            "\n• Cast Range: "+COLOR_LIGHT_RED+castRange.toString()+COLOR_GOLD+
            "\n• Cooldown: "+COLOR_LIGHT_RED+cd.toString()+COLOR_GOLD+
            "\n\nFormula: "+COLOR_LIGHT_RED+"(30 • lvl) + (0.4 • stat • lvl)"+COLOR_RESET,
            lvl-1)
            if BlzGetAbilityStringLevelField(abil, ABILITY_SLF_TOOLTIP_NORMAL_EXTENDED, lvl-1) == BlzGetAbilityStringLevelField(abil, ABILITY_SLF_TOOLTIP_NORMAL_EXTENDED, 2-lvl)
                print("A Decrease 1")
                lvl = lvl - 1
            if BlzGetAbilityStringLevelField(abil, ABILITY_SLF_TOOLTIP_NORMAL_EXTENDED, lvl-1) == BlzGetAbilityStringLevelField(abil, ABILITY_SLF_TOOLTIP_NORMAL_EXTENDED, 2-lvl)
                print("B Decrease 1")
                lvl = lvl - 1
            if BlzGetAbilityStringLevelField(abil, ABILITY_SLF_TOOLTIP_NORMAL_EXTENDED, lvl-1) == BlzGetAbilityStringLevelField(abil, ABILITY_SLF_TOOLTIP_NORMAL_EXTENDED, 2-lvl)
                print("C Decrease 1")
                lvl = lvl - 1
            BlzSetAbilityTooltip(skill, COLOR_BLUE+"Ability 6"+COLOR_RESET, lvl-1)
            BlzSetAbilityExtendedTooltip(skill, COLOR_GOLD+
            "This ability does not have a description yet. Will change with time."+
            "\n\n• Damage Output: "+COLOR_LIGHT_RED+dmg.toString()+COLOR_GOLD+
            "\n• Cast Range: "+COLOR_LIGHT_RED+castRange.toString()+COLOR_GOLD+
            "\n• Cooldown: "+COLOR_LIGHT_RED+cd.toString()+COLOR_GOLD+
            "\n\nFormula: "+COLOR_LIGHT_RED+"(30 • lvl) + (0.4 • stat • lvl)"+COLOR_RESET,
            lvl-1)

edit: Nevermind, doesn't really work fully
 
Last edited:
Status
Not open for further replies.
Top