more than 32 classes ;)

From: goamkows (
Date: 07/19/96

well, i'm setting up a "real" mud (i've been running one just to learn
about the code and tinker and experiment), and just thought i'd share
an idea that Thrytis of DGC came up with while we were brain storming
on how to imp some of the things i wanted to do (btw - if you would be
interested in helping as a coder for my mud, feel free to drop me a
line :)

i wanted to have more than 32 classes, but was going to run into
problems with bitvectors only going upto 32 (would you believe i can't
declare type long long?  i've only got access to gcc version 2.3.3!)
so i'm going to use two bitvectors to determine class - one to
determine the "primary class" (warrior, mage, cleric, thief) and one to
determine a "sub class" (paladin, ranger, druid, bard).

so in structs.h i get something like:
/* PC classes */
#define CLASS_UNDEFINED   -1
#define CLASS_CLERIC      1
#define CLASS_ROGUE       2
#define CLASS_WARRIOR     3
#define CLASS_PSI         4

#define NUM_CLASSES       5  /* This must be the number of classes!!

/* PC subclasses */
#define SUBCLASS_UNDEFINED        -1
/* cleric */
#define SUBCLASS_CLR_PRIEST       0
#define SUBCLASS_CLR_DRUID        1
/* thief */
#define SUBCLASS_ROG_THIEF        0
#define SUBCLASS_ROG_BARD         1
/* warrior */
#define SUBCLASS_WAR_RANGER       2


thereby allowing theoretically up to 32^2 total classes to be in the
game :)  
to a lesser extent, a similar thing can be done for races (e.g. elves
can be broken down into drow, high, wood, etc.)

just thought i'd share this idea :D
any comments?

now i just have to figure out how to handle this in the character
creation in the nanny function... ;P

This archive was generated by hypermail 2b30 : 12/07/00 PST