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

Title: Creating a new item quality color?
Post 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??
Title: Re: Creating a new item quality color?
Post by: schlumpf on October 03, 2017, 12:48:23 am
item quality colours are hardcoded in the client.
Title: Re: Creating a new item quality color?
Post by: Kobiesan on October 03, 2017, 02:14:01 am
How do you know what is and isn't hardcoded? Is it possible to change it in the interface files (xml/lua files)?
Title: Re: Creating a new item quality color?
Post by: schlumpf on October 03, 2017, 10:48:27 am
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.
Title: Re: Creating a new item quality color?
Post by: killer9000 on February 15, 2018, 03:41:00 am
You could just take the easier route, and change it in the dB using a html colour code
Title: Re: Creating a new item quality color?
Post by: Criminon on April 13, 2018, 10:58:20 pm
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.
Title: Re: Creating a new item quality color?
Post by: schlumpf on April 13, 2018, 11:15:15 pm
Maybe you just changed the wrong things?
Title: Re: Creating a new item quality color?
Post by: Grymskvll on April 15, 2018, 08:31:33 am
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:
Code: [Select]
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:
Code: [Select]
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?
Title: Re: Creating a new item quality color?
Post by: schlumpf on April 15, 2018, 10:54:38 am
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.
Title: Re: Creating a new item quality color?
Post by: Kaev on November 12, 2019, 12:39:16 pm
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)