Modcraft - The community dedicated to quality WoW modding!
Wrath of the Lich King Modding => Serverside Modding => Topic started by: Ascathos on January 09, 2013, 04:19:57 pm
-
Introduction
In the following, I want to explain how to create a custom Class and make it work on Trinity Core. That being said, it's relatively simple in creation, but requires quite a bit of foresight, imagination and planning. This tutorial is created with a 3.3.5a Trinity Core version, that may change in the future. If this happens, it's the obligatory of the user to find solutions and post them. That being said, I am not going into details of how to do anything. That should be "common knowledge". A lot of the here shown content is a contribution of several people, namely "schlumpf (http://modcraft.io/memberlist.php?mode=viewprofile&u=59)", "XxXGenesisXxX (http://modcraft.io/memberlist.php?mode=viewprofile&u=1999)", "Khira (http://modcraft.io/memberlist.php?mode=viewprofile&u=103)", "stoneharry" (http://modcraft.io/memberlist.php?mode=viewprofile&u=435) and many others - some of which I forgot. A huge thank you to the TrinityCore staff, which helped and still helps me learn more about the world of coding beyond world of warcraft (gives me a good glimpse, though). Still, I am thankful for their contributions that enabled this.
Due the length of this topic, I shall divide the topic in several posts to make it clearer and better to look over. I'm not going in depth about indentions. Please do that yourself.
What to expect/Index
Within this discourse, I want to mention following things:
- Introduction, Definition "class" (http://modcraft.io/viewtopic.php?f=79&p=20527)
- Create your own class and get it work (http://modcraft.io/viewtopic.php?f=79&p=20528)
- [/*][li] [url=Enabling Class Quests (http://Create a talent tree with a spell[/url)[Optional][/*]
[li] [Optional][/*]
[li] [url=Creating an Item Set (http://Enabling Glyphs[/url) [Optional][/*]
Definition
In World of Warcraft, a class defines a type and field of specialization a character obtains. Divided in different classes, each has numerous "Archetypes" to the common roleplay genre. The most common archetypes are the Warrior, the Archer, the Magician and other, "finer" ones. World of Warcraft is blurring the lines of these archetypes. For example, the Hunter has aspects of a warrior, an archer and also to a beastmaster - each representing common aspects mixed into an unique character. The Deathknight mixes magical aspects with warrior aspects, for example. Once you go finer into the definition, you quickly see that "stereotypes" are not subject to discussion here.
How could you want to create your own class ? In the end, it all comes down to what you want. Do you want your own game and remove the old ones ? Or do you feel like there is something missing that may be enormous ? The good thing about modding is the imagination. You can do whatever you want. The bad thing is how it's done, because horrible applications may be a waste of time and effort.
(Permission by Steff to post in here. Work in progress)
-
This part is the most complex, longest and hardest part of it all. I try to explain it as easy as I can. If you have issues reading, simply press quote in the bottom and press preview in the reply window.
Note that I am basically copying the Warrior class for the most part. You have to do most things on your own to get an understanding for them, however, I'll try my best. If something is unclear, pm me.
What you need
1. Any C++ Editor and compiler (Most cases: Microsoft Visual C++ (Everything can be used, but 2010+ is advisable)
2. Any Text/CSV editor (I prefer: Notepad++ - edits both)
3. Any DBC Editor (I prefer: DBCUtil, Tallis and MyDBCEditor for whatever is the best option in each case.)
4. Any SQL Editor (I prefer: HeidiSQL)
5. Any BLP Converter (I prefer: BLP Laboratory)
6. [Optional] Any picture edit programm (I prefer: Gimp or Photoshop)
7. Important: Check for the latest files you can find for anything. If pieces of information are missing that are listed in here, look further and find the actual one.
SQL
The most easiest part that I am even providing you. Note though that these are the stats given to the warrior, so you have to make them fitting to your own personal needs.
- Here is the link (http://pastebin.com/yAQdmzc6).
- To use it, simply copy and paste all the queries into your SQL programm, fit the variables to your needs and run it. Mind the ; after each line.
DBC
You need to edit the following DBCs:
- ChrClasses.dbc
- CharStartOutfit.dbc*
- CharBaseInfo.dbc**
- gtChanceToMeleeCrit.dbc*
- gtChanceToMeleeCritBase.dbc*
- gtChanceToSpellCrit.dbc*
- gtChanceToSpellCritBase.dbc*
- gtCombatRatings.dbc*
- gtOCTClassCombatRatingScalar.dbc*
- gtOCTRegenHP.dbc*
- gtOCTRegenMP.dbc*
- gtRegenHPPerSpt.dbc*
- gtRegenMPPerSpt.dbc*
- SkillLineAbility.dbc
*:Edit with DBCUtil for best results/**: Edit with either Tallis or DBCUtil
[/li][/list]
Core
gameHeader Filesshareddefines.h
gameSource FilesObjectMgr.cpp
gameSource FilesPlayer.cpp
scriptsSource Filescs_misc.cpp
scriptsSource Filesspell_item.cpp
LUA (Interface)
- CharacterCreate.xml
- CharacterCreate.lua
- GlueStrings.lua
- Constant.lua
This is the essential. To even attempt running any further, you have to understand what each change does. Thus, I shall start with the core (which is fairly the most uncommon part in this).
Changes to the Core
- - gameHeader Filesshareddefines.h - -
// Class value is index in ChrClasses.dbc
enum Classes
{
CLASS_WARLOCK = 9,
//CLASS_UNK = 10,
CLASS_DRUID = 11[|],
CLASS_HERO = 12 //I added this line[|]
};
// max+1 for player class
#define MAX_CLASSES [|]13[|]
#define CLASSMASK_ALL_PLAYABLE
((1<<(CLASS_WARRIOR-1))|(1<<(CLASS_PALADIN-1))| (1<<(CLASS_HUNTER-1)) |
(1<<(CLASS_ROGUE-1)) |(1<<(CLASS_PRIEST-1)) | (1<<(CLASS_SHAMAN-1)) |
(1<<(CLASS_MAGE-1)) |(1<<(CLASS_WARLOCK-1))| (1<<(CLASS_DRUID-1)) |
(1<<(CLASS_DEATH_KNIGHT-1))| [|](1<<(CLASS_HERO-1)))[|]
enum SpellFamilyNames
{
SPELLFAMILY_DEATHKNIGHT = 15,
// 16 - unused
SPELLFAMILY_PET = 17[|],
SPELLFAMILY_HERO = 18 //I added this line[|]
};
Each change is noted within the [|]s. Make sure to remove them when you copy it. I only paste parts of most edited parts.
- Within the Classes enum, we add the "Hero" as 12th class (with one unknown definition, the 10). Note how you need to add a comma after the druid.
- I upped the "MAX_CLASSES" value by one, so that it counts 11 by default, one for "zero" (as CLASS_NONE) and our new class.
- For the Classmasks, I put the Class at the end. After all, we want the hero to be at the end, not before (which would mess up all the bytes and create a lot of chaos). Thus, it becomes "2048" as value.
- The SpellFamilyNames is a value also given within the ChrClasses.dbc, which can be a central integrate for your future plans. It can be used as conditions for spells to work.
- - gameSource FilesObjectMgr.cpp - -
Search for: "ObjectMgr::BuildPlayerLevelInfo"
for (uint8 lvl = sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)-1; lvl < level; ++lvl)
{
switch (_class)
{
case CLASS_WARRIOR:
info->stats[STAT_STRENGTH] += (lvl > 23 ? 2: (lvl > 1 ? 1: 0));
info->stats[STAT_STAMINA] += (lvl > 23 ? 2: (lvl > 1 ? 1: 0));
info->stats[STAT_AGILITY] += (lvl > 36 ? 1: (lvl > 6 && (lvl%2) ? 1: 0));
info->stats[STAT_INTELLECT] += (lvl > 9 && !(lvl%2) ? 1: 0);
info->stats[STAT_SPIRIT] += (lvl > 9 && !(lvl%2) ? 1: 0);
break;
[...]
case CLASS_DRUID:
info->stats[STAT_STRENGTH] += (lvl > 38 ? 2: (lvl > 6 && (lvl%2) ? 1: 0));
info->stats[STAT_STAMINA] += (lvl > 32 ? 2: (lvl > 4 ? 1: 0));
info->stats[STAT_AGILITY] += (lvl > 38 ? 2: (lvl > 8 && (lvl%2) ? 1: 0));
info->stats[STAT_INTELLECT] += (lvl > 38 ? 3: (lvl > 4 ? 1: 0));
info->stats[STAT_SPIRIT] += (lvl > 38 ? 3: (lvl > 5 ? 1: 0));
[|]break;
case CLASS_HERO:
info->stats[STAT_STRENGTH] += (lvl > 23 ? 2: (lvl > 1 ? 1: 0));
info->stats[STAT_STAMINA] += (lvl > 23 ? 2: (lvl > 1 ? 1: 0));
info->stats[STAT_AGILITY] += (lvl > 36 ? 1: (lvl > 6 && (lvl%2) ? 1: 0));
info->stats[STAT_INTELLECT] += (lvl > 9 && !(lvl%2) ? 1: 0);
info->stats[STAT_SPIRIT] += (lvl > 9 && !(lvl%2) ? 1: 0);[|]
}
}
}
- I had to ask about this function myself. It was not essentially something I learned already, however, once you understand it, it makes sense. Basically, it's a bool, a conditioning within itself. For example, Strength. If the player is over level 23, he gains 2 points per level. If he is not, but he is over level 1, he gains one point, else, he would gain no points at all. See how the : basically sets limiters ? If over 23, or over 1, or none at all.
If we wanted to have a Class that gets high strength values right from the beginning, for example from level 1 onward none, but 4 after level 6 and only 2 points after level 46, we could do this:
{
switch (_class)
{
[...]
case CLASS_HERO:
info->stats[STAT_STRENGTH] += (lvl > 6 ? 4: (lvl > 46 ? 2: 0));
[...]
}
}
}
- He would gain 0 points until level 6. After level 6, he gains 4 points of strength each level, until he reaches level 46, as everything over 46 gets 2 points of strength.
This is an explanation done by Nay, one of the current TC devs:
info->stats[STAT_STRENGTH] += (lvl > 23 ? 2: (lvl > 1 ? 1: 0));
can be written as
if (lvl > 23)
info->stats[STAT_STRENGTH] += 2;
else if (lvl > 1)
info->stats[STAT_STRENGTH] += 1;
else // should never happen
info->stats[STAT_STRENGTH] += 0;
and
info->stats[STAT_AGILITY] += (lvl > 36 ? 1: (lvl > 6 && (lvl%2) ? 1: 0));
to
if (lvl > 36)
info->stats[STAT_AGILITY] += 1;
else if (lvl > 6 && isEven(lvl)) // isEven returns true if number is divisible by 2 (0,2,4,6,8,etc)
info->stats[STAT_AGILITY] += 1;
else
info->stats[STAT_AGILITY] += 0;
Explanation given in TrinityCore Forum. Many thanks at this point to Nay, who took the time to explain this so well! (http://www.trinitycore.org/f/topic/7756-understanding-the-buildplayerlevelinfo-function/?p=50535)
Explanations of some conditions symbols:
- : in this case "or" - as sort of conditioning within this, it handles what is currently given, so that one thing is applying.
- && "and" - both must be given, so that this can happen
- %2 "even number" - Only even numbers, which are dividable by 2, e.g. 2/4/6/8/10.
- !something "something is not" - Something must not be given, for example !(lvl%2) means that the number must not be even.
- > = < - if I have to explain these, you should return to primary school.
- ? in this case "results in" - basically, what this results to.
- - gameSource FilesPlayer.cpp - -
Search for: "InventoryResult Player::CanRollForItemInLFG"
Go to and alter to:
if (_class == CLASS_WARRIOR || _class == CLASS_PALADIN || _class == CLASS_DEATH_KNIGHT[|] || _class == CLASS_HERO)[|]
- This is basically to insure LFG support and prevent crashes. Seeing as I want the Hero to be a "warrior" class, I placed him in this category.
Search for: "Player::GetDodgeFromAgility"
Go to and alter to:
const float dodge_base[MAX_CLASSES] =
{
0.024211f, // Warlock
0.0f, // ??
0.056097f[|], // Druid
0.064974f // Hero [|]
};
- I want to give my character dodge based on agility, so I set a value here. You can set it to whatever you want.
Search for: "crit_to_dodge[MAX_CLASSES]"
const float crit_to_dodge[MAX_CLASSES] =
{
1.00f/1.15f, // Mage
0.97f/1.15f, // Warlock (?)
0.0f, // ??
2.00f/1.15f[|], // Druid
1.75f/1.15f // Hero[|]
};
- This is the same like the dodge from agility value; basically, this defines a part of the battle calculation. Add this to ensure smooth combat. Base it on the existing values.
- - scriptsSource Filescs_misc.cpp - -
Search: "std::string raceStr, ClassStr;"
Go to and alter to:
switch (Class)
{
case CLASS_DRUID:
ClassStr = "Druid";
break;
[|]case CLASS_HERO:
ClassStr = "Hero";
break;[|]
}
- This is merely for the ego, however, it may or may not prevent a crash. Better save than sound, as we often enough learned, we define a ClassStr for the character, so that .pinfo works safely on a person.
- - scriptsSource Filesspell_item.cpp - -
Search: "possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_SP);"
Alter to:
void HandleDummy(SpellEffIndex /*effIndex*/)
{
Unit* caster = GetCaster();
std::vector<uint32> possibleSpells;
switch (caster->getClass())
{
case CLASS_WARLOCK:
case CLASS_MAGE:
case CLASS_PRIEST:
possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_SP);
break;
[|]case CLASS_HERO:[|] // I added this line
case CLASS_DEATH_KNIGHT:
case CLASS_WARRIOR:
possibleSpells.push_back(SPELL_FLASK_OF_THE_NORTH_STR);
break;
- Again, this is more for the completeness than for anything else. I guess, though, that this also prevents crashs from missing data. As we want to make it clean, this is necessary.
If you did everything right, you should be able to compile. If not, go through these notes again. What are your problems ? What did you do wrong ? Ask questions if necessary, for example by pm (and I shall answer in this thread with an answer if I have one.)
Changes to the Interface
I use mordred's Login screen (http://modcraft.io/viewtopic.php?f=20&t=1652), so I base it on this. However, the procedure shouldn't be different. Edited interface files require the GlueXML Check Removed from the WoW.exe (http://modcraft.io/viewtopic.php?f=59&t=883). Mordred provides such file already, however, if you need to do it based off blizzard's actual interface, you can still do it yourself.
- - InterfaceGlueXMLCharacterCreate.lua - -
Goto and alter to:
MAX_CLASSES_PER_RACE = [|]11[|]; -- 10 blizzard classes + our custom class
- This is the failcheck of the client. If this is not changed, you are going to get errors on the run and it'll never work. Just do this and you are fine.
Goto and alter to:
CLASS_ICON_TCOORDS = {
["WARRIOR"] = {0, 0.25, 0, 0.25},
[|]["HERO"] = {0, 0.25, 0, 0.25}, -- Basically copied the icon from the Warrior class[|]
-- ["EXPLAINATIONHELP"] = {widtha, widthb, heighta, heightb}, -- This is just to help explaining in the next passage.
};
- Just like the failcheck, you need to add this to prevent errors. The values define what part of the InterfaceGLUEScharactercreateUI-CharacterCreate-classes.blp is called for. If you look at the file and compare it to the values given in TCOORDS, you can quickly see how this works; basically, the picture is given in a whole. Each side is defined as "1" and you give instructions to the engine to call a certain part (from width value a to width value b and from height value a to height value b) from the picture. As if you instruct someone to go a road from point a to point b, and another guy from point a to point b. This defines the regular square and the round picture. Make sure to note the value down, because you have to use it again soon.
- Similar to UI-CharacterCreate-Classes.blp, you have to edit InterfaceTargetingFrameUi-Classes-Circles.blp. You have to place it on the same (relative) spot you had on the UI-CreatureCreate-classes.blp, so it can extract the circle icon from the same "relative" position.
- - InterfaceGlueXMLCharacterCreate.xml - -
Search for: <Anchor point="TOP" relativeTo="CharacterCreateClassButton5" relativePoint="BOTTOM" x="0" y="-6"/>
</Anchors>
</CheckButton>
add after:
<CheckButton name="CharacterCreateClassButton11" inherits="CharacterCreateClassButtonTemplate" id="11">
<Anchors>
<Anchor point="LEFT" relativeTo="CharacterCreateClassButton10" relativePoint="RIGHT" x="6" y="0"/>
</Anchors>
</CheckButton>
- Basically, this adds the class icon to the character creation. It gives an error if you forget this, so make sure to add it. However, you can have it idle if you only set 10 max classes, as this one wouldn't be called. Never the less, note how I changed the name, id and the relativeTo="" reference. This is so that the interface is calling the next class, not one of the previous ones. If some of these values are identical to the previous ones, it results in an error. Simply copy this and try around if you want to learn more - you'll quickly get the hang of it.
There can be changed more in this file, for example "CharacterCreateClassButton1" to change the whole position (makes it look more clean). However, it can also mess the whole layout up; test around to find what suits your interests the best.
- - InterfaceGlueXMLGlueStrings.lua- -
Search for: "CLASS_DRUID_FEMALE"
Copy and paste the values "CLASS_WARRIOR" and "CLASS_WARRIOR_FEMALE" as a whole (CLASS_WARRIOR = "[some string];" and CLASS_WARRIOR_FEMALE = "[some string];",
place it after "CLASS_DRUID_FEMALE" and rename it to "CLASS_HERO" and "CLASS_HERO_FEMALE".
You should have this structure now:
CLASS_DRUID = "Druid_Male text";
CLASS_DRUID_FEMALE = "Druid_Female text";
CLASS_HERO = "Warrior_Male text";
CLASS_HERO_FEMALE = "Warrior_Female text";
CLASS_HUNTER = "Hunter_Male text";
CLASS_HUNTER_FEMALE = "Hunter_Female text";
[... Some classes and their description texts ...]
CLASS_WARRIOR = "Warrior_Male text";
CLASS_WARRIOR_FEMALE = "Warrior_Female text";
Of course, you can set your own description texts here, but it makes things a lot easier. This is for a description each class has in the character creation.
Repeat this procedure for CLASS_INFO_HERO0 - CLASS_INFO_HERO4 (these are the description points under the class box) in the same way. You should know have 2 additional CLASS_* and 5 (or more/less) CLASS_INFO_* strings for the character creation.
Next, look for:
HELP = "Help";
HERTZ = "Hz";
Replace it with:
HELP = "Help";
HERO_DISABLED = "HeronYou must choose a different race to be this class.";
HERTZ = "Hz";
Basically, if there is a race which should not use the new class, it displays this message instead of a blank tooltip.
- - InterfaceFrameXMLConstants.lua- -
Goto and alter to
RAID_CLASS_COLORS = {
[...]
[|]["HERO"] = { r = 0.78, g = 0.61, b = 0.43 },[|]
["WARRIOR"] = { r = 0.78, g = 0.61, b = 0.43 },
["DEATHKNIGHT"] = { r = 0.77, g = 0.12 , b = 0.23 },
};
This is, so there is a value given for the guild and who-lists. This is necessary for things to not bug out ingame. Here you can set an actual color for the class, so you can have a shiny class color in the who and guild-list.
Goto and alter to
CLASS_SORT_ORDER = {
[...]
"HUNTER",
"HERO",
};
Same for above. Required to not make it bug out.
Goto and alter to
CLASS_ICON_TCOORDS = {
["WARRIOR"] = {0, 0.25, 0, 0.25},
[|]["HERO"] = {0, 0.25, 0, 0.25},[|]
[...]
};
I guess I do not need to explain anything in this part either. The same thing we did to the charactercreate.lua for the icons, we do here now. Make sure to copy the same values.
Changes to the DBC
- - ChrClasses.dbc - -
First, it's structure: (http://pxr.dk/wowdev/wiki/index.php?title=ChrClasses.dbc)
- [0] ID
- Obviously, the id you set in all the previous changes.
- [1] Unknown (?)
- [2] Resources
- This defines what type of resources the class uses; 0 = Mana, 1 = Rage, 2 = Focus, 3 = Energy, 4 = Happiness, 5 = Unknown, 6 = Runes
- [3] Pet Type
- Set to 1 for "PET" or 101 for "DEMON"
- [4 - 54] Name and gender-specific names
- Localizated names, for example you can set a different name for male than for female classes
- [55] FILENAME
- Do you recognize this ? Basically, this is the value we've been given the core all the time. The capitalized, fully English string is used by the lua (e.g. ["CLASS"], "CLASS_INFO_") or by the core (e.g. CLASS_NAME = ID) to put this into sync. Make sure you do this cleanly.
- [56] Spell Class Set
- Remember the entry into spell family ? This is the value you added there. Also used for the spell.dbc
- [57] flags (http://pxr.dk/wowdev/wiki/index.php?title=ChrClasses.dbc#flags)
- A list of flags apart from given/set values. Can be found in the linking.
- [58] Camera (race intro)
- Everyone beside Deathknight is set to 0, meaning that they use default camera settings bound to their races. Deathknights use "non-default" ones (they have a fixed camera for all the deathknights, no matter the race), so they have a set value.
- [59] Expansion
- If you do not have the required expansion, this is not going to work.
Basically, we add an entry into this copying the warrior, change the name [1], the localization depending on your language [4 - 54], the Filename [55], the Spell Class Set [56] and maybe flags [57]. Again, customize as you want.
-
Is there more to come? Do you need help with anything? As i´m too stupid to compile trinity i could "only" do research, dbc and some basic coding (only programming language i somehow handle is java) but it´s better than nothing.
-
I'll finish it over my break in a week. Was just too lazy to do it until now.
-
I'll finish it over my break in a week. Was just too lazy to do it until now.
okay ^^
-
that was awsome , if you make one for mangos i try to help you
-
Moved this to Serverside Modding.
May or may not note what else has to be done at some point.
-
I followed your guide exactly but my new class doesn't appear on the creation screen. I edited the blp to include my class' icon.
(http://i.imgur.com/8o2f313.jpg)
Here's what my mpq file looks like.
(http://i.imgur.com/uirVyeR.png)
-
Make sure you add the approperiate values into the xml and import it into interface.
-
Make sure you add the approperiate values into the xml and import it into interface.
I used the values that are in this guide. What lines in xml need to be changed?
Here's what I have in XML.
<CheckButton name="CharacterCreateClassButton10" inherits="CharacterCreateClassButtonTemplate" id="10">
<Anchors>
<Anchor point="TOP" relativeTo="CharacterCreateClassButton5" relativePoint="BOTTOM" x="0" y="-6"/>
</Anchors>
</CheckButton>
<CheckButton name="CharacterCreateClassButton11" inherits="CharacterCreateClassButtonTemplate" id="11">
<Anchors>
<Anchor point="TOP" relativeTo="CharacterCreateClassButton6" relativePoint="BOTTOM" x="0" y="-6"/>
</Anchors>
</CheckButton>
-
Make sure you add the approperiate values into the xml and import it into interface.
I used the values that are in this guide. What lines in xml need to be changed?
Here's what I have in XML.
<CheckButton name="CharacterCreateClassButton10" inherits="CharacterCreateClassButtonTemplate" id="10">
<Anchors>
<Anchor point="TOP" relativeTo="CharacterCreateClassButton5" relativePoint="BOTTOM" x="0" y="-6"/>
</Anchors>
</CheckButton>
<CheckButton name="CharacterCreateClassButton11" inherits="CharacterCreateClassButtonTemplate" id="11">
<Anchors>
<Anchor point="TOP" relativeTo="CharacterCreateClassButton6" relativePoint="BOTTOM" x="0" y="-6"/>
</Anchors>
</CheckButton>
the .lua file also ? Try a different icon, else.
-
Make sure you add the approperiate values into the xml and import it into interface.
I used the values that are in this guide. What lines in xml need to be changed?
Here's what I have in XML.
<CheckButton name="CharacterCreateClassButton10" inherits="CharacterCreateClassButtonTemplate" id="10">
<Anchors>
<Anchor point="TOP" relativeTo="CharacterCreateClassButton5" relativePoint="BOTTOM" x="0" y="-6"/>
</Anchors>
</CheckButton>
<CheckButton name="CharacterCreateClassButton11" inherits="CharacterCreateClassButtonTemplate" id="11">
<Anchors>
<Anchor point="TOP" relativeTo="CharacterCreateClassButton6" relativePoint="BOTTOM" x="0" y="-6"/>
</Anchors>
</CheckButton>
the .lua file also ? Try a different icon, else.
I changed in the lua what the guide said to change. The only image I changed was UI_CHARACTERCREATE-CLASSES.blp do I need to add in my actual single class icon?
If you're wondering this is what my UI_CHARACTERCREATECLASSES.blp image looks like.
(http://i.imgur.com/Q0P8Pj3.png)
-
InterfaceGluesXML
should be
InterfaceGlueXML
-
And you need interface fixed wow exe....
-
InterfaceGluesXML
should be
InterfaceGlueXML
I went ahead and fixed it and nothing changed.
And you need interface fixed wow exe....
What do you mean by that? Is that removing the glues check from WoW.exe? I used this (http://modcraft.io/viewtopic.php?f=59&t=883&hilit=gluexml) to remove it. Still nothing.
-
I went ahead and fixed it and nothing changed.
Make sure you don't have an unedited CharacterCreate.xml loading from your WowInterfaceGlueXML folder (if you have one). That's a silly snag I ran into before.
Failing that, make some easily recognizable change to the class icons blp or the xml file to make sure that the files are being loaded at all. (for example, draw anatomy on the blizzard class icons, or remove the spacing between icons in the xml by setting the x offset to 0 instead of the default 6 for each button).
-
I went ahead and fixed it and nothing changed.
Make sure you don't have an unedited CharacterCreate.xml loading from your WowInterfaceGlueXML folder (if you have one). That's a silly snag I ran into before.
Failing that, make some easily recognizable change to the class icons blp or the xml file to make sure that the files are being loaded at all. (for example, draw anatomy on the blizzard class icons, or remove the spacing between icons in the xml by setting the x offset to 0 instead of the default 6 for each button).
So do I need to put my lua and xml files back into my original WoW patches? I only have them in a new mpq patch atm.
-
So do I need to put my lua and xml files back into my original WoW patches? I only have them in a new mpq patch atm.
No, that's never something you should do (probably). I meant inside the actual WoW game folder, not in an archive. As for checking whether the MPQ is getting loaded, I may have jumped the gun a little with my advice. It seems the guide has you create a THIRD row of class icons, and I'm not sure how this interacts with the interface so I'll actually try to follow the guide and give an update in a moment.
-
Update:
All you need for the icon to show up on the char creation screen is:
-an entry in ChrClasses.DBC
-incremented MAX_CLASSES_PER_RACE and a CLASS_ICON_TCOORDS entry in CharacterCreate.lua
-a new button defined in CharacterCreate.xml
All as per the guide.
Make sure the CLASS_ICON_TCOORDS entry matches the all-caps name defined in ChrClasses.DBC (column 55 or 56, depending on whether columns start counting at 0 or 1). And make sure the MPQ isn't open in an MPQ editor when you launch the game.
You should get something like this (I used the DK icon coords for ease):
https://i.imgur.com/kRuZz3z.jpg
As you can see, there's some interface overlap because the button's position is set to below the first button of the second row, in the XML file. You can figure out where you want the button to be (and where to move other UI elements) at your leisure, or you can follow the ArcEmu guide from before regarding the button's position for an easy fix.
-
Update:
All you need for the icon to show up on the char creation screen is:
-an entry in ChrClasses.DBC
-incremented MAX_CLASSES_PER_RACE and a CLASS_ICON_TCOORDS entry in CharacterCreate.lua
-a new button defined in CharacterCreate.xml
All as per the guide.
Make sure the CLASS_ICON_TCOORDS entry matches the all-caps name defined in ChrClasses.DBC (column 55 or 56, depending on whether columns start counting at 0 or 1). And make sure the MPQ isn't open in an MPQ editor when you launch the game.
You should get something like this (I used the DK icon coords for ease):
https://i.imgur.com/kRuZz3z.jpg
As you can see, there's some interface overlap because the button's position is set to below the first button of the second row, in the XML file. You can figure out where you want the button to be (and where to move other UI elements) at your leisure, or you can follow the ArcEmu guide from before regarding the button's position for an easy fix.
My XML
<CheckButton name="CharacterCreateClassButton11" inherits="CharacterCreateClassButtonTemplate" id="11">
<Anchors>
<Anchor point="TOP" relativeTo="CharacterCreateClassButton6" relativePoint="BOTTOM" x="0" y="-6"/>
</Anchors>
</CheckButton>
My tcoords
CLASS_ICON_TCOORDS = {
["WARRIOR"] = {0, 0.25, 0, 0.25},
["CAVALIER"] = {0.5, 0.75, 0.5, 0.75},
["MAGE"] = {0.25, 0.49609375, 0, 0.25},
["ROGUE"] = {0.49609375, 0.7421875, 0, 0.25},
["DRUID"] = {0.7421875, 0.98828125, 0, 0.25},
["HUNTER"] = {0, 0.25, 0.25, 0.5},
["SHAMAN"] = {0.25, 0.49609375, 0.25, 0.5},
["PRIEST"] = {0.49609375, 0.7421875, 0.25, 0.5},
["WARLOCK"] = {0.7421875, 0.98828125, 0.25, 0.5},
["PALADIN"] = {0, 0.25, 0.5, 0.75},
["DEATHKNIGHT"] = {0.25, 0.49609375, 0.5, 0.75},
};
My max_classes_per_race line
MAX_CLASSES_PER_RACE = 11;
Did everything you said and it still isn't showing up. I feel like something is wrong with my wow.exe even though I used the program to remove the gluexml check. Do you think you could upload your WoW folder and I can use that instead?
So do I need to put my lua and xml files back into my original WoW patches? I only have them in a new mpq patch atm.
No, that's never something you should do (probably). I meant inside the actual WoW game folder, not in an archive. As for checking whether the MPQ is getting loaded, I may have jumped the gun a little with my advice. It seems the guide has you create a THIRD row of class icons, and I'm not sure how this interacts with the interface so I'll actually try to follow the guide and give an update in a moment.
So to clarify, I should put my new lua and XML files in a new patch? Which I have done. I just want clarification.
-
I checked in with kobiesan by skype. Turned out that the patch had the wrong name. However, it gave me a few pointers to add to this tutorial:
Added note about *_disabled into gluestrings.lua
Added note about circle-class.blp
Changed Icon Placement Code a bit so it works now.
-
If I make a human with my new class the human starts with no languages not even common even though I have all Alliance races set to learn common in playercreateinfo_skills. It works on other human classes though. Same goes for other races and their respective languages.
-
If I make a human with my new class the human starts with no languages not even common even though I have all Alliance races set to learn common in playercreateinfo_skills. It works on other human classes though. Same goes for other races and their respective languages.
Yes, that is skilllineinfo.
Have not dived into those yet in the tutorial.
-
Can u pass me your skype please? i did all the instructions but i'm getting a lot errors in compilation :(
-
Can u pass me your skype please? i did all the instructions but i'm getting a lot errors in compilation :(
Just tell us what you exactly did and which errors do you get. Why help everyone one by one when other people could also use the same informations to fix their mistakes?
-
Can u pass me your skype please? i did all the instructions but i'm getting a lot errors in compilation :(
Just tell us what you exactly did and which errors do you get. Why help everyone one by one when other people could also use the same informations to fix their mistakes?
Hey thank u for the awnser, Okay i got this errors when i tried compile : http://imgur.com/a/ZC2VW (http://imgur.com/a/ZC2VW" onclick="window.open(this.href);return false;)
And i got like 100 errors when i changed the cs_misc.cpp, i removed the change and i'll try run the custom class without this file editted, I didn't touched Achiev.cpp/Dbcstore.cpp and Condition.cpp but i still gotting this errors on compilation :(
-
Can u pass me your skype please? i did all the instructions but i'm getting a lot errors in compilation :(
Just tell us what you exactly did and which errors do you get. Why help everyone one by one when other people could also use the same informations to fix their mistakes?
Hey thank u for the awnser, Okay i got this errors when i tried compile : http://imgur.com/a/ZC2VW (http://imgur.com/a/ZC2VW" onclick="window.open(this.href);return false;)
And i got like 100 errors when i changed the cs_misc.cpp, i removed the change and i'll try run the custom class without this file editted, I didn't touched Achiev.cpp/Dbcstore.cpp and Condition.cpp but i still gotting this errors on compilation :(
Several ) and ; are missing, no idea how you deleted them, but you need to add them again.
-
I didn't touched this files, i changed the files using files on fresh compiled and i still have this errors :(