Adding a custom class

For any problems with Dawn of Light website or game server, please direct questions and problems here.

Moderator: Support Team

Adding a custom class

Postby Betawolf13 » Mon Nov 06, 2017 2:45 am

So when adding a custom class do you have to add an override in the script for the server to detect the new class or can you edit the hardocde and add it in through there? I have added the class to the playerclass folder. I have added its id everywhere i can thnk of to add it. IS there packet or a hidden file i am missing?
Betawolf13
DOL Novice
 
Posts: 82
Joined: Sat Aug 06, 2011 5:48 am

Re: Adding a custom class

Postby dargon » Mon Nov 06, 2017 3:16 am

will upload a walkthrough to custom classes in around 10 minutes ;)
Mannik: Admin of Forsaken Worlds Reborn
dargon
DOL Follower
 
Posts: 451
Joined: Sun Apr 15, 2007 6:55 pm

Re: Adding a custom class

Postby dargon » Mon Nov 06, 2017 3:40 am

This walkthrough will use the example to making a spellcasting class called a Flame Haze.
Step 1: making the class:
The best method is finding a current class that is similar to what you have in mind. I know I want the class to use Int as it's primary, Dex as a secondary, and Qui as the tertiary. I know Eldritch shares this, and is also a pure caster.

Go to DOLSharp/GameServer/PlayerClasses/Hibernia/ClassEldritch.cs and open it.

Image

now you want to make it a Flame Haze, change anything to do with Eld to FH Note: you can also change "Magician" to anything, but in its current state, its still a magician base class, even if you change the "Magician" part.

Image

Save this file as ClassFlameHaze.cs in your GameServerScripts. (or if you're lazy like me, Debug/Scripts folder.

Step 2: Making it known to the server.
Open DOLSharp/GameServer/GlobalConstants.cs and go to line 870, or find the public enum eCharacterClass : byte section.

in a normal server with no custom classes, numbers 0-62 are taken, choose which realm you want this class to be in and at the bottom of the realm add this
Code: Select all
FlameHaze = 63,
rebuild your server and you can now become this class using the /player class 63 command!

you can find examples to make a trainer in the DOLSharp/GameServer/Trainers folder.

now heres where things get most frustrating.
Step 3: Lets give this class some spelllines and abilities.

in the Database, you will need to create entries for them in Specialization, SpecxAbility, Spellline, ClassxRealmAbility, and ClassxSpecialization. it took me a long time to get this right, but just explore the tables and learn from whats there, you'll get it ;)

after that you will need to make custom spells in the Spell table and assign them to a spell line in the LinexSpell table. your class should now be functional!!!

you can do the same with styles, and StylexSpell for a style user.

Feel free to ask me for more help if you get stuck
Mannik: Admin of Forsaken Worlds Reborn
dargon
DOL Follower
 
Posts: 451
Joined: Sun Apr 15, 2007 6:55 pm

Re: Adding a custom class

Postby Betawolf13 » Mon Nov 06, 2017 4:16 pm

I have done all this but when i try to change my class it gives me an error in console
2017-11-06 10:17:41,733 - [6] - ERROR - DOL.GS.GamePlayer - No CharacterClass with ID 75 found
Betawolf13
DOL Novice
 
Posts: 82
Joined: Sat Aug 06, 2011 5:48 am

Re: Adding a custom class

Postby dargon » Tue Nov 07, 2017 3:37 am

Im pretty sure you figured this out, but make sure you add the class to globalconstants and do a rebuild
Mannik: Admin of Forsaken Worlds Reborn
dargon
DOL Follower
 
Posts: 451
Joined: Sun Apr 15, 2007 6:55 pm

Re: Adding a custom class

Postby Betawolf13 » Tue Nov 07, 2017 6:33 pm

Yes I did figure this out. There was an extra step I had to take that I was unaware of. I had to right click on the Albion folder under Playerclasses > Add > Existing Item > hit browse >C:\Users\Wicurcyn\Desktop\DOLSharp-master\GameServer\playerclasses\albion\"Playerclass.cs" Once I added this file and rebuilt my solution then i was able to add my class.
Attachments
snip2.PNG
snip2.PNG (87.41 KiB) Viewed 2626 times
Snip1.PNG
Snip1.PNG (54.73 KiB) Viewed 2626 times
Betawolf13
DOL Novice
 
Posts: 82
Joined: Sat Aug 06, 2011 5:48 am

Re: Adding a custom class

Postby dargon » Thu Nov 09, 2017 11:51 pm

ah. see, you dont have to actually put the new class in the core. you can place the ClassNewClass.cs into the debug/scripts folder
Mannik: Admin of Forsaken Worlds Reborn
dargon
DOL Follower
 
Posts: 451
Joined: Sun Apr 15, 2007 6:55 pm

Re: Adding a custom class

Postby Betawolf13 » Fri Nov 10, 2017 6:04 pm

So now I am trying to figure out how to make my custom spec lines see able on the server.
I have been able to add it to the trainer and and to the spec window. How ever if you look under spells or combat styles it shows as null.

I have found where the server calls this information from

It is located under the GlobalConstant.cs file
case Specs.Shields: return 0x2B;
case Specs.Flexible: return 0x2E;
case Specs.Staff: return 0x2F;
case Specs.Summoning: return 0x30;
case Specs.Stormcalling: return 0x32;
case Specs.CustomSpec: return 0x33;
If I use the value 0x33 it return null
If I use ox25 it return as Cave Magic
Does anyone know where these identifiers are at?
Betawolf13
DOL Novice
 
Posts: 82
Joined: Sat Aug 06, 2011 5:48 am

Re: Adding a custom class

Postby reefcrazed » Mon Dec 04, 2017 4:00 pm

I am curious, when you create a custom class like this, it does not show up as a possible class when you are creating a new character does it?
reefcrazed
DOL Apprentice
 
Posts: 29
Joined: Sun Jan 03, 2010 5:12 pm

Re: Adding a custom class

Postby dargon » Mon Dec 04, 2017 4:56 pm

no. you will need to do something in game for them to choose the class. I tend to follow 2 choices
1: everyone start as base classes like the old days, and can chose their classes via a trainer.
2: secret "Epic" classes that are custom upgrades on their base class, this works with a mini quest and an npc that sets their new class, but allows them to use a master trainer, or their original trainer to train. another option is just allow the class to be chosen as long as the player meets criteria you want for the class.
Mannik: Admin of Forsaken Worlds Reborn
dargon
DOL Follower
 
Posts: 451
Joined: Sun Apr 15, 2007 6:55 pm

Re: Adding a custom class

Postby Dinberg » Mon Dec 04, 2017 10:10 pm

So now I am trying to figure out how to make my custom spec lines see able on the server.
I have been able to add it to the trainer and and to the spec window. How ever if you look under spells or combat styles it shows as null.

I have found where the server calls this information from

It is located under the GlobalConstant.cs file
case Specs.Shields: return 0x2B;
case Specs.Flexible: return 0x2E;
case Specs.Staff: return 0x2F;
case Specs.Summoning: return 0x30;
case Specs.Stormcalling: return 0x32;
case Specs.CustomSpec: return 0x33;
If I use the value 0x33 it return null
If I use ox25 it return as Cave Magic
Does anyone know where these identifiers are at?
I think for spell casters you can just go ahead and add a new spell line to the database. Add the spell line to your class, and it should show up in the caster's spell list (there is no need to modify this part of GlobalConstant.cs)
The Marvelous Contraption begins to stir...
User avatar
Dinberg
Inactive Staff Member
 
Posts: 4695
Joined: Sat Mar 10, 2007 9:47 am
Yahoo Messenger: dinberg_darktouch
Location: Jordheim

Re: Adding a custom class

Postby dargon » Wed Dec 06, 2017 4:12 am

his issue is with style lines, if he makes a custom style line, the class can train in it, and they get the styles but if its a custom named style line it shows up as "Abilities" instead of "Claws" or "Divine Weaponry"
Mannik: Admin of Forsaken Worlds Reborn
dargon
DOL Follower
 
Posts: 451
Joined: Sun Apr 15, 2007 6:55 pm


Return to “%s” Support

Who is online

Users browsing this forum: No registered users and 1 guest