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: Discourse: Creating a custom Class in Trinity Core  (Read 9664 times)

Ascathos

  • Moderators
  • Creator of Worlds
  • *****
  • Posts: 1129
    • View Profile
Discourse: Creating a custom Class in Trinity Core
« 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", "XxXGenesisXxX", "Khira", "stoneharry" 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:

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)
« Last Edit: January 01, 1970, 01:00:00 am by Admin »

Ascathos

  • Moderators
  • Creator of Worlds
  • *****
  • Posts: 1129
    • View Profile
2. Create your own class and get it work
« Reply #1 on: January 09, 2013, 08:29:33 pm »
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.
    • 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 - -



    Code: [Select]
    // 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[|]
    };

    Code: [Select]
    // max+1 for player class
    #define MAX_CLASSES       [|]13[|]

    Code: [Select]
    #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)))[|]

       
    Code: [Select]
    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"

    Code: [Select]
       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:

    Code: [Select]
       {
            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:

    Quote
    Code: [Select]
    info->stats[STAT_STRENGTH]  += (lvl > 23 ? 2: (lvl > 1  ? 1: 0));can be written as
    Code: [Select]
    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
    Code: [Select]
    info->stats[STAT_AGILITY]   += (lvl > 36 ? 1: (lvl > 6 && (lvl%2) ? 1: 0));to
    Code: [Select]
    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!

    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:
           
    Code: [Select]
    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:
    Code: [Select]
    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]"
    Code: [Select]
       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:

    Code: [Select]
           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:
    Code: [Select]
               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, 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. 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:
    Code: [Select]
    <Anchor point="TOP" relativeTo="CharacterCreateClassButton5" relativePoint="BOTTOM" x="0" y="-6"/>
    </Anchors>
    </CheckButton>

    add after:
    Code: [Select]
          <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:

    Code: [Select]
    HELP = "Help";
    HERTZ = "Hz";

    Replace it with:

    Code: [Select]
    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
    Code: [Select]
    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
    Code: [Select]
    CLASS_SORT_ORDER = {
    [...]
    "HUNTER",
    "HERO",
    };

    Same for above. Required to not make it bug out.

    Goto and alter to
    Code: [Select]
    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:
    • [0] ID
      • Obviously, the id you set in all the previous changes.
    • [1] Unknown (?)
      • This is not known yet
    • [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
      • 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.
    « Last Edit: January 01, 1970, 01:00:00 am by Admin »

    Shruik

    • Contributors
    • Wiki Incarnate
    • *****
    • Posts: 121
      • View Profile
    Re: Discourse: Creating a custom Class in Trinity Core
    « Reply #2 on: March 17, 2013, 12:49:47 am »
    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.
    « Last Edit: January 01, 1970, 01:00:00 am by Admin »
    "If you don´t like modelchanging, you don´t know the fascination of it"

    Ascathos

    • Moderators
    • Creator of Worlds
    • *****
    • Posts: 1129
      • View Profile
    Re: Discourse: Creating a custom Class in Trinity Core
    « Reply #3 on: March 17, 2013, 02:42:27 pm »
    I'll finish it over my break in a week. Was just too lazy to do it until now.
    « Last Edit: January 01, 1970, 01:00:00 am by Admin »

    Shruik

    • Contributors
    • Wiki Incarnate
    • *****
    • Posts: 121
      • View Profile
    Re: Discourse: Creating a custom Class in Trinity Core
    « Reply #4 on: March 17, 2013, 02:50:59 pm »
    Quote from: "Ascathos"
    I'll finish it over my break in a week. Was just too lazy to do it until now.
    okay ^^
    « Last Edit: January 01, 1970, 01:00:00 am by Admin »
    "If you don´t like modelchanging, you don´t know the fascination of it"

    detonatorss

    • Registred Member
    • Model Change Addict
    • *****
    • Posts: 233
      • View Profile
    Re: Discourse: Creating a custom Class in Trinity Core
    « Reply #5 on: March 18, 2013, 12:22:41 pm »
    that was awsome , if you make one for mangos i try to help you
    « Last Edit: January 01, 1970, 01:00:00 am by Admin »
    Desktop


    Laptop

    Ascathos

    • Moderators
    • Creator of Worlds
    • *****
    • Posts: 1129
      • View Profile
    Re: Discourse: Creating a custom Class in Trinity Core
    « Reply #6 on: May 27, 2016, 01:21:25 am »
    Moved this to Serverside Modding.

    May or may not note what else has to be done at some point.
    « Last Edit: January 01, 1970, 01:00:00 am by Admin »

    Kobiesan

    • Registred Member
    • Wiki Incarnate
    • *****
    • Posts: 161
      • View Profile
    Re: Discourse: Creating a custom Class in Trinity Core
    « Reply #7 on: May 29, 2016, 12:21:17 am »
    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.




    Here's what my mpq file looks like.

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

    Ascathos

    • Moderators
    • Creator of Worlds
    • *****
    • Posts: 1129
      • View Profile
    Re: Discourse: Creating a custom Class in Trinity Core
    « Reply #8 on: May 29, 2016, 12:38:43 am »
    Make sure you add the approperiate values into the xml and import it into interface.
    « Last Edit: January 01, 1970, 01:00:00 am by Admin »

    Kobiesan

    • Registred Member
    • Wiki Incarnate
    • *****
    • Posts: 161
      • View Profile
    Re: Discourse: Creating a custom Class in Trinity Core
    « Reply #9 on: May 29, 2016, 01:44:36 am »
    Quote from: "Ascathos"
    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.

    Code: [Select]
    <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>
    « Last Edit: January 01, 1970, 01:00:00 am by Admin »

    Ascathos

    • Moderators
    • Creator of Worlds
    • *****
    • Posts: 1129
      • View Profile
    Re: Discourse: Creating a custom Class in Trinity Core
    « Reply #10 on: May 29, 2016, 02:38:46 am »
    Quote from: "Kobiesan"
    Quote from: "Ascathos"
    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.

    Code: [Select]
    <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.
    « Last Edit: January 01, 1970, 01:00:00 am by Admin »

    Kobiesan

    • Registred Member
    • Wiki Incarnate
    • *****
    • Posts: 161
      • View Profile
    Re: Discourse: Creating a custom Class in Trinity Core
    « Reply #11 on: May 29, 2016, 02:47:41 am »
    Quote from: "Ascathos"
    Quote from: "Kobiesan"
    Quote from: "Ascathos"
    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.

    Code: [Select]
    <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.
    « Last Edit: January 01, 1970, 01:00:00 am by Admin »

    Grymskvll

    • Registred Member
    • Polygonshifter
    • *****
    • Posts: 65
      • View Profile
    Re: Discourse: Creating a custom Class in Trinity Core
    « Reply #12 on: May 29, 2016, 12:01:07 pm »
    Quote from: "Kobiesan"

    InterfaceGluesXML
    should be
    InterfaceGlueXML
    « Last Edit: January 01, 1970, 01:00:00 am by Admin »

    Steff

    • Administrator
    • Creator of Worlds
    • *****
    • Posts: 4551
      • View Profile
    Re: Discourse: Creating a custom Class in Trinity Core
    « Reply #13 on: May 29, 2016, 06:15:51 pm »
    And you need interface fixed wow exe....
    « Last Edit: January 01, 1970, 01:00:00 am by Admin »
    Please mark as solved if solved.
    Don't ask if you could ask a question... JUST ask the Question.
    You can send me also offline messages. I will answer if I get online.
    Skype: project.modcraft
    Discord: steff#6954

    Kobiesan

    • Registred Member
    • Wiki Incarnate
    • *****
    • Posts: 161
      • View Profile
    Re: Discourse: Creating a custom Class in Trinity Core
    « Reply #14 on: May 29, 2016, 07:35:14 pm »
    Quote from: "Grymskvll"
    Quote from: "Kobiesan"

    InterfaceGluesXML
    should be
    InterfaceGlueXML

    I went ahead and fixed it and nothing changed.


    Quote from: "Steff"
    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 to remove it. Still nothing.
    « Last Edit: January 01, 1970, 01:00:00 am by Admin »