Forum > Tutorials

[TUTORIAL] Creating a shell of a class!

(1/17) > >>

XxXGenesisXxX:
By XxXGenesisXxX

Introduction
Firstly this is not gonna be a noob friendly guide. It will still be fairly easy to understand for the most part, but going further into every detail will take far too long with far too many images. I'm sorry if this impedes anyone, but if you need any help or have questions feel free to reply on here or inbox me and I'll do my best to help you out.

However keep in mind; this is a guide not a walk-through. Creating a custom class from scratch has so many variables it is impossible to cater to every aspect and angle. So in this guide (especially the C++ section) it will be heavily based on a magic using Necromancer class. When it comes to the C++ area, to branch out further than what I have done, you are going to need to know how to figure things out yourself within the core. Others can help, but if you can't figure things out on your own as well, you are going to have a never ending supply of questions.

What do I mean by a basic shell?
Well basically I won't be writing how to add skills, spells, talents, starting locations etc. This may seems bland or lacking but you will have a fully functioning class by the end of this guide. And the things I just mentioned (adding spells/skills etc...) will be no different to adding it to an existing class after this guide.

Few Notes

* In this guide I am gonna be using the term "For Simplicities Sake" a bit. So instead I'm just gonna use the abbreviation FSS.
* I have been awake for over 24 hours while being out all day. So pretty buggered while writing this xD
* Always back up anything before you edit it. Even simple edits. One thing wrong can be very frustrating to fix.
* Always save your work before closing. Obvious but easily forgotten.
* This was done in ArcEmu, you will have to adapt yourself for other cores, however good luck unless you really know what you're doing xD
* Their is a huge client side bug, that from what I have read in questions on forums (nor have I found an answer to) is a bug that when you open up your character pane. If your stats are shown it will crash WoW. So I'll be posting a macro at the end of this guide you can use on your characters to stop them showing stats while still being able to access equipment screen. If anyone knows how to fix this or even an idea on how to fix please let me know.
Step 1. DBCs
If you've done it before, you'll notice these steps are a lot like creating your own race. So having done that previously is probably going to make this part a lot easier.

First off you need to open up your "ChrClasses.dbc" and clone one of the rows. FSS I suggest copying one that has the closest similarities to your new class. For me? I'll be making a Necromancer and the way I'm designing it, it will be closest to a Mage. Yes a Mage, not a Warlock.

ChrClasses.dbc
For reference: http://www.pxr.dk/wowdev/wiki/index.php?title=ChrClasses.dbc
The columns:

* 0: This is our Class ID, we'll need to change this to the next number up, so in my case 12.
* 1: Leave this.
* 2: This is our powertype our class will use. 0 = Mana, 1 = Rage, 2 = Focus, 3 = Energy, 4 = Happiness, 6 = Runes. FSS, I suggest using either, mana, rage or energy. I won't be covering into detail in this guide a bot them. I'll be using 0 for mana.
* 3: This is our pet type, if you want to summon demons like warlock you CAN choose to set it as demon, but honestly, you can make demon like creatures with it set as pet. So again, FSS just go with pet.
* 4: The name of our class, for this we need to go down to Strings on the left hand tab and add a new string. This is the displayed one, so use correct punctuation in this, it isn't code dependent. I'll be naming my string "Necromancer". Once you've added it you'll get it down the bottom with a number next to it. Go back to column 4 in the Table section and type in that number.
* 5 - 54: :Leave them alone.
* 55: This is our code dependent name. This is what is gonna be called upon a lot. We need to make a new string. Only this time, it needs to all be in capitals. Also if you have a space in your class name like "Death Knight", you'll need to ignore the space and just type "DEATHKNIGHT". So just do the same as you did for column 4, but capitals and no spaces. So for me; "NECROMANCER".
* 56: FSS leave this alone or just copy the one closest to your class.
* 57: I'm not 100% sure on this one, too many inconsistencies, if you feel like experimenting try some different ones out, otherwise stick to the closest to your class.
* 58: Leave this.
* 59: This is for different expansions. 0 = Classic, 1 = TBC, 2 = WotLK.
Now you can save and close "ChrClasses.dbc".

CharBaseInfo.dbc
Next we need to open up "CharBaseInfo.dbc". This one is very simple. All we need to do is clone as many rows as race/class combinations as needed. For me, I am only gonna have a Human Necromancer and an Undead Necromancer. So I need to clone 2.

For reference: http://www.pxr.dk/wowdev/wiki/index.php?title=CharBaseInfo.dbc
The columns:

* 0: Race ID. So for me I want 1 (Human) for my first cloned ID and 5 (Undead) for my other.
* 1: Class ID. All of these should be your new classes ID. Mine was 12, so I need to put in 12 for all of it.Easy. You can save and close "CharBaseInfo.dbc" now.

TalentTab.dbc
Open up "TalentTab.dbc"

Clone 3 times.

For reference:  http://www.pxr.dk/wowdev/wiki/index.php?title=TalentTab.dbc
The columns:

* 0: These are the ID's. FSS change these to 450, 451 and 452.
* 1: The names of your talent trees. I'll be using the old school Diablo 2 Necromancer trees. Curses, Poison and Bones, Summoning. you are going to have to make new name strings for each of these again.
* 2-17: Leave them alone.
* 18: This is your spell icon ID. I'm just gonna be using the ones I copy for now (warlock ones). If you want to get specific ones, go onto WoWhead, pick a spell with the icon you want. Go into "Spell.dbc". In the first column find the ID of the spell you were looking at, then go across to column 133 and that's your icon ID.
* 19: Set all to 2047.
* 20: This is classes, however it's in bits not the standard ID. If your class was ID number 12, than you will need to type in 2048 for each of them.
* 21: Leave as 0.
* 22: This is the orderindex. Which ever you want to be first in the list of the 3 talent tree tabs is set to 0, then the middle is set to 1, the the last is set to 2.
* 23: This is the background image. I'm just leaving mine as default copied one. If you can find the file path, go ahead and make your own, if not just use one you like the background of. You can type your own path in without an image file being present, your will just get the basic background with the color like a quest background.
Once that's done, save and close.

After all that, you are free to pack your MPQ archive.

Step 2. Character Create Screen
Again this is practically the same steps as creating a new race.
Time for client side xml/lua editing. You'll need to use this first in order to remove xml/lua checks from your "wow.exe".
http://modcraft.io/viewtopic.php?f=59&t=883

However for those who have done this before I will move onto the files.

In our InterfaceGlueXML folder, we need to open up:

GlueStrings.lua
In this file we need to hit ctrl+f and search for this


--- Code: ---CLASS_INFO_WARRIOR4 = "- Uses rage as a resource.";
--- End code ---

Now underneath the we need to add these lines (replacing NECROMANCER with your class name in capitals. Then change each description)


--- Code: ---CLASS_INFO_NECROMANCER0 = "- Role: Damage";
CLASS_INFO_NECROMANCER1 = "- Light Armor (Cloth)";
CLASS_INFO_NECROMANCER2 = "- Can call forth skeletons of different combat abilities.";
CLASS_INFO_NECROMANCER3 = "- Can afflict curses to weaken opponents.";
CLASS_INFO_NECROMANCER4 = "- Uses mana as a resource.";
--- End code ---

Now it should look like this


--- Code: ---CLASS_INFO_WARRIOR0 = "- Role: Tank, Damage";
CLASS_INFO_WARRIOR1 = "- Heavy Armor (Mail / Plate and Shield)";
CLASS_INFO_WARRIOR2 = "- Deals damage with melee weapons.";
CLASS_INFO_WARRIOR3 = "- Has 3 fighting stances with different benefits.";
CLASS_INFO_WARRIOR4 = "- Uses rage as a resource.";
CLASS_INFO_NECROMANCER0 = "- Role: Damage";
CLASS_INFO_NECROMANCER1 = "- Light Armor (Cloth)";
CLASS_INFO_NECROMANCER2 = "- Can call forth skeletons of different combat abilites.";
CLASS_INFO_NECROMANCER3 = "- Can afflict curses to weaken opponents.";
CLASS_INFO_NECROMANCER4 = "- Uses mana as a resource.";
--- End code ---

^^^ This is the dot point description you get in the right hand pane in character create screen.

Now hit ctrl+f again and search for


--- Code: ---tanking warriors desire Stamina as well.";
--- End code ---

Now just below that we'll be adding this (again replacing and adjusting to your own class name and descriptions)


--- Code: ---CLASS_NECROMANCER = "Necromancers are powerful spell casters thought upon by many to be of great evil. These thoughts come from the belief that summoning the dead to fight under controllers will, is a heinously unnatural disrespect towards the dead.";
CLASS_NECROMANCER_FEMALE = "Necromancers are powerful spell casters thought upon by many to be of great evil. These thoughts come from the belief that summoning the dead to fight under controllers will, is a heinously unnatural disrespect towards the dead.";
--- End code ---

So now it should look like this


--- Code: ---CLASS_WARRIOR = "Warriors are plate-wearing fighters who strive for perfection in armed combat. As warriors deal or take damage, they generate rage, which is used to power their special attacks.|n|nWarriors can choose to focus on a two-handed weapon, dual-wielding or using a sword and shield. Warriors have several abilities that let them move quickly around the battlefield. Their primary stat is Strength, though tanking warriors desire Stamina as well.";
CLASS_WARRIOR_FEMALE = "Warriors are plate-wearing fighters who strive for perfection in armed combat. As warriors deal or take damage, they generate rage, which is used to power their special attacks.|n|nWarriors can choose to focus on a two-handed weapon, dual-wielding or using a sword and shield. Warriors have several abilities that let them move quickly around the battlefield. Their primary stat is Strength, though tanking warriors desire Stamina as well.";
CLASS_NECROMANCER = "Necromancers are powerful spell casters thought upon by many to be of great evil. These thoughts come from the belief that summoning the dead to fight under controllers will, is a heinously unnatural disrespect towards the dead.";
CLASS_NECROMANCER_FEMALE = "Necromancers are powerful spell casters thought upon by many to be of great evil. These thoughts come from the belief that summoning the dead to fight under controllers will, is a heinously unnatural disrespect towards the dead.";
--- End code ---

^^^ This is the full class description in the right hand character create pane.

Now we can save and close "GlueStrings.lua".

CharacterCreate.lua
Next up we have "CharacterCreate.lua". But before we edit this file we are gonna want to add our class icon to the images. Otherwise we are gonna be looking at a blank image.

So open up your MPQ editor, I'll be using MyWarCraftStudio. Now open up "locale-enUS.MPQ".
Then go to; Interface -> GLUES -> CHARACTERCREATE -> "UI-CHARACTERCREATE-CLASSES.BLP". And now extract this to your desktop.

Ok, so now we need to convert it from a ".blp" to a ".png". To do this we'll be using BLP converter made by PatrickCyr.
http://modcraft.io/viewtopic.php?f=59&t=801

To convert it, all we need to do is simply drag and drop our ".blp" image onto the "BLPConverter.exe" and wait. Shouldn't take long at all. Tada a PNG file!

Now to edit the PNG. Open the image up into your favorite image editor. I'm gonna be awesomely unique and very rare to find........... Adobe Photoshop....... :O

When you open it you'll see exactly how it fits in. All you need to do is copy one of the current ones (for the frame), move it next to DK icon and under the priest icon, then place a new image inside the frame. This will be your class icon. Here's mine if you are too lazy to do it...


Once you've created it, delete your old .blp from the desktop and drop your new png onto the "BLPConverter.exe". Now we need to add this one back to where we found it. So open up your MPQ file again, go to the same path, Interface -> GLUES -> CHARACTERCREATE -> "UI-CHARACTERCREATE-CLASSES.BLP". Only this time delete the current "UI-CHARACTERCREATE-CLASSES.BLP". Now right click on the CHARACTERCREATE folder and choose import. Now import your new "UI-CHARACTER-CLASSES.BLP". Pack your MPQ again and save and close.

Time to go back to the "CharacterCreate.lua", time to edit it.

At the very top change

--- Code: ---MAX_CLASSES_PER_RACE = 10;
--- End code ---
to

--- Code: ---MAX_CLASSES_PER_RACE = 11;
--- End code ---

Again in "CharacterCreate.lua" hit ctrl+f (or just scroll down) and search for


--- Code: ---["DEATHKNIGHT"] = {0.25, 0.49609375, 0.5, 0.75},
--- End code ---
Now underneath that we are going to need to put

--- Code: ---["NECROMANCER"] = {0.49609375, 0.7421875, 0.5, 0.75},
--- End code ---

^^^ This is the co-ords it searches for on the BLP image we made to show that section.

Save and Close "CharacterCreate.lua".

CharacterCreate.xml
Open up "CharacterCreate.xml".

Search for

--- Code: ---<CheckButton name="CharacterCreateClassButton10" inherits="CharacterCreateClassButtonTemplate" id="10">
<Anchors>
<Anchor point="TOP" relativeTo="CharacterCreateClassButton5" relativePoint="BOTTOM" x="0" y="-6"/>
</Anchors>
</CheckButton>
--- End code ---
Then add after it:

--- Code: ---<CheckButton name="CharacterCreateClassButton11" inherits="CharacterCreateClassButtonTemplate" id="11">
<Anchors>
<Anchor point="LEFT" relativeTo="CharacterCreateClassButton5" relativePoint="RIGHT" x="6" y="0"/>
</Anchors>
</CheckButton>
--- End code ---
^^^ This is telling our button to link on to the 5th button on the top row in class selection.

Now we still have to make them all fit onto the menu bars unlike this:



So search for this:


--- Code: ---<Anchor point="TOP" x="-90" y="-463"/>
--- End code ---
And change it to:

--- Code: ---<Anchor point="TOP" x="-98" y="-463"/>
--- End code ---

Now go through all of the "CharacterCreateClassButton"'s and change the x="6" to x="0"

If done right, you should have this:



And that's it for this step for now! =D

P.S I am aware the Necromancer right hand pane icon is missing. I have been awake for over 24 hours and can't remember for the life of me where that BLP is, so I'll get to that when less tired, it's only a minor detail for now, I'm sure you'll live :P

Step 3. Fixing the client crash when checking stats bug!
Ok for all of these, we are going to be doing some cloning of columns in the gt* dbc files. It is highly advised you do this in CSVED.EXE & DBCUtil.exe and that's what my guide is going to be using.

You get CSVED from here: http://csved.sjfrancke.nl/

And DBCUtil from here: http://code.google.com/p/cntc2/downloads/detail?name=DBCUtil.rar&can=2&q=

I would to thank Khira for their original guide that helped me figure this out. However it wasn't the most straightforward on how to do it, so I thought I'd rewrite it a bit easier here. I would link the guide, but I have no idea where it is, it was in spanish and I had sent to me via someone quoting it.

So let's start! Firstly I want you to make a folder on your desktop and name it what ever the hell you want. Then go to your server and copy all the gt* .dbc files into your new folder. We are doing this just to keep it neat and as backup. Now in your new folder go ahead and delete "gtBarberShopCostBase.dbc", "gtNPCManaCostScaler.dbc" and "gtCombatRatings.dbc" as we won't be touching these.

Now that you've done that, go to where you extracted DBCUtil, go into that folder, create a shortcut to DBCUtil.exe and copy that shortcut into your desktop folder, highlight all your DBC's and and drag them over the DBCUtil and let go of your mouse button, it will begin converting them to csv.files. Once done you should have a 1 csv for each DBC. Now to clone entries. WARNING! DO NOT USE MICROSOFT EXCEL FOR THIS STEP!

First open up CSVED.exe. Now go to File->Open ... and navigate to your desktop folder and open up "gtChanceToMeleeCrit.dbc.csv".

gtChanceToMeleeCrit.dbc.csv
This has 1101 entries, that's 100 per class (including the dummy class) + 1, the plus 1 is just stating all these files are floating (don't ask, not important). Now open upen up ChrClasses.dbc in Taliss. Get the ID of the class your custom class is most like stat wise. So for me my class is like a Mage, so the ID I want is 8. So since it's ID of 8, I have to right-click on any entry in CSVED.EXE and select "Go to line". We need to go to line 702. Why 702 for ID of 8? Figure it out like this:


--- Code: ---Obviously
8*100 = 800
But this starts at 0 not 100, so
800-100 = 700
We have to include the line that stats it's all floating, so
700+1 = 701
And finally, I have no idea why but, we need to add another 1. xD
701+1=702
--- End code ---

Now because this program is wierd, click on the entry underneath the highlighted one, then click back on the first entry, this is just to make sure it's selected properly. Right click on the entry it sent you to, that you have highlighted, then select "Go to line" again. This time add 99 lines. So for me I need 801. Now shift click on that entry. All lines between here and there should be highlighted. Right-Click on one and select "Copy Selected Records". Then scroll to the bottom of the page.

Click the very last entry, then right click and select "Add Record", type in any number, we will be deleting this anyway, it's just to keep everything in line, this is a flaw in the program. It has an option to paste below cursor, point but it doesn't always work like that, and we don't want to push the last line to the bottom and throw off the stat calc. Once you've typed in any number, hit Ready. I typed in 999999 so I can tell which it is.

Now select your added line, right-click and select "Paste records below cursor pos". Now find that entry you added and delete it. Look up the top and it should say 1201 recors. If so, you've done this correctly. If not close without saving and try again. If it does say 1201, go to file and select Save As, then save over your csv file.

Repeat these exact steps for these files:

gtChanceToSpellCrit.dbc
gtOCTRegenHP.dbc
gtOCTRegenMP.dbc
gtRegenHPPerSpt.dbc
gtRegenMPPerSpt.dbc

Now do the exact same for these files, but you only need to add 1 entry, so you should have 13 records at the end.

gtChanceToMeleeCritBase.dbc
gtChanceToSpellCritBase.dbc

Now we open up "gtOCTClassCombatRatingScalar.dbc.csv"

Gonna have to do some basic math here because instead of 100, 1 or 10 entries per class it's 32. So to find yours just do this:


--- Code: ---ID*32, so for me
8*32=256
Plus the float file
256+1=257
And that's the answer
--- End code ---

You should end up with the column 1 saying the number 1 below your line number, that's good, it means we can ignore the flot line now. Again click off it then back on it. We need to go down another 32 lines. So do the math and go to the line.


--- Code: ---257+32=289
--- End code ---

Now just do the same as all the others, copy selected records, go to bottom, add new row, paste below cursor, delete created row. Now we've done that we have to edit column 1, just simply go to the top of you copied files and continue the numbers on. So mine says 352, 256, 257, 258. I need it to say 352, 353, 354, 355 etc. Once that's done, check you have 386 records. Save As and close CSVED.exe.

Now delete all the .dbc files in the folder. Then drag and drop all your .dbc.csv files onto DBCUtil shortcut again, this time it should spit out your new working dbc's. Copy them and place them into your patch and your server, then you're done for this step!

Step 4. The Core Modifications
(ArcEmu based, not sure about Trinity or Mangos sorry).

BACK UP YOUR ENTIRE WORLD SOLUTION!!!

Ok this is where we branch far away from create a race (besides the first part) and hit the stuff that most people don't know what to do. But to be completely honest; once you learn how, it's extremely basic. Just a whole bunch of ctrl+f, copy & paste, then editing. This part is not going to be fun...

I already mentioned in my introduction, this is going to be heavily based on my necromancer class, which is an adaption of a Mage class. All these stats and everything in this C++ is the basic of the basic. It isn't going to walk you through every single step for each individual style of class. You have to figure that out on your own. However, luckily, nearly all the spots for the ctrl+f sections, have all original classes listed there. Along with relevant things you will need to adjust for your own personal class.

Please remember in the core, ctrl+f is your best friend.

I apologize if this is difficult and looks very rough, but it is not an easy guide to write.

List of files we are editing:


* Gossip.h
* Player.h
* StdAfx.h
* NPCHandler.h
* CharacterHandler.cpp
* Creature.cpp
* Gossip.cpp
* MiscHandler.cpp
* NPCHandler.cpp
* ObjectMgr.cpp
* player.cpp
* ScriptMgr.cpp
* Stats.cpp
* AchievementMgr.cpp
* Level3.cpp
* CMakeLists.txt
First up, open your world.sln

Easiest part to do, under "world" section, right click on the "Header Files" folder and click Add -> New item. Then create a new Header File and name it, your class name (normal casing no spaces), so mine would be named "Necromancer".

Ok type this into it (with same caps settings as mine. For full caps, use _ instead of spaces, for normal caps don't use spaces at all. For example DEATH_KNIGHT_H and DeathKnight):

--- Code: ---#ifndef _NECROMANCER_H
#define _NECROMANCER_H

class Necromancer : public Player
{
public:
Necromancer(uint32 guid) : Player(guid) {}

bool IsNecromancer() { return true; }
};

#endif
--- End code ---

Save it and done for that one.

Now do the same, but in the "Source Files" folder with a cpp item instead.

And just add this into it

--- Code: ---#include "StdAfx.h"
--- End code ---
Save it.

Now go to "CMakeLists.txt" under the world project. You have to add both of these files into it, so it actually makes them when you build with cmake.
So ctrl+f
--- Code: ---MovementHandler.cpp
--- End code ---
Change to

--- Code: ---MovementHandler.cpp
Necromancer.cpp
NPCHandler.cpp
--- End code ---

Then ctrl+f
--- Code: ---NameTables.h
--- End code ---
Change to

--- Code: ---NameTables.h
Necromancer.h
NPCHandler.h
--- End code ---

Save the cmakelist.

Now go to your "build" folder, so not your source but the folder after CMAKE. Go into world, you'll find both your Necromancer.h and Necromancer.cpp in there. Cut them both, go to your code folder, then the src folder, followed by arcemu-world. Paste both of the items in there. Now leave and build your project with CMAKE again.

To save time I'm just gonna type the .h or .cpp name followed by very brief description/demonstration of what to do or where to add. Just replace necromancer with your class, in same caps format as mine!

Gossip.h
ctrl+f
--- Code: ---Mage
--- End code ---
(Match Whole Word)

--- Code: ---MAGE,
NECROMANCER,
SHAMAN,
--- End code ---

Player.h
ctrl+f
--- Code: ---DRUID = 11,
--- End code ---

--- Code: ---WARLOCK = 9,
DRUID = 11,
NECROMANCER = 12,
MAX_PLAYER_CLASSES
--- End code ---

ctrl+f
--- Code: ---druid - restoration - 282
--- End code ---

--- Code: ---druid - balance - 283
druid - feral combat - 281
druid - restoration - 282

necromancer - curses - 450
necromancer - poison and bones - 451
necromancer - summoning - 452

*/
--- End code ---

That part was unneccessary, but it keeps it neat and doesn't hurt.

Scroll down just a little bit to:

--- Code: ---static const uint32 TalentTreesPerClass[DRUID + 1][3] =
--- End code ---
change to

--- Code: ---static const uint32 TalentTreesPerClass[DRUID + 2][3] =
--- End code ---

Then a bit further to

--- Code: --- { 283, 281, 282 },  // DRUID
--- End code ---
change to

--- Code: --- { 283, 281, 282 },  // DRUID
{ 450, 451, 452 },  // NECROMANCER
};
--- End code ---

ctrl+f
--- Code: --- virtual bool IsDruid() { return false; }
--- End code ---

change to

--- Code: --- virtual bool IsDruid() { return false; }
virtual bool IsNecromancer() { return false; }
--- End code ---

StdAfx.h
ctrl+f
--- Code: ---#include "Mage.h"
--- End code ---
change to

--- Code: ---#include "Mage.h"
#include "Hunter.h"
#include "Shaman.h"
#include "Necromancer.h"
--- End code ---

CharacterHandler.cpp
ctrl+f
--- Code: ---case DRUID:
plr = new Druid(playerGuid);
break;
--- End code ---
   
Change to


--- Code: ---case DRUID:
plr = new Druid(playerGuid);
break;
case NECROMANCER:
plr = new Necromancer(playerGuid);
break;
--- End code ---
   
Creature.cpp

--- Code: ---ctrl+f static const char* classes[12] = {"None", "Warrior", "Paladin", "Hunter", "Rogue", "Priest", "Death Knight", "Shaman", "Mage", "Warlock", "None", "Druid"};
--- End code ---

change to


--- Code: ---static const char* classes[13] = {"None", "Warrior", "Paladin", "Hunter", "Rogue", "Priest", "Death Knight", "Shaman", "Mage", "Warlock", "None", "Druid", "Necromancer"};
--- End code ---

Gossip.cpp

--- Code: ---ctrl+f 81 You must have Wrath of the Lich King Expansion to access this content.
--- End code ---

change to


--- Code: ---81 You must have Wrath of the Lich King Expansion to access this content.
82  Deathknight
83 Necromancer
*/
--- End code ---

^^^ Not neccessary.

ctrl+f
--- Code: ---case ::DEATHKNIGHT:
itemname += string(Plr->GetSession()->LocalizedWorldSrv(Gossip::DEATHKNIGHT));
break;
--- End code ---
               
Change to


--- Code: ---case ::DEATHKNIGHT:
itemname += string(Plr->GetSession()->LocalizedWorldSrv(Gossip::DEATHKNIGHT));
break;
case ::NECROMANCER:
itemname += string(Plr->GetSession()->LocalizedWorldSrv(Gossip::NECROMANCER));
break;
--- End code ---
            
               
MiscHandler.cpp

--- Code: ---ctrl+f case PRIEST:  // allowing priest, warlock, mage to equip ammo will mess up wand shoot. stop it.
--- End code ---

change to


--- Code: ---case PRIEST:  // allowing priest, warlock, mage, necromancer to equip ammo will mess up wand shoot. stop it.
case WARLOCK:
case MAGE:
case NECROMANCER:
--- End code ---
      
      
NPCHandler.cpp
ctrl+f
--- Code: --- { "Druid", 0 },
--- End code ---

change to


--- Code: --- { "Druid", 0 },
{ "Necromancer", 0
--- End code ---
   
   
ObjectMgr.cpp
ctrl+f
--- Code: ---case DEATHKNIGHT: // Based on 55-56 more testing will be done.
if(Level < 60)TotalHealthGain += 92;
--- End code ---
                  
change to

               
--- Code: ---case DEATHKNIGHT: // Based on 55-56 more testing will be done.
if(Level < 60)TotalHealthGain += 92;
/*else if(Level <60) TotalHealthGain+=??;
else if(Level <70) TotalHealthGain+=??;*/
else TotalHealthGain += 92;
break;
case NECROMANCER:
if(Level < 23)TotalHealthGain += 15;
// else if(Level >60) TotalHealthGain+=Level+40;
else if(Level > 60) TotalHealthGain += Level + 190;
else TotalHealthGain += Level - 8;

if(Level < 28)TotalManaGain += Level + 23;
// else if(Level>60)TotalManaGain+=Level+26;
else if(Level > 60)TotalManaGain += Level + 115;
else TotalManaGain += 51;
break;
}
--- End code ---
               
               
               
ctrl+f       
--- Code: ---case DRUID:
result = new Druid(guid);
break;
--- End code ---
         
change to

      
--- Code: ---case DRUID:
result = new Druid(guid);
break;
case NECROMANCER:
result = new Necromancer(guid);
break;
--- End code ---

ctrl+f    
--- Code: ---for(uint32 Class = WARRIOR; Class <= DRUID; ++Class)
--- End code ---

change to

   
--- Code: ---for(uint32 Class = WARRIOR; Class <= NECROMANCER; ++Class)
--- End code ---
         

NPCHandler.h

--- Code: ---ctrl+f #define TRAINER_TYPE_MAX 16
--- End code ---

change to


--- Code: ---#define TRAINER_TYPE_MAX 17
--- End code ---
         
player.cpp

--- Code: ---ctrl+f 1.7f       // Druid
--- End code ---

change to

   
--- Code: ---1.7f,      // Druid
1.0f       // Necromancer
--- End code ---
   
   
ctrl+f
--- Code: ---if((getClass() == MAGE) || (getClass() == PRIEST) || (getClass() == WARLOCK))
--- End code ---

change to


--- Code: ---if((getClass() == MAGE) || (getClass() == PRIEST) || (getClass() == WARLOCK) || (getClass() == NECROMANCER))
--- End code ---

ctrl+f
--- Code: ---default:    //mage,priest,warlock
--- End code ---

change to


--- Code: ---default:    //mage,priest,warlock,necromancer
--- End code ---

^^^ Not neccessary

ScriptMgr.cpp
ctrl+f
--- Code: ---81 You must have Wrath of the Lich King Expansion to access this content.
--- End code ---

change to


--- Code: ---81 You must have Wrath of the Lich King Expansion to access this content.
82 Deathknight
83 Necromancer
*/
--- End code ---

Stats.cpp
ctrl+f                
--- Code: ---case STAT_SPIRIT:
{ gain = CalculateStat(level, 0.000006, 0.002031, 0.278360, -0.340077); }
--- End code ---
                  
Change to

      
--- Code: ---case DEATHKNIGHT:
{
switch(Stat)
{
case STAT_STRENGTH:
{ gain = CalculateStat(level, 0.000039, 0.006902, 1.080040, -1.051701); }
break;
case STAT_AGILITY:
{ gain = CalculateStat(level, 0.000022, 0.004600, 0.655333, -0.600356); }
break;
case STAT_STAMINA:
{ gain = CalculateStat(level, 0.000059, 0.004044, 1.040000, -1.488504); }
break;
case STAT_INTELLECT:
{ gain = CalculateStat(level, 0.000002, 0.001003, 0.100890, -0.076055); }
break;
case STAT_SPIRIT:
{ gain = CalculateStat(level, 0.000006, 0.002031, 0.278360, -0.340077); }
break;
}

}
break;

case NECROMANCER:
{
switch(Stat)
{
case STAT_STRENGTH:
{ gain = CalculateStat(level, 0.000002, 0.001003, 0.100890, -0.076055); }
break;
case STAT_AGILITY:
{ gain = CalculateStat(level, 0.000008, 0.001001, 0.163190, -0.064280); }
break;
case STAT_STAMINA:
{ gain = CalculateStat(level, 0.000006, 0.002031, 0.278360, -0.340077); }
break;
case STAT_INTELLECT:
{ gain = CalculateStat(level, 0.000040, 0.007416, 1.125108, -1.003045); }
break;
case STAT_SPIRIT:
{ gain = CalculateStat(level, 0.000039, 0.006981, 1.090090, -1.006070); }
break;
}
}
break;
--- End code ---
      
         
Level3.cpp

--- Code: ---ctrl+f static const char* classes[12] =
{"None", "Warrior", "Paladin", "Hunter", "Rogue", "Priest", "Death Knight", "Shaman", "Mage", "Warlock", "None", "Druid"};
--- End code ---
   
Change to


--- Code: ---static const char* classes[13] =
{"None", "Warrior", "Paladin", "Hunter", "Rogue", "Priest", "Death Knight", "Shaman", "Mage", "Warlock", "None", "Druid", "Necromancer"};
--- End code ---


ctrl+f    
--- Code: ---if(plr->getClass() == DRUID)
{
plr->ClearCooldownsOnLine(573, guid);
plr->ClearCooldownsOnLine(574, guid);
plr->ClearCooldownsOnLine(134, guid);
BlueSystemMessage(m_session, "Cleared all Druid cooldowns.");
return true;
}
break;
--- End code ---
Change to

   
--- Code: ---if(plr->getClass() == DRUID)
{
plr->ClearCooldownsOnLine(573, guid);
plr->ClearCooldownsOnLine(574, guid);
plr->ClearCooldownsOnLine(134, guid);
BlueSystemMessage(m_session, "Cleared all Druid cooldowns.");
return true;
}
if(plr->getClass() == NECROMANCER)
{
plr->ClearCooldownsOnLine(6, guid);
plr->ClearCooldownsOnLine(8, guid);
plr->ClearCooldownsOnLine(237, guid);
BlueSystemMessage(m_session, "Cleared all Necromancer cooldowns.");
return true;
}
--- End code ---
   

ctrl+f
--- Code: ---static uint32 spellarray[DRUID + 1][512] =
--- End code ---

change to


--- Code: ---static uint32 spellarray[DRUID + 2][512] =
--- End code ---

Scroll down a bite and find

         
--- Code: ---{ 0 }, // N/A
--- End code ---
         
Change to

         
--- Code: ---{ 0 }, // N/A
{ 0 }, // Necromancer
--- End code ---


         
ctrl+f
--- Code: ---static const char* CLASS[] =
--- End code ---

Scroll a little down to find

   
--- Code: ---"warlock",
"invalid 10",
"druid"
--- End code ---
   
Change to

   
--- Code: ---"warlock",
"invalid 10",
"druid",
"necromancer"
--- End code ---
   
AchievementMgr.cpp
ctrl+f    
--- Code: ---case  458: // Realm First! Level 80 Rogue
--- End code ---
   
change to

      
--- Code: ---case  458: // Realm First! Level 80 Rogue
case  480: // Realm First! Level 80 Necromancer
--- End code ---
   
ctrl+f    
--- Code: ---(achievement->ID == 458 && GetPlayer()->getClass() != ROGUE) ||
--- End code ---

change to

                 
--- Code: ---(achievement->ID == 458 && GetPlayer()->getClass() != ROGUE) ||
(achievement->ID == 480 && GetPlayer()->getClass() != NECROMANCER) ||
--- End code ---
         
END OF SCRIPTING!!! WOOOOOOOOOOOOOOOOOOOOOOT!!!!

Now you just need to build your World Project.

Step 5. The Database
First thing to know, this is the easiest part of all! That I am sure many of you have done similar stuff before.

Open up the playercreateinfo table add a new line and fill in as the titles say. If you could do step 3 I'm pretty sure you can do step 4 by yourself. Either way here is a basic SQL file I'm using for a Human Necromancer and an Undead Necromancer. Just adjust accordingly.


--- Code: ---INSERT INTO `playercreateinfo` VALUES (66, 1, 1, 12, 0, 12, -8946.42, -131.35, 83.63, 49, 20, 20, 20, 20, 20, 60, 0, 1000, 0, 0, 20, 3, 4, 81, '2');
INSERT INTO `playercreateinfo` VALUES (67, 5, 5, 12, 0, 85, 1676.62, 1677.2, 121.67, 57, 20, 20, 20, 20, 20, 60, 0, 1000, 0, 0, 20, 3, 4, 2, '1024');
--- End code ---

Warning though, these classes will have no spells, no skills, no items and no talents. They are just basic shells!

Results!







Final Notes

As I said at the start, there is a big bug. If you have a look in the 3rd result image I have the stats hidden. If that is not done and the Character/Reputation/Currency/Pet/Skills pane is opened, it crashes your client. That's why I use this macro that has floated around for ages for 255 servers with druids that have the same problem.


--- Code: ---/console PlayerStatLeftDropDown Melee
/console PlayerStatRightDropDown Spell
/reload
--- End code ---

Simply use that, don't use any addons like "All Stats" and it will work fine. It may be an inconvenience, but I'm working on it. And any input on it would be greatly appreciated.

I'm gonna try write some guides up on custom Talents/Spells etc... To accompany this, however I'm a pretty busy lately, so not sure when I'll be able to get round to it.

Again, I apologize for how rough this guide is. It's a very difficult guide to write and touch on the right subjects. I will try and update with more info on things if I can. And any questions I'll reply to as fast as I can.

Might be a few mistakes in there, my class is working fine and my scripts are fine, however I backtracked a few times and might have written a word or two wrong in the guide version of the code as opposed to my own. If you spot anything, let me know and I'll correct it.

Thanks for taking the time read this you guys. Hope you find it helpful and more importantly, hopefully you can help custom classes expand!


Edit: Fixed an error.

schlumpf:
I tried fixing formatting a bit, then got pissed of by the major misuse of spoiler tags and gave up. Please replace your spoilers with code tags enclosing the actual code only.

I guess, I will just remove those stupid spoiler tags entirely.

Steff:
YES please ;)

holyleen:
what ddi i do worng ?

InterfaceGlueXML/CharacterCreate.lua

--- Code: ---MAX_RACES = 10;
MAX_CLASSES_PER_RACE = 11;
--- End code ---


--- Code: ---["NECROMANCER"]   = {0.49609375, 0.7421875, 0.5, 0.75},
--- End code ---

XxXGenesisXxX:
Sorry, been away for a few days.

Did you do both CharacterCreate.lua and CharacterCreate.xml before testing it?

Navigation

[0] Message Index

[#] Next page

Go to full version