This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: Creating a new item quality color?  (Read 3874 times)

Kobiesan

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 161
    • View Profile
Creating a new item quality color?
« 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:



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??

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: Creating a new item quality color?
« Reply #1 on: October 03, 2017, 12:48:23 am »
item quality colours are hardcoded in the client.

Kobiesan

  • Registred Member
  • Wiki Incarnate
  • *****
  • Posts: 161
    • View Profile
Re: Creating a new item quality color?
« Reply #2 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)?

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: Creating a new item quality color?
« Reply #3 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.

killer9000

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 7
    • View Profile
Re: Creating a new item quality color?
« Reply #4 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

Criminon

  • Registred Member
  • GM Isle Explorer
  • *****
  • Posts: 19
    • View Profile
Re: Creating a new item quality color?
« Reply #5 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.

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: Creating a new item quality color?
« Reply #6 on: April 13, 2018, 11:15:15 pm »
Maybe you just changed the wrong things?

Grymskvll

  • Registred Member
  • Polygonshifter
  • *****
  • Posts: 65
    • View Profile
Re: Creating a new item quality color?
« Reply #7 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
Keep in mind it's stored as a string (https://www.asciitohex.com/)

For the other place, I looked around for GetItemQualityColor and found something pointing to:
Code: [Select]
0AD2D84
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?

schlumpf

  • Administrator
  • Creator of Worlds
  • *****
  • Posts: 2967
    • View Profile
Re: Creating a new item quality color?
« Reply #8 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.

Kaev

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 308
    • View Profile
Re: Creating a new item quality color?
« Reply #9 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)