• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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

  • test.w3x
    16.9 KB · Views: 41
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).
 
Level 2
Joined
Dec 15, 2017
Messages
12
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.
 
Level 2
Joined
Dec 15, 2017
Messages
12
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:
Level 9
Joined
Sep 20, 2015
Messages
385
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

  • test.w3x
    17.1 KB · Views: 29
Last edited:
Level 2
Joined
Dec 15, 2017
Messages
12
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.
 
Level 11
Joined
Dec 19, 2012
Messages
411
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.
Top