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: [QUESTION] DBC Hair Colour Edit  (Read 1980 times)

profetoide

  • Registred Member
  • MS Paint Freak
  • *****
  • Posts: 3
    • View Profile
[QUESTION] DBC Hair Colour Edit
« on: February 01, 2013, 12:10:45 am »
Hello!
I'm adminsitrating a custom WoW roleplaying server, and I wanted to add the posibility for any character to get any hair colour they wanted, upon request.
The idea is that there're certain skins and hair colours that are restricted to DK's, but my server is modded so the only availible class is the Hunter, with some customizations.
I found a way to modify the Trinity DB in order to get the desired effect, the cose is as follows:

#include <cstdio>

int main()
{
    int playerbytes = 117835526;
    int skinColor = playerbytes % 256;
    int faceStyle = (playerbytes >> 8) % 256;
    int hairStyle = (playerbytes >> 16) % 256;
    int hairColor = (playerbytes >> 24) % 256;
    int newPlayerBytes = skinColor | faceStyle << 8 | hairStyle << 16 | 12 << 24;
    printf("%d",newPlayerBytes);
    return 0;
}

newPlayerBytes contains the same skin, face and hair style as before, but now with the hair colour 12 (The finished code would probably have a loop, and scanf's of course, this was my testing ground).

It actually worked as a charm: I simply replaced the playerBytes field in the DB entry for this character, and upon restarting the server, the hair from this Blood Elf Female character turned blue. Thing is... She was the only one that could see it.
Everyone else would see her as a redhead.
I did some tests, and even cleaning cache, if I open 2 WoW accounts at the same time, one would see the character's hair blue (The one that was logged into the modified character), and the other would see the character's hair red.

I was wondering if someone here would know what's happening or how to fix this, or maybe point me to another way to get the DK hair colours for any class (namely Hunter, in this case).
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Garthog

  • Contributors
  • Polygonshifter
  • *****
  • Posts: 56
    • View Profile
Re: [QUESTION] DBC Hair Colour Edit
« Reply #1 on: February 01, 2013, 12:36:25 am »
I'll test it and see if I get the same issue, however, the best way would be modifying the DBCs to make all colors available at character creation.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

profetoide

  • Registred Member
  • MS Paint Freak
  • *****
  • Posts: 3
    • View Profile
Re: [QUESTION] DBC Hair Colour Edit
« Reply #2 on: February 01, 2013, 01:21:04 am »
Thanks for your reply! Though, how would I do the modifications you suggested? I never made a patch before, i'm just starting to learn these things.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Nortwin

  • Registred Member
  • GM Isle Explorer
  • *****
  • Posts: 24
    • View Profile
Re: [QUESTION] DBC Hair Colour Edit
« Reply #3 on: February 03, 2013, 10:24:57 pm »
http://www.wowdev.wiki/index.php ... pStyle.dbc
http://www.wowdev.wiki/index.php ... xtures.dbc

However, I suggest you ask someone with DBC knowledge. I'm busy atm and I haven't got time to help you, if you don't find anyone I'll gladly help you (also, what server is it? :D)

Nevermind, I found it (http://www.protorol.com).
Spanish. :(

Nortwin
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

profetoide

  • Registred Member
  • MS Paint Freak
  • *****
  • Posts: 3
    • View Profile
Re: [QUESTION] DBC Hair Colour Edit
« Reply #4 on: February 10, 2013, 06:21:41 pm »
Thanks for those links! Sadly, I couldn't figure out to take advantage of that table... There's probably a way to make all hairstyles availible to all characters from the character creation screen. I'm mostly interested in colours, too.

I couldn't find a fix yet, though I'm not focusing throughly on this, as there're a lot of other customizations that need to be done!

Also, sorry about Protorol being in spanish! I was thinking to make an english realm somewhere in the future, but there's a lot of translation work to do before that.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »