• 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.

[General] Colored text

Status
Not open for further replies.
Level 6
Joined
Jul 23, 2018
Messages
243
I assumed we all know the color code for text in WE is something like |c00FEBA0EArrows|r, and the problem is that I have the same color code in the same tooltip, which makes it look like this when appearing in game
Original Tooltip in game: Learn Magic Arrows - [Level 1]
Edited Tooltip in game: (Q) Learn Magic Arrows - [|cffffcc00
Edited Tooltip in WE: (|cffffcc00Q|r) Learn |c00FEBA0EMa|c000080FFgi|c00FF0000c A|c0000FF00rr|c008000FFow|r - [|cffffcc00Level %d|r]
Does anyone know how to fix this? Is it because the color code is too long? Thanks in advance.
 
Level 13
Joined
Feb 5, 2018
Messages
551
What patch are you on? Im on latest and it works without any issues.
In the earlier patches the number of characters in text were very limited without editing the "textbox" frames.

If you are on earlier patch you probably need someone who has edited the textbox frames with JASS or LUA.
 
Level 6
Joined
Jul 23, 2018
Messages
243
What patch are you on? Im on latest and it works without any issues.
In the earlier patches the number of characters in text were very limited without editing the "textbox" frames.

If you are on earlier patch you probably need someone who has edited the textbox frames with JASS or LUA.
I'm using patch 1.24. And how do you edit the "textbox" frames?
Surprisingly, the edited "tooltip normal" works just fine except "learn tooltip"
 
Last edited:
Level 12
Joined
Jan 30, 2020
Messages
875
Hello there !

Well honestly, I wasn't around when they introduced patch 1.24, as when I left mapmaking in 2004, the current patch was 1.07. As I only returned for Reforged, I could not follow the changes made in every single patch in between.

But I had a look at the changelogs, and I am afraid there isn't any easy way to fix this issue, if any.

Natives to change the tooltips with triggers were introduced with patch 1.29.
UI Frame natives were added with patch 1.31.

I tested your learning tooltip ingame, it works perfectly fine in Reforged, so you have made no mistakes at all, it definitely seems to be a bug with patch 1.24.
I am not sure it is related to the learning tooltip length tough, have you checked the other hero abilities tooltips for those with longer ones ?
Maybe patch 1.24 doesn't support changing color for every other character.
 
Level 6
Joined
Jul 23, 2018
Messages
243
Tried in 1.29, it looks like this
Learn tooltip ingame: (Q) Learn Magic Arrows - [|cffffcc
Normal tooltip ingame: (Q) Magic Arrows - [L
Edited Tooltip in WE: (|cffffcc00Q|r) Learn |c00FEBA0EMa|c000080FFgi|c00FF0000c A|c0000FF00rr|c008000FFow|r - [|cffffcc00Level %d|r]
Normal Tooltip in WE: (|cffffcc00Q|r) |c00FEBA0EMa|c000080FFgi|c00FF0000c A|c0000FF00rr|c008000FFows|r - [|cffffcc00Level 5|r]
For the normal tooltip, it works in 1.24 but got a bug in 1.29. For learn tooltip, it seems to get... reduced letters in 1.29.
 
Level 12
Joined
Jan 30, 2020
Messages
875
Ok so this means you have the same bug in 1.29 than 1.24.

Or there might be another problem somewhere that we are missing.

Have you tried using the tooltip natives introduced in 1.29 to change the tooltip with triggers ? Just in case.

Here there are :
JASS:
native BlzSetAbilityTooltip                        takes integer abilCode, string tooltip, integer level returns nothing
native BlzSetAbilityActivatedTooltip               takes integer abilCode, string tooltip, integer level returns nothing
native BlzSetAbilityExtendedTooltip                takes integer abilCode, string extendedTooltip, integer level returns nothing
native BlzSetAbilityActivatedExtendedTooltip       takes integer abilCode, string extendedTooltip, integer level returns nothing
native BlzSetAbilityResearchTooltip                takes integer abilCode, string researchTooltip, integer level returns nothing
native BlzSetAbilityResearchExtendedTooltip        takes integer abilCode, string researchExtendedTooltip, integer level returns nothing
native BlzGetAbilityTooltip                        takes integer abilCode, integer level returns string
native BlzGetAbilityActivatedTooltip               takes integer abilCode, integer level returns string
native BlzGetAbilityExtendedTooltip                takes integer abilCode, integer level returns string
native BlzGetAbilityActivatedExtendedTooltip       takes integer abilCode, integer level returns string
native BlzGetAbilityResearchTooltip                takes integer abilCode, integer level returns string
native BlzGetAbilityResearchExtendedTooltip        takes integer abilCode, integer level returns string

So you could use the BlzSetAbilityResearchTooltip for your ability and see if the problem persists. If you're using GUI, check that these have been added to GUI actions, if not use custom script.

Worst case scenario, you could simply not use research tooltip and put everything in extended research using the newline tag |n, I don't know if it would create any visual issue but if nothing else works, this could be a solution.

If not you will be condemned to not use these colors or use a more recent patch like 1.31 if you don't want Reforged, because I don't think this was fixed with Reforged and I could not reproduce your problem with it.
 
Level 12
Joined
Jan 30, 2020
Messages
875
Wait, I have had issues with tooltips changed with triggers in Reforged yesterday !!!!

It seems that changing a normal ability tooltip will fail if the tooltip is empty in the world editor, and worse with hero abilities, it seems to be bugged beyond level 3 !!!

I suppose the problem is also there in older patches, so it might be worth trying these natives once you have put some text in the object editor tooltip fields !

EDIT :

Any more success ?
 
Last edited:
Level 6
Joined
Jul 23, 2018
Messages
243
  • Untitled Trigger 001
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Game - Set Tooltip of Magic Arrow (Archer Queen) to (|cffffcc00Q|r) Learn |c00FEBA0EMa|c000080FFgi|c00FF0000c A|c0000FF00rr|c008000FFow|r - [|cffffcc00Level %d|r] for level 1
 
Level 12
Joined
Jan 30, 2020
Messages
875
Hello there, sorry for the late reply, I was away.

All you do there is set the tooltip of the level 2 of the ability at map initialization.
Remember the index starts at lev 0 for tooltips even in GUI. I guess this is just a replica of your original trigger, but remember that if you change the tooltips dynamically.

I wanted to try to make a working small map example with my local TFT install sitting around, unfortunately I can't seem to launch that old World Editor, it closes as soon as launched.

Also I don't know if your version of wc3 has the same issue with changing Hero ability tooltips beyond level 3 as Reforge seems to have and that I have face very recently, but if you happen to get really stuck, you could try to hide your hero ability for the hero and give him/her a dummy unit ability that would have the same tooltip.

This is what I ended up doing for my custom "critical strike-like" hero ability that increases its damage multiplier with a custom attribute, all trigger-driven.
 
Status
Not open for further replies.
Top