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: removing a race at character select  (Read 6478 times)

Tidus

  • Registred Member
  • Race Changer
  • *****
  • Posts: 29
    • View Profile
removing a race at character select
« on: August 21, 2013, 11:54:55 pm »
I've been trying to remove a few classes (I know I know unusual) by using the two class and one race tutorials as a kind of guide.  I would've thought it'd be fairly simple lua and xml editing and it might be.  I just can't get it to work.

Using Khira's tutorial as a guide (since it's closest) here's what I've done.  I'm using the existing player races.  I still haven't decided which ones will be used in the final edit.  For now I just want 4.  Two horde and two alliance.  Let's say human, night elf, orc, and tauren.  They're all playable races already so no need to edit the chrRaces.dbc or the charBaseInfo.dbc as I'm fine with the class combinations for now.  Hence why it should all be lua/xml editing.

Don't need to worry about the gluestrings.lua since it's already filled in.  Only the charactercreate lua and xml should need editing according to the tutorial.

So first is charactercreate.lua.  Made the max_races = 4.  The portraits are fine so that should be all the editing necessary there.

Now on to the charactercreate.xml.  I want humans (#1), night elves (#3), orcs (#6), and tauren (#8).  So those are the buttons I'd still want to keep I presume.  So my charactercreateracebuttons are as follows:

<CheckButton name="CharacterCreateRaceButton1" inherits="CharacterCreateRaceButtonTemplate" id="1">
                        <Anchors>
                           <Anchor point="TOP" relativePoint="TOP" x="-50" y="-61"/>
                        </Anchors>
                     </CheckButton>
                     <CheckButton name="CharacterCreateRaceButton3" inherits="CharacterCreateRaceButtonTemplate" id="3">
                        <Anchors>
                           <Anchor point="TOPLEFT" relativeTo="CharacterCreateRaceButton1" relativePoint="BOTTOMLEFT" x="0" y="-21"/>
                        </Anchors>
                     </CheckButton>
                     <CheckButton name="CharacterCreateRaceButton6" inherits="CharacterCreateRaceButtonTemplate" id="6">
                        <Anchors>
                           <Anchor point="TOP" relativePoint="TOP" x="50" y="-61"/>
                        </Anchors>
                     </CheckButton>
                     <CheckButton name="CharacterCreateRaceButton8" inherits="CharacterCreateRaceButtonTemplate" id="8">
                        <Anchors>
                           <Anchor point="TOPLEFT" relativeTo="CharacterCreateRaceButton6" relativePoint="BOTTOMLEFT" x="0" y="-21"/>
                        </Anchors>
                     </CheckButton>

The result:

There's only the two race buttons, which is good.  I guess from the error that there's an issue with the other race buttons still being referenced, but I don't have a clue where that might be in the lua or xml to edit out.  Hope someone can help.  Thanks!
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

40thzombie

  • Registred Member
  • GM Isle Explorer
  • *****
  • Posts: 16
    • View Profile
Re: removing a race at character select
« Reply #1 on: August 23, 2013, 12:02:03 pm »
To remove it (speaking from my own personal experience) Requires no lua editing at all i have removed a couple of classes by deleting that line of the ChrClasses.Dbc

For example if i wanted to get rid of warlock i would delete Row 9

Races im not too sure on but i believe that editing column 1 on the race you want gone and changing it from 12 to something else like 5 gets rid of it, however there is probably some lua editing in this one because when i tried to do it it ended up like this

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

40thzombie

  • Registred Member
  • GM Isle Explorer
  • *****
  • Posts: 16
    • View Profile
Re: removing a race at character select
« Reply #2 on: August 23, 2013, 03:08:35 pm »
Ok so i managed to do what you wanted, will post what i did

1. Edit the ChrRaces.dbc column 1 change the 12 to anything else for the ones you want to disable

2. Find CharacterCreate.lua and change the MAX_RACES = to 4 then find

RACE_ICON_TCOORDS = {

Delete all the icon cords that arnt needed so if the races you want to keep enabled are the Human, Nightelf, Tauren and orc so it would look like this

RACE_ICON_TCOORDS = {
   ["HUMAN_MALE"]      = {0, 0.125, 0, 0.25},
   ["NIGHTELF_MALE"]   = {0.375, 0.5, 0, 0.25},
   
   ["TAUREN_MALE"]      = {0, 0.125, 0.25, 0.5},
   ["ORC_MALE"]      = {0.375, 0.5, 0.25, 0.5},

   ["HUMAN_FEMALE"]   = {0, 0.125, 0.5, 0.75},  
   ["NIGHTELF_FEMALE"]   = {0.375, 0.5, 0.5, 0.75},
   
   ["TAUREN_FEMALE"]   = {0, 0.125, 0.75, 1.0},  
   ["ORC_FEMALE"]      = {0.375, 0.5, 0.75, 1.0},
};

Save it and close it

3. Find CharacterCreate.xml

then find <CheckButton name="CharacterCreateRaceButton1" inherits="CharacterCreateRaceButtonTemplate" id="1">

Replace that with

                     <CheckButton name="CharacterCreateRaceButton1" inherits="CharacterCreateRaceButtonTemplate" id="1">
                        <Anchors>
                           <Anchor point="TOP" relativePoint="TOP" x="-50" y="-61"/>
                        </Anchors>
                     </CheckButton>
                     <CheckButton name="CharacterCreateRaceButton2" inherits="CharacterCreateRaceButtonTemplate" id="2">
                        <Anchors>
                           <Anchor point="TOPLEFT" relativeTo="CharacterCreateRaceButton1" relativePoint="BOTTOMLEFT" x="0" y="-21"/>
                        </Anchors>
                     </CheckButton>
                     <CheckButton name="CharacterCreateRaceButton3" inherits="CharacterCreateRaceButtonTemplate" id="3">
                        <Anchors>
                           <Anchor point="TOP" relativePoint="TOP" x="50" y="-61"/>
                        </Anchors>
                     </CheckButton>
                     <CheckButton name="CharacterCreateRaceButton4" inherits="CharacterCreateRaceButtonTemplate" id="4">
                        <Anchors>
                           <Anchor point="TOPLEFT" relativeTo="CharacterCreateRaceButton3" relativePoint="BOTTOMLEFT" x="0" y="-21"/>
                        </Anchors>
                     </CheckButton>

Pack it into a MPQ Then it should work

Here is what it should look like

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

Hardisk

  • Registred Member
  • MWCS Enthusiast
  • *****
  • Posts: 1
    • View Profile
Re: removing a race at character select
« Reply #3 on: August 25, 2013, 09:45:13 am »
Nice ! I was gonna try and find a solution myself then I found this thread :D

Any idea how to resize the Ally/Horde flag so it fits the icons ? And actually how to resize the entire race/class/character style tooltip ? Since I have less races there's no need for it to go down to the bottom , it can stop before.

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

XxXGenesisXxX

  • Contributors
  • Model Change Addict
  • *****
  • Posts: 204
    • View Profile
Re: removing a race at character select
« Reply #4 on: August 25, 2013, 11:28:15 am »
Both flags are apart of a single image. If you were to scale it in any way, the whole image would scale and end up askew (Or at the very least unclean). Your best bet is to just extract the blp, convert it to png, and edit it down in size buy cutting a section out.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Tidus

  • Registred Member
  • Race Changer
  • *****
  • Posts: 29
    • View Profile
Re: removing a race at character select
« Reply #5 on: August 27, 2013, 02:08:23 pm »
Thanks!
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Swampdog

  • Registred Member
  • Race Changer
  • *****
  • Posts: 28
    • View Profile
Re: removing a race at character select
« Reply #6 on: December 26, 2013, 05:20:12 am »
Quote from: "40thzombie"
Ok so i managed to do what you wanted, will post what i did

1. Edit the ChrRaces.dbc column 1 change the 12 to anything else for the ones you want to disable

2. Find CharacterCreate.lua and change the MAX_RACES = to 4 then find

RACE_ICON_TCOORDS = {

Delete all the icon cords that arnt needed so if the races you want to keep enabled are the Human, Nightelf, Tauren and orc so it would look like this

RACE_ICON_TCOORDS = {
   ["HUMAN_MALE"]      = {0, 0.125, 0, 0.25},
   ["NIGHTELF_MALE"]   = {0.375, 0.5, 0, 0.25},
   
   ["TAUREN_MALE"]      = {0, 0.125, 0.25, 0.5},
   ["ORC_MALE"]      = {0.375, 0.5, 0.25, 0.5},

   ["HUMAN_FEMALE"]   = {0, 0.125, 0.5, 0.75},  
   ["NIGHTELF_FEMALE"]   = {0.375, 0.5, 0.5, 0.75},
   
   ["TAUREN_FEMALE"]   = {0, 0.125, 0.75, 1.0},  
   ["ORC_FEMALE"]      = {0.375, 0.5, 0.75, 1.0},
};

Save it and close it

3. Find CharacterCreate.xml

then find <CheckButton name="CharacterCreateRaceButton1" inherits="CharacterCreateRaceButtonTemplate" id="1">

Replace that with

                     <CheckButton name="CharacterCreateRaceButton1" inherits="CharacterCreateRaceButtonTemplate" id="1">
                        <Anchors>
                           <Anchor point="TOP" relativePoint="TOP" x="-50" y="-61"/>
                        </Anchors>
                     </CheckButton>
                     <CheckButton name="CharacterCreateRaceButton2" inherits="CharacterCreateRaceButtonTemplate" id="2">
                        <Anchors>
                           <Anchor point="TOPLEFT" relativeTo="CharacterCreateRaceButton1" relativePoint="BOTTOMLEFT" x="0" y="-21"/>
                        </Anchors>
                     </CheckButton>
                     <CheckButton name="CharacterCreateRaceButton3" inherits="CharacterCreateRaceButtonTemplate" id="3">
                        <Anchors>
                           <Anchor point="TOP" relativePoint="TOP" x="50" y="-61"/>
                        </Anchors>
                     </CheckButton>
                     <CheckButton name="CharacterCreateRaceButton4" inherits="CharacterCreateRaceButtonTemplate" id="4">
                        <Anchors>
                           <Anchor point="TOPLEFT" relativeTo="CharacterCreateRaceButton3" relativePoint="BOTTOMLEFT" x="0" y="-21"/>
                        </Anchors>
                     </CheckButton>

Pack it into a MPQ Then it should work

Anyone had luck getting this to work lately?  One thing I noticed is that it looks like columns are different in my  3.3.5a (12340) chrRaces.dbc.  Column one is the race ID and column 2 is the one that I can enable and disable races.  Other than that, I followed this list verbatim but am getting a LUA error and alll the class buttons are showing the entire BLP instead of their individual class icons (same with the race and class round icons above the descriptions).

The error I'm getting is "InterfaceGlueXMLCharacterCreate.lua: 257: attempt to index a nil value"

Line 257 is the getglobal function for CharacterCreateRaceButton when the id comparison to the for loop iterator is false.

My MAX_RACES is set to 4 (only using human, dwarf, orc, and blood elf initially)
My BLPs have been edited to remove the other races
My RACE_ICON_TCOORDS have been updated to pull from the correct BLP positions (the four races show up correctly on the flags and the gender icons are correct then everything goes to hell lol)
The frame definitions match what is posted verbatim
All races except the four mentioned above have been set to 1 in chrRaces.DBC, the four above set to 12
Updated xml/lua files copied to Interface/GlueXML within my MPQ build folder
Updated BLP files copied into Interface/GLUES/CHARACTERCREATE within my MPQ build folder
Updated usrRaces.dbc file copied into DBFilesClient within my MPQ build folder
Patch-enUS-4.MPQ created within my Client335aNoggit/Data/enUS folder

I have made no changes serverside since I am just removing access to races from the client creation process. I did start setting up my dev environment for serverside today though but am currently using Steff's Trinity compile that comes within the Noggit tutorial download.

Also it appears that the gender buttons have quit working.  The only icons that show are female and when I click Male, I get another lua error: "InterfaceGlueXMLCharacterCreate.lua: 413: attempt to index global 'CharacterCreateGenderButtonMaleHighlightSetText ..."  (can't read where ... is...  close button covers it up)..  But that line of code is within the SetCharacterGender function when the female button is pressed.

Thanks in advance for any thoughts and/or suggestions!
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Vlad

  • Registred Member
  • Loreweaver
  • *****
  • Posts: 83
    • View Profile
Re: removing a race at character select
« Reply #7 on: December 28, 2013, 02:27:51 am »
Oh, the memories. <3 I love these errors.

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

caduceus

  • Registred Member
  • Race Changer
  • *****
  • Posts: 25
    • View Profile
Re: removing a race at character select
« Reply #8 on: December 30, 2013, 08:21:38 pm »
I am trying to figure this out as well, where do you get the CharacterCreateRaceButtonTemplate ID? what is it based from. I keep getting the same error when I try to remove a race button.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Swampdog

  • Registred Member
  • Race Changer
  • *****
  • Posts: 28
    • View Profile
Re: removing a race at character select
« Reply #9 on: December 30, 2013, 08:42:41 pm »
If you set up your modding environment like Steff outlined in the Noggit tutorial, the template files are in D:WoWModdingClientFilesInterfaceGLUESCHARACTERCREATE where D: would be whatever drive you set it up in.  (In my case D:)

The files used by the character create screen are UI-CharacterCreate-Races.blp and UI-CharacterCreate-RacesRound.blp for races.  There are no IDs.  All race icons are in a single file.  Top row are male alliance, second row are male horde, third row are female alliance, and fourth row are female horde.

The way the UI knows what to display is controlled by the RACE_ICON_TCOORDS section within D:WoWModdingClientFilesInterfaceGlueXMLCharacterCreate.LUA.

I think the class icons are done the same way but I'm still stuck on what is causing my problem above.  My race icons display fine but something seems to have broken the gender selection process.  Spent two days on trying to figure it out and then gave up for now since nobody had any suggestions to offer... :(
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Swampdog

  • Registred Member
  • Race Changer
  • *****
  • Posts: 28
    • View Profile
Re: removing a race at character select
« Reply #10 on: December 30, 2013, 08:52:59 pm »
This is a screenie of what I'm getting with my issue:

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

caduceus

  • Registred Member
  • Race Changer
  • *****
  • Posts: 25
    • View Profile
Re: removing a race at character select
« Reply #11 on: December 30, 2013, 09:01:14 pm »
But what I am asking is how do you figure out what order that the  RACE_ICON_TCOORDS are calling? I understand where all the files are & how to acquire them. My problem is them when I remove from CharacterCreate.xml

Code: [Select]
example: <CheckButton name="CharCreateRaceButton9" inherits="CharCreateRaceButtonTemplate" id="9">
<Anchors>
    <Anchor point="TOP" x="-42" y="-530"/>
</Anchors>
</CheckButton>

and

<CheckButton name="CharCreateClassButton9" inherits="CharCreateClassButtonTemplate" id="9">
<Anchors>
    <Anchor point="TOPLEFT" relativeTo="CharCreateClassButton8" relativePoint="BOTTOMLEFT" x="0" y="-18"/>
</Anchors>

I receive the same error as the original post.

Attempt to indexlocal 'button' (a nil value). Being unexperienced in UI work, I have no idea how the races are called per button.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Swampdog

  • Registred Member
  • Race Changer
  • *****
  • Posts: 28
    • View Profile
Re: removing a race at character select
« Reply #12 on: December 30, 2013, 09:11:39 pm »
The ID numbers are not race specific.  Mine are 1-4 and it still displays my blood elf icon which is race 8 in the chrRaces.dbc..  The CharacterRaceButtonTemplate is an XML template that I think is defined within the same XML file you are editing.  The only thing that it does is set up default frame properties and such which the code you posted inherits.  It doesn't really have anything to do with what image file is being called.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Portals

  • Registred Member
  • GM Isle Explorer
  • *****
  • Posts: 24
    • View Profile
Re: removing a race at character select
« Reply #13 on: January 05, 2014, 06:09:39 am »
Can someone do a tutorial like this for classes, I tried deleting a line from chrclasses.dbc but my wow crashes when I go to create a character.
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Swampdog

  • Registred Member
  • Race Changer
  • *****
  • Posts: 28
    • View Profile
Re: removing a race at character select
« Reply #14 on: January 05, 2014, 06:26:19 am »
Quote from: "Portals"
Can someone do a tutorial like this for classes, I tried deleting a line from chrclasses.dbc but my wow crashes when I go to create a character.

Haven't seen one on removing a class but I have this one bookmarked for class creation..  It might give all the places you need to edit and such...

viewtopic.php?f=26&t=1840&hilit=Shell
« Last Edit: January 01, 1970, 01:00:00 am by Admin »