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: [SOLVED] Custom race (TC 3.3.5a)  (Read 5451 times)

Joxus

  • Registred Member
  • Loreweaver
  • *****
  • Posts: 80
    • View Profile
[SOLVED] Custom race (TC 3.3.5a)
« on: August 30, 2014, 11:43:37 am »
I followed an Emudevs guide on how to add custom races and I'm getting a compile error after with editing the SharedDefines.h . It's a syntax error ')' in CharacterHandler.cpp at line 2051.
Code: [Select]
uint32 newRaceMask = (team == TEAM_ALLIANCE) ? RACEMASK_ALLIANCE : RACEMASK_HORDE;
Didn't see any obvious syntax errors with the brackets so I'm kind of lost. I wanted to add the Goblin and Worgen race, which I added in SharedDefines.h, and this is how I did it.

Code: [Select]
enum Races
{
    RACE_NONE               = 0,
    RACE_HUMAN              = 1,
    RACE_ORC                = 2,
    RACE_DWARF              = 3,
    RACE_NIGHTELF           = 4,
    RACE_UNDEAD_PLAYER      = 5,
    RACE_TAUREN             = 6,
    RACE_GNOME              = 7,
    RACE_TROLL              = 8,
    RACE_GOBLIN             = 9,
    RACE_BLOODELF           = 10,
    RACE_DRAENEI            = 11,
    //RACE_FEL_ORC            = 12
    //RACE_NAGA               = 13,
    //RACE_BROKEN             = 14,
    //RACE_SKELETON           = 15,
    //RACE_VRYKUL             = 16,
    //RACE_TUSKARR            = 17,
    //RACE_FOREST_TROLL       = 18,
    //RACE_TAUNKA             = 19,
    //RACE_NORTHREND_SKELETON = 20,
    //RACE_ICE_TROLL          = 21,
RACE_WORGEN             = 22
};

// max+1 for player race
#define MAX_RACES         23

#define RACEMASK_ALL_PLAYABLE
    ((1<<(RACE_HUMAN-1))   |(1<<(RACE_ORC-1))          |(1<<(RACE_DWARF-1))   |
    (1<<(RACE_NIGHTELF-1))|(1<<(RACE_UNDEAD_PLAYER-1))|(1<<(RACE_TAUREN-1))  |
    (1<<(RACE_GNOME-1))   |(1<<(RACE_TROLL-1))        |(1<<(RACE_GOBLIN-1))|
    (1<<(RACE_BLOODELF-1))|(1<<(RACE_DRAENEI-1))      |(1<<(RACE_WORGEN-1)) )

#define RACEMASK_ALLIANCE
    ((1<<(RACE_HUMAN-1)) | (1<<(RACE_DWARF-1)) | (1<<(RACE_NIGHTELF-1)) |
     (1<<(RACE_GNOME-1)) | (1<<(RACE_DRAENEI-1))) |(1<<(RACE_WORGEN-1)) )

The RACEMASK_ALLIANCE part I didn't edit, so it probably automatically changed to that, and I made a new ID with the Worgen race, I previously switched it with the Naga ID and made it like this to see if it would help but no change.

My WoW also crashes once I create a character after I increase the MAX RACES number in CharacterCreate.lua.

Any ideas on this?
« Last Edit: September 14, 2014, 11:31:39 pm by Admin »

Chaos

  • Registred Member
  • GM Isle Explorer
  • *****
  • Posts: 16
    • View Profile
    • http://rp-welten.net/
Re: [QUESTION] Custom race (TC 3.3.5a)
« Reply #1 on: August 30, 2014, 12:16:54 pm »
I am currently on it working, too but I don't know if this helps.

Quote
#define MAX_RACES         23

I might be wrong but shouldn't the MAX_RACES only be defined by the count of the playable races? The count should be in your case about 13. With the plus 1 note at the end it should be 14.

Quote
#define MAX_RACES         14

This should be about right.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Joxus

  • Registred Member
  • Loreweaver
  • *****
  • Posts: 80
    • View Profile
Re: [QUESTION] Custom race (TC 3.3.5a)
« Reply #2 on: August 30, 2014, 02:54:10 pm »
Quote from: "Chaos"
I am currently on it working, too but I don't know if this helps.

Quote
#define MAX_RACES         23

I might be wrong but shouldn't the MAX_RACES only be defined by the count of the playable races? The count should be in your case about 13. With the plus 1 note at the end it should be 14.

Quote
#define MAX_RACES         14

This should be about right.

Nevermind already fixed it! Not sure how I oversaw this, but the problem was at the RACEMASK_ALLIANCE the Draenei had an extra bracket, weird though because like I said I didn't edit that part.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Joxus

  • Registred Member
  • Loreweaver
  • *****
  • Posts: 80
    • View Profile
Re: [QUESTION] Custom race (TC 3.3.5a)
« Reply #3 on: August 30, 2014, 04:24:06 pm »
Have to bump this since the WoW crashing problem still persists, something is wrong in the LUA and it's not just the MAX RACES in CharacterCreate.lua, but probably some other stuff aswell since I set it to 10 and it still crashes (tried with ONLY changing the MAX RACES aswell and it already crashed).

Should the XML with CharCreateRaceButton have the ID's corresponding to the SharedDefines.h ID's? Or the DBC ID's? I have no clue..
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

phantomx

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 615
    • View Profile
Re: [QUESTION] Custom race (TC 3.3.5a)
« Reply #4 on: August 30, 2014, 04:38:46 pm »
You cannot add an extra race, you may only use the races that are defined, in my case I use broken for Worgen.

I have all playable races enabled since I'm using 6 extra races atm and if I want to add more I don't have to do a recompile...

Gist copy it https://gist.github.com/Phantom23/d8f460b57291d91655d5
« Last Edit: August 02, 2015, 10:51:53 am by Admin »
[wimg]http://i.imgur.com/6fxUQL1.gif[/wimg]

Joxus

  • Registred Member
  • Loreweaver
  • *****
  • Posts: 80
    • View Profile
Re: [QUESTION] Custom race (TC 3.3.5a)
« Reply #5 on: August 30, 2014, 04:46:54 pm »
Quote from: "phantomx"
You cannot add an extra race, you may only use the races that are defined, in my case I use broken for Worgen.

I have all playable races enabled since I'm using 6 extra races atm and if I want to add more I don't have to do a recompile...

[spoiler:h02r0w6z]
Code: [Select]
// Race value is index in ChrRaces.dbc
enum Races
{
RACE_NONE = 0,
RACE_HUMAN = 1,
RACE_ORC = 2,
RACE_DWARF = 3,
RACE_NIGHTELF = 4,
RACE_UNDEAD_PLAYER = 5,
RACE_TAUREN = 6,
RACE_GNOME = 7,
RACE_TROLL = 8,
RACE_GOBLIN = 9,
RACE_BLOODELF = 10,
RACE_DRAENEI = 11,
RACE_FEL_ORC = 12,
RACE_NAGA               = 13,
RACE_BROKEN             = 14,
RACE_SKELETON           = 15,
RACE_VRYKUL             = 16,
RACE_TUSKARR            = 17,
RACE_FOREST_TROLL       = 18,
RACE_TAUNKA             = 19,
RACE_NORTHREND_SKELETON = 20,
RACE_ICE_TROLL          = 21
};

// max+1 for player race
#define MAX_RACES         22

#define RACEMASK_ALL_PLAYABLE
    ((1<<(RACE_HUMAN-1))   |(1<<(RACE_ORC-1))          |(1<<(RACE_DWARF-1))   |
    (1<<(RACE_NIGHTELF-1))|(1<<(RACE_UNDEAD_PLAYER-1))|(1<<(RACE_TAUREN-1))  |
    (1<<(RACE_GNOME-1))   |(1<<(RACE_TROLL-1))        |(1<<(RACE_GOBLIN-1))|
    (1<<(RACE_BLOODELF-1))|(1<<(RACE_DRAENEI-1))      |(1<<(RACE_FEL_ORC-1))|
    (1<<(RACE_NAGA-1))    |(1<<(RACE_BROKEN-1))       |(1<<(RACE_SKELETON-1))|
(1<<(RACE_VRYKUL-1))  |(1<<(RACE_TUSKARR-1))      |(1<<(RACE_FOREST_TROLL-1))|
    (1<<(RACE_TAUNKA-1))  |(1<<(RACE_NORTHREND_SKELETON-1)) |(1<<(RACE_ICE_TROLL-1)) )
[/spoiler:h02r0w6z]


Aha.. so I can't change RACE_BROKEN to RACE_WORGEN for instance using the same ID? Not sure if I have to do a whole lot of edits in the DBC/LUA etc then.. But I'll check it out thank you.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

phantomx

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 615
    • View Profile
Re: [QUESTION] Custom race (TC 3.3.5a)
« Reply #6 on: August 30, 2014, 04:51:43 pm »
You cannot rename a defined race in the core if that's what you're asking.

All you have to do is change the files that these dbc files call for chrsections creaturemodeldatainfo creaturedisplayinfo and you'r solid.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
[wimg]http://i.imgur.com/6fxUQL1.gif[/wimg]

Joxus

  • Registred Member
  • Loreweaver
  • *****
  • Posts: 80
    • View Profile
Re: [QUESTION] Custom race (TC 3.3.5a)
« Reply #7 on: August 31, 2014, 12:47:22 am »
Quote from: "phantomx"
You cannot rename a defined race in the core if that's what you're asking.

All you have to do is change the files that these dbc files call for chrsections creaturemodeldatainfo creaturedisplayinfo and you'r solid.

I did as stated, and for some reason I'm still getting crashes.with my client.

Here's my SharedDefines.h
Code: [Select]
enum Races
{
    RACE_NONE               = 0,
    RACE_HUMAN              = 1,
    RACE_ORC                = 2,
    RACE_DWARF              = 3,
    RACE_NIGHTELF           = 4,
    RACE_UNDEAD_PLAYER      = 5,
    RACE_TAUREN             = 6,
    RACE_GNOME              = 7,
    RACE_TROLL              = 8,
    RACE_GOBLIN             = 9,
    RACE_BLOODELF           = 10,
    RACE_DRAENEI            = 11,
    RACE_FEL_ORC            = 12,
    //RACE_NAGA               = 13,
    //RACE_BROKEN             = 14,
    //RACE_SKELETON           = 15,
    //RACE_VRYKUL             = 16,
    //RACE_TUSKARR            = 17,
    //RACE_FOREST_TROLL       = 18,
    //RACE_TAUNKA             = 19,
    //RACE_NORTHREND_SKELETON = 20,
    //RACE_ICE_TROLL          = 21,
};

// max+1 for player race
#define MAX_RACES         13

#define RACEMASK_ALL_PLAYABLE
    ((1<<(RACE_HUMAN-1))   |(1<<(RACE_ORC-1))          |(1<<(RACE_DWARF-1))   |
    (1<<(RACE_NIGHTELF-1))|(1<<(RACE_UNDEAD_PLAYER-1))|(1<<(RACE_TAUREN-1))  |
    (1<<(RACE_GNOME-1))   |(1<<(RACE_TROLL-1))        |(1<<(RACE_GOBLIN-1))|
    (1<<(RACE_BLOODELF-1))|(1<<(RACE_DRAENEI-1))      |(1<<(RACE_FEL_ORC-1)) )

#define RACEMASK_ALLIANCE
    ((1<<(RACE_HUMAN-1)) | (1<<(RACE_DWARF-1)) | (1<<(RACE_NIGHTELF-1)) |
     (1<<(RACE_GNOME-1)) | (1<<(RACE_DRAENEI-1)) |(1<<(RACE_FEL_ORC-1)) )

#define RACEMASK_HORDE RACEMASK_ALL_PLAYABLE & ~RACEMASK_ALLIANCE

And in the DBC files I made the Fel Orc and the Goblin (old)  playable by setting column 2 to 12 in ChrRaces.dbc. I used these two since they were used in the guide, keeping it simple just for the sake of getting it to work.

The interface files I changed exactly to as stated in this guide
http://emudevs.com/showthread.php/121-How-to-Custom-Races!

Also removed other patches that might interfere.

I uploaded all the files here (Interface GLUEXML and ChrRaces.dbc: https://mega.co.nz/#!6gknlQzb!141YFVDO-7IH3DNxDa9j9b2WjIx25R1MTj7i9d7Hwz4
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

phantomx

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 615
    • View Profile
Re: [QUESTION] Custom race (TC 3.3.5a)
« Reply #8 on: August 31, 2014, 01:01:52 am »
Okay, so I'm going to try to help you but I won't be handing the information to you I want you to find your mistakes so you can learn things later on.

Okay so here's my ChrRaces.dbc



Here's your ChrRaces.dbc



Can you spot what's the problem with your dbc file compared to mine?

Also on a side note your interface files seem to be corrupted, so first fix your dbc then fix your interface.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
[wimg]http://i.imgur.com/6fxUQL1.gif[/wimg]

Joxus

  • Registred Member
  • Loreweaver
  • *****
  • Posts: 80
    • View Profile
Re: [QUESTION] Custom race (TC 3.3.5a)
« Reply #9 on: August 31, 2014, 02:15:58 am »
Oh my yes I could spot some problems.. soft said. I didn't actually change all the data to fit its faction etc, and for some reason human was 0. The error is still there though, I think it's the interface files like you said, it had some underscore problems with the Fel Orc but the rest seemed fine so I'm clueless now.

 On an ArcEmu 3.2.2a tutorial different DBC's and interface files were edited but the Emudevs guide seemed most up-to-date. I replicated the DBC (checked a few times), if you can spot anything be my guest.

Here are my files again: https://mega.co.nz/#!nsdnBYiR!3bErQ9eieY8OyXX13rWlJNNJRUmcJmiH6Zpwx7woyEQ
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

phantomx

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 615
    • View Profile
Re: [QUESTION] Custom race (TC 3.3.5a)
« Reply #10 on: August 31, 2014, 02:35:53 am »
I took a look at your LUA & XML files and I found many flaws.

I recommend you to take a look at your CharacterCreate.lua & CharacterCreate.xml files some simple mistakes in there.

Also I would check your GlueParent.lua file simple mistakes were made as well, once you notice them you will be like /facepalm.

Like I said earlier I want you to find the problems yourself that way you can learn for future problems, learning from your mistakes is a part of life, if I just hand you the information you won't really learn.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
[wimg]http://i.imgur.com/6fxUQL1.gif[/wimg]

Joxus

  • Registred Member
  • Loreweaver
  • *****
  • Posts: 80
    • View Profile
Re: [QUESTION] Custom race (TC 3.3.5a)
« Reply #11 on: August 31, 2014, 02:56:16 am »
Yeah you are right a facepalm is needed because I uploaded the wrong interface... =_=

That was the MoP UI
Gotta excuse me for that here are the right files

https://mega.co.nz/#!6oEQlIgK!kdX-P8ljywTJ9LA_sOOSwIPPNqnVcSYzOEAMkXqe2XU
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

phantomx

  • Contributors
  • Creator of Worlds
  • *****
  • Posts: 615
    • View Profile
Re: [QUESTION] Custom race (TC 3.3.5a)
« Reply #12 on: August 31, 2014, 03:02:21 am »
Quote from: "Joxus"
Yeah you are right a facepalm is needed because I uploaded the wrong interface... =_=

That was the MoP UI
Gotta excuse me for that here are the right files

https://mega.co.nz/#!6oEQlIgK!kdX-P8ljywTJ9LA_sOOSwIPPNqnVcSYzOEAMkXqe2XU


Are you sure those are new files, because they have the same problems as the "MoP" files.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »
[wimg]http://i.imgur.com/6fxUQL1.gif[/wimg]

Joxus

  • Registred Member
  • Loreweaver
  • *****
  • Posts: 80
    • View Profile
Re: [QUESTION] Custom race (TC 3.3.5a)
« Reply #13 on: August 31, 2014, 03:35:27 am »
If the new zip had the AccountLogin.lua file, then yes I'm sure. But I can't see the problem since I just did exactly as the guide stated on http://emudevs.com/showthread.php/121-How-to-Custom-Races!

It has a lot of copy paste stuff, hence why I can't really see what I'm doing wrong.

The edits done to CharacterCreate.lua and CharacterCreate.xml were very minimal, in CharacterCreate I had to change max races to 12 and add goblin/felorc in the RaceIconCoords  array and thats it according to the guide.

In CharacterCreate.xml however I saw some facepalm-worthy mistakes.. the </checkbutton>  and the s from </anchors> were missing at the end of RaceButton stuff. I thought  the -10 at the y coordinates were wrong, since it wasn't like that in the original, but that value was the same with guide.

I'm probably going to bed soon though, but I want to thank you for the help so far. :)
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

lordpsyan

  • Registred Member
  • BLP Convertor
  • *****
  • Posts: 9
    • View Profile
Re: [SOLVED] Custom race (TC 3.3.5a)
« Reply #14 on: July 31, 2015, 08:36:55 pm »
Glad i found this post. I have no idea why, but after redoing ChrRaces.dbc the alignment of the icons on the character creation screen finally put them at the bottom. but I am running into another problem. I am doing Goblin (Horde) and Naga (Alliance). I can see the Draenei icon for Naga, but it is blank for goblin. I am not really too concerned about this, since this is just for me and my kids. The real problem...

When I select either naga or goblin, they show up, with proper outfits for the classes I chose. Naga can change skin color, but the other stuff do nothing, and it won't create the character. I get this error:

Player::Create: Possible hacking-attempt: Account 2 tried creating a character named 'George' with invalid appearance attributes - refusing to do so

This error message comes from Player.cpp. I added a check in that file (basically, if race == NAGA || race == GOBLIN then skip the appearance checks) and it will create the character, but it puts a character change on the character, and it wont go in due to invalid appearance. I have worked for many hours trying to fix this, but I cannot do it. I do remember awhile back doing the tut on emudevs, with goblin and fel orc, and it working fine, except there are no female felorcs, so they looked funny. I cannot figure out what I am doing wrong. Maybe there are some changes to the core. I have limited internet (pdanet through my phone) but I will check back here and I can post any files needed.

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