• Check out the results of the Techtree Contest #19!
  • 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 void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Solved] Unit name color not changing.

Status
Not open for further replies.
Level 2
Joined
Dec 15, 2017
Messages
12
I've been struggling for 2 days by now. Here's my problem:

I changed Rifleman's name to be light green in Object Editor;

I made Rifleman available to be sold when Barracks researches a specific upgrade via GUI triggering;

When I go to buy the Rifleman from Barracks, his name color is still unchanged.




Please help I'm stuck, here's the map as an example.
 

Attachments

You need to change the Tooltip - Basic.

It is near the bottom of the object editor fields. It says "Train Rifleman". You can change this to "Train |cff00FF00Rifleman|r" or whatever the shade of green you are using is.

If you want to change text that comes after that, change Tooltip - Extended, one field bellow.

Changing the name doesn't change the tooltips shown when training units, building buildings, using and researching abilities or buying items, all of them have their own Tooltip - Basic fields (and abilities even have separate fields for when you are learning them, if it is a hero ability).
 
You need to change the Tooltip - Basic.

It is near the bottom of the object editor fields. It says "Train Rifleman". You can change this to "Train |cff00FF00Rifleman|r" or whatever the shade of green you are using is.

If you want to change text that comes after that, change Tooltip - Extended, one field bellow.

Changing the name doesn't change the tooltips shown when training units, building buildings, using and researching abilities or buying items, all of them have their own Tooltip - Basic fields (and abilities even have separate fields for when you are learning them, if it is a hero ability).

The strange thing is that I already edited Tooltip - Basic.

It seem to be working when the Rifleman is trained or sold, but it doesnt work anymore when I make it available to be sold to barracks.

If you can have a look on the attached map, you'll understand.
 
Huh, you're right. Is it okay if the unit is trained instead of sold though? You can make a research that makes riflemen trainable, just like in wc3.
I prefer not, because I would have to change one mechanic into another less appealing and quite unfitting for the map...or I should just give up on the name color thing.

The idea was that I have this structure, at first I can only buy 1 unit (which is already added into TechTree - Sold Units, so I dont have this bug) and then, with a certain upgrade I add another unit to this structure for sale.

For now, I'm going to try something to bypass the problem and search more on google.

Thanks for answering HappyTauren.

Waiting for further replies..
 
Last edited:
Hey, the only solution i found to this is to create another barracks building with the rifleman already in stock and when the research is finished replace the old barracks with ne new one. It is tricky and you will have to create a lot of barracks for every unit added, but seems the only solution. (I tried with items and the name don't change too). I attached the modified map.
 

Attachments

Last edited:
Hey, the only solution i found to this is to create another barracks building with the rifleman already in stock and when the research is finished replace the old barracks with ne new one. It is tricky and you will have to create a lot of barracks for every unit added, but seems the only solution. (I tried with items and the name don't change too). I attached the modified map.
Alright, it seems to be a good compromise, since I'm going to add just few units.

As for what I wanted, I think it's just bugged so there is nothing I can do about it.

Thanks man.
 
Just to mention that adding a unit to be sold from a building via trigger will make the unit name display without color (known bug) as mentioned in
Producer Update: Natives List

JASS:
native AddUnitToStock takes unit whichUnit, integer unitId, integer currentStock, integer stockMax returns nothing
                                                                                            //The main tooltip of the added unit will always ignore color tags so the text will always appear to be white. Color tags should be parsed the same as all unit tooltips.
 
Status
Not open for further replies.
Back
Top