Modcraft - The community dedicated to quality WoW modding!
Wrath of the Lich King Modding => Miscellaneous => Topic started by: Kobiesan on October 03, 2017, 12:44:31 am
-
I'm trying to make a new item quality color called Fabled. I attempted to do this directly in the database via adding |cffB0000 in front of my item name. This worked except the first bracket when linked in chat would be the set item quality in item_template and not the set color.
Shown here:
(https://i.imgur.com/evcbj3S.png)
So, since that didn't work I went into TC solution and directly changed
the artifact (item quality ID = 6) color to dark red instead of the light yellow it was set to. I also tried just making a new quality and color but that didn't work.
So, my item's name is still light yellow even though I changed the color in the core??
-
item quality colours are hardcoded in the client.
-
How do you know what is and isn't hardcoded? Is it possible to change it in the interface files (xml/lua files)?
-
You know by reverse engineering things. As far as I remember the wotlk client uses an hardcoded array of colors, nothing in lua/xml. You can find it by searching for the colors in hex in the binary. That will only allow you to modify them, not add one.
-
You could just take the easier route, and change it in the dB using a html colour code
-
You know by reverse engineering things. As far as I remember the wotlk client uses an hardcoded array of colors, nothing in lua/xml. You can find it by searching for the colors in hex in the binary. That will only allow you to modify them, not add one.
I was using a vanilla wow client, searched for the offsets, found and edited them, and nothing changed. My guess is this is located elsewhere.
-
Maybe you just changed the wrong things?
-
In the WotLK client, you need to change colors in (at least) two places in Wow.exe. One for chat links, one for tooltips.
Search for the hex color code in IDA and you'll find the one used for chat links at this address:
00A24644
(https://i.imgur.com/hyeKkto.png)
Keep in mind it's stored as a string (https://www.asciitohex.com/ (https://www.asciitohex.com/))
For the other place, I looked around for GetItemQualityColor and found something pointing to:
0AD2D84
(https://i.imgur.com/rUv2iqW.png)
Keep in mind these are just stored as hex directly AND they're stored as BGR from top to bottom, rather than RGB.
Apologies if I fucked something up.
Am I correct in understanding that to safely add more color codes, you would change offsets to the end of the file where there's plenty of space?
-
Yes. You need to find some unused blob of memory to put the table in. Then you need to change all references to the tables.
-
You could add the color the item name, like this:
|cFF000000Worn Shortsword|r
first FF should be alpha, 000000 is the hex color code
Hacky but easier than editing the client i guess
(I'm not sure if this works > WotLk.. iirc it worked on WotLk and pretty sure it worked during BC or Vanilla)