Page 1 of 1

Adding Character Classes

Posted: Sun 30.08.2009, 05:01
by LostInTheWired
Hi all! I'm a semi-experienced developer (most of my experience is C#, and I've only done C/C++ with robots), but I'm afraid I've never worked with games before, and especially ones with netcode involved. I want to run my own server with a couple edits here and there for me, my brother, and some of his friends (at least for now). The first thing that my brother talked about was the classes. We're used to lots of table-top, and we like to have lots of classes (balanced or not, that can be worked with later) just for the sake of variety.

So yesterday, I downloaded the source code and have been looking through for a few hours for everything that I need to edit to add a class. It seems scattered everywhere! XD I can generally tell what's important and what's little edits (like Warriors being unable to read), but I've failed every time (server fails to start when initializing the class array). Would it be too much trouble to give a general rundown of what needs to be edited to add a class (I have a feeling that it will be)? Currently, I have a small list of what I need to edit to add a class. Either I'm doing it wrong (wouldn't be that surprised) or I'm missing something.

Code: Select all

c_tables.c  Line 331: add all of the stats and flags for the new class in the c_info array.
c_xtra1.c   Line 491: the switch statement there for printing the race/class info
defines.h   Line 600:  add a define for the class and
            Line 197:  increment the MAX_CLASS define
cave.c      Line 472:  add a color for the class in the switch statement here
dungeon.c   Line 160:  add a case for the analyze of the class in this switch
tables.c    Line 1811:  add the titles for the new class in the array here
Am I missing anything here? Sorry if this is one of those noobeh questions. ^^'

Re: Adding Character Classes

Posted: Sun 30.08.2009, 14:46
by Warrior
Hi there. I'm afraid I don't have much insight to offer here, but I'm sure someone else will come to your rescue soon :)

Re: Adding Character Classes

Posted: Sun 30.08.2009, 15:10
by Flambard
Your list seems pretty good. I never tried it, but I've seen variants with other classes. Don't overlook p_class.txt in lib/edit directory. I believe in next version is would be possible to completly control a class from that file.

Re: Adding Character Classes

Posted: Sun 30.08.2009, 17:45
by LostInTheWired
Flambard wrote:Your list seems pretty good. I never tried it, but I've seen variants with other classes. Don't overlook p_class.txt in lib/edit directory. I believe in next version is would be possible to completly control a class from that file.
I can say this, that would be amazing and make the whole process much easier. XD

Also, I may have found what I did. I may have forgotten to increment that MAX_CLASS define, but I'll try to add a class and let you guys know how it turns out.