Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => Miscellaneous => Topic started by: Moridhin on September 19, 2012, 07:49:30 pm

Title: [QUESTION] Error when adding custom race
Post by: Moridhin on September 19, 2012, 07:49:30 pm
Ok so i followed guide on adding custom race,and when i finish client-side modding i get this error.
(http://s13.postimage.org/g91jt5wir/Wo_WScrn_Shot_091912_193525.jpg) (http://postimage.org/image/g91jt5wir/)
I am really confused :?: ,MAYBE i did something wrong,but then again when i create custom MPQ archive without changing lua and xml files i still get this error!
Don't know what to do. :(
And yes i have cracked wow.exe(to bypass lua error),i also uploaded my mpq file if anyone wants to check if everything is properly edited.
So,any help would be greatly appreciated.
Title: Re: [QUESTION] Error when adding custom race
Post by: schlumpf on September 19, 2012, 08:24:41 pm
There are tables for the background models and ambient sound.
You forgot to expand them to have data for your race.
Title: Re: [QUESTION] Error when adding custom race
Post by: Moridhin on September 19, 2012, 08:35:27 pm
Which tables are that,i edited ChrRaces.dbc and CharBaseInfo.dbc?
What more should i edit?
Title: Re: [QUESTION] Error when adding custom race
Post by: schlumpf on September 19, 2012, 08:41:10 pm
As the interface is breaking, obviously interface files.
Interface/GlueXML/. Some lua. The name of the array is in your screenshot. Just search in the files. global? glueparent? I don't remember.
Title: Re: [QUESTION] Error when adding custom race
Post by: Moridhin on September 19, 2012, 09:57:39 pm
Its error related to GlueParent.lua but still idk how to fix it,because as i said even if i do not modify it,i still get this error when making custom patch.
Not sure what to do
Title: Re: [QUESTION] Error when adding custom race
Post by: detonatorss on September 19, 2012, 11:35:06 pm
you have to put a folder in that path:

InterfaceGluesModelsUI_NAMEOFTHERACE

and you rename another UI of any race and put it here nothing more to do
Title: Re: [QUESTION] Error when adding custom race
Post by: schlumpf on September 19, 2012, 11:50:29 pm
Quote from: "Moridhin"
Its error related to GlueParent.lua but still idk how to fix it,because as i said even if i do not modify it,i still get this
the problem is not modifying it, not modifying it in a wrong way.

Just look at the line, the error tells you.
Title: Re: [QUESTION] Error when adding custom race
Post by: Moridhin on September 20, 2012, 01:19:46 pm
Still can't get it to work,can someone upload glueparent.lua,as example what should i do.
Thanks.
---------EDIT
Ok so i succeed in fixing that error,but then i got this:
(http://postimage.org/image/remdzm57l/)
i fix that just like GlueParent.lua,and then when i can finally enter character creation screen i get this:
(http://s16.postimage.org/4h16nxv8x/Wo_WScrn_Shot_092012_134307.jpg) (http://postimage.org/image/4h16nxv8x/)

What should do know??
Title: Re: [QUESTION] Error when adding custom race
Post by: Ascathos on September 20, 2012, 02:43:54 pm
Quote from: "Moridhin"
Still can't get it to work,can someone upload glueparent.lua,as example what should i do.
Thanks.
---------EDIT
Ok so i succeed in fixing that error,but then i got this:
(http://postimage.org/image/remdzm57l/)
i fix that just like GlueParent.lua,and then when i can finally enter character creation screen i get this:
(http://s16.postimage.org/4h16nxv8x/Wo_WScrn_Shot_092012_134307.jpg) (http://postimage.org/image/4h16nxv8x/)

What should do know??
It means that the coords given on the Race Button doesn't make sense for him. I'd say if you changed races, you have to change the file containing the races accordingly
Title: Re: [QUESTION] Error when adding custom race
Post by: Moridhin on September 20, 2012, 03:48:22 pm
Well i saw in that tutorial about adding races some guy had same problems like me,so i am wondering how he fixed it,how can i fix this error.Should something be done with CharacterCreate.xml?
Title: Re: [QUESTION] Error when adding custom race
Post by: schlumpf on September 20, 2012, 04:06:31 pm
In CharacterCreate.lua, look at line 182. There is a variable name. Search the variable name. Add an entry for your race.
Title: Re: [QUESTION] Error when adding custom race
Post by: Moridhin on September 20, 2012, 04:35:03 pm
Ok so this is the line 182:
Code: [Select]
_G["CharacterCreateClassButton"..index.."NormalTexture"]:SetTexCoord(coords[1], coords[2], coords[3], coords[4]);What should i exactly do here,sorry not really good at this.
Title: Re: [QUESTION] Error when adding custom race
Post by: schlumpf on September 20, 2012, 04:44:20 pm
Quote from: "Moridhin"
Ok so this is the line 182:
Code: [Select]
_G["CharacterCreateClassButton"..index.."NormalTexture"]:SetTexCoord(coords[1], coords[2], coords[3], coords[4]);What should i exactly do here,sorry not really good at this.
The error states that coords is a nil value. Look at the lines above, where coords is set and how it is set.
Title: Re: [QUESTION] Error when adding custom race
Post by: Moridhin on September 20, 2012, 04:51:42 pm
This is two above lines:
Code: [Select]
for i=1, select("#", ...), 3 do
coords = RACE_ICON_TCOORDS[strupper(select(i+1, ...).."_"..gender)];
It is a function:"CharacterCreateEnumerateRaces".
Title: Re: [QUESTION] Error when adding custom race
Post by: schlumpf on September 20, 2012, 05:00:04 pm
Quote from: "Moridhin"
This is two above lines:
Code: [Select]
for i=1, select("#", ...), 3 do
coords = RACE_ICON_TCOORDS[strupper(select(i+1, ...).."_"..gender)];
It is a function:"CharacterCreateEnumerateRaces".
So you want to search for RACE_ICON_TCOORDS now, as that seems to be a nil value for your race.
It might be in a different file.
Title: Re: [QUESTION] Error when adding custom race
Post by: Moridhin on September 20, 2012, 05:20:50 pm
Ok i found RACE_ICON_TCOORDS in this file and it loos like this:
Code: [Select]
RACE_ICON_TCOORDS = {
["HUMAN_MALE"] = {0, 0.125, 0, 0.25},
["DWARF_MALE"] = {0.125, 0.25, 0, 0.25},
["GNOME_MALE"] = {0.25, 0.375, 0, 0.25},
["NIGHTELF_MALE"] = {0.375, 0.5, 0, 0.25},

["TAUREN_MALE"] = {0, 0.125, 0.25, 0.5},
["SCOURGE_MALE"] = {0.125, 0.25, 0.25, 0.5},
["TROLL_MALE"] = {0.25, 0.375, 0.25, 0.5},
["ORC_MALE"] = {0.375, 0.5, 0.25, 0.5},

["HUMAN_FEMALE"] = {0, 0.125, 0.5, 0.75},  
["DWARF_FEMALE"] = {0.125, 0.25, 0.5, 0.75},
["GNOME_FEMALE"] = {0.25, 0.375, 0.5, 0.75},
["NIGHTELF_FEMALE"] = {0.375, 0.5, 0.5, 0.75},

["TAUREN_FEMALE"] = {0, 0.125, 0.75, 1.0},  
["SCOURGE_FEMALE"] = {0.125, 0.25, 0.75, 1.0},
["TROLL_FEMALE"] = {0.25, 0.375, 0.75, 1.0},
["ORC_FEMALE"] = {0.375, 0.5, 0.75, 1.0},

["BLOODELF_MALE"] = {0.5, 0.625, 0.25, 0.5},
["BLOODELF_FEMALE"] = {0.5, 0.625, 0.75, 1.0},

["DRAENEI_MALE"] = {0.5, 0.625, 0, 0.25},
["DRAENEI_FEMALE"] = {0.5, 0.625, 0.5, 0.75},

    ["GOBLIN_MALE"]     = {0.5, 0.625, 0, 0.25},
    ["GOBLIN_FEMALE"]   = {0.5, 0.625, 0, 0.25},

    ["FELORC_MALE"]     = {0.5, 0.625, 0, 0.25},
    ["FELORC_FEMALE"]   = {0.5, 0.625, 0, 0.25},  
};
Title: Re: [QUESTION] Error when adding custom race
Post by: schlumpf on September 20, 2012, 05:39:31 pm
So is there an entry for both genders of your race?
Title: Re: [QUESTION] Error when adding custom race
Post by: Moridhin on September 20, 2012, 05:47:05 pm
Sorry but i don't get what you mean by that,like raceID...?
Title: Re: [QUESTION] Error when adding custom race
Post by: schlumpf on September 20, 2012, 06:11:38 pm
In ChrRaces.dbc, you specify an internal identifier of your race, like HUMAN or NIGHTELF.
The table you have there has to have two entries: YOURRACE_MALE and YOURRACE_FEMALE.
If they are not included, the client won't find them when trying to display race selection icons.
Title: Re: [QUESTION] Error when adding custom race
Post by: Moridhin on September 20, 2012, 06:32:10 pm
Quote from: "schlumpf"
In ChrRaces.dbc, you specify an internal identifier of your race, like HUMAN or NIGHTELF.
The table you have there has to have two entries: YOURRACE_MALE and YOURRACE_FEMALE.
If they are not included, the client won't find them when trying to display race selection icons.
Sorry but that doesn't make any sense to me,there are no YOURRACE_MALE and YOURRACE_FEMALE entries in ChrRaces.dbc
I just made 2 races playable in this .dbc and add faction,also BaseLanguage and thats it.
Male and female model entries are left by default.
Title: Re: [QUESTION] Error when adding custom race
Post by: schlumpf on September 20, 2012, 06:40:05 pm
Quote from: "Moridhin"
I just made 2 races playable in this .dbc and add faction,also BaseLanguage and thats it.
YOURRACE refers to the name given for the two races you made playable. As I don't know which ones you use, I choose YOURRACE to indicate, what you have to insert.
"The table" refers to the table in the lua file, not the dbc in that sentence.
Title: Re: [QUESTION] Error when adding custom race
Post by: Moridhin on September 20, 2012, 06:43:55 pm
Ok i get you now but i already included races i made playable in the .lua file
Code: [Select]
["GOBLIN_MALE"]     = {0.5, 0.625, 0, 0.25},
    ["GOBLIN_FEMALE"]   = {0.5, 0.625, 0, 0.25},

    ["FELORC_MALE"]     = {0.5, 0.625, 0, 0.25},
    ["FELORC_FEMALE"]   = {0.5, 0.625, 0, 0.25},  
Title: Re: [QUESTION] Error when adding custom race
Post by: schlumpf on September 20, 2012, 06:45:19 pm
Are you sure the names match with the ones given in the DBC?
Title: Re: [QUESTION] Error when adding custom race
Post by: Moridhin on September 20, 2012, 06:48:28 pm
Yes they match 100%...i just checked again they match.
Title: Re: [QUESTION] Error when adding custom race
Post by: schlumpf on September 20, 2012, 07:00:17 pm
Given the code you have shown, I have no idea why that error would show up, then.
Are you sure, your modified file is the last one getting loaded? (i.e. in the MPQ with the highest number of locale MPQs)
Title: Re: [QUESTION] Error when adding custom race
Post by: Ascathos on September 20, 2012, 07:02:22 pm
DId you make sure that there is an icon where you point the file to ? I remember I had that issue once
Title: Re: [QUESTION] Error when adding custom race
Post by: Moridhin on September 20, 2012, 07:09:00 pm
Quote from: "Moridhin"
Are you sure, your modified file is the last one getting loaded?
Yes i make sure to use mpq with highest number.
Quote from: "Ascathos"
DId you make sure that there is an icon where you point the file to ? I remember I had that issue once
Not sure what you mean.