Re: [IDEA]

From: Glover, Rick I. (RickGlover@PaulHastings.COM)
Date: 07/13/01


> From: Bil Simser [mailto:bsimser@HOME.COM]
>
> Hi guys,
>
> Just an idea I thought I'd toss out. I was getting a little frustrated
> with the classes in Circle as I look through various code bases. Why?
> Because every mud goes off and designs it's own classes but
> then you end
> up with CLASS_ all over the place, and none of them ever match up with
> your own classes. So I thought I'd toss out and idea of class groups
> (this comes from AD&D so bear with me).
>
> You have 4 groups:
> /* Each class must fall into a certain group */
> #define CLASS_GROUP_UNDEFINED -1
> #define CLASS_GROUP_WARRIOR  1
> #define CLASS_GROUP_WIZARD  2
> #define CLASS_GROUP_PRIEST  3
> #define CLASS_GROUP_ROGUE  4
>
> #define NUM_GROUPS    4
>
> Then you define your classes (these are AD&D but you could
> put whatever
> you want in here):
>
> /* Specific classes grouped */
> #define CLASS_UNDEFINED  -1
>
> /* warrior group */
> #define CLASS_FIGHTER  1
> #define CLASS_RANGER  2
> #define CLASS_PALADIN  3
>
> /* wizard group */
> #define CLASS_MAGE   4
> #define CLASS_ILLUSIONIST 5
>
> /* priest group */
> #define CLASS_CLERIC  6
> #define CLASS_DRUID   7
>
> /* rogue group */
> #define CLASS_THIEF   8
> #define CLASS_BARD   9
>
> #define NUM_CLASSES   9

This is actually what I did for my pass-the-time-plugging-away-at-funny-
code MUD.  I have the D&D groups then the individual classes of each group.
I went a bit further and defined the class char_data value as an array with
the size of # groups + 1.  Inside each array I placed the individual class
value.  e.g.  1 being GROUP_WARRIOR and 3 being CLASS_PALADIN, class[1]
would equal 3.  Of course I'd make GROUP_WARRIOR the first (0th) array.
This
way I can have a multiclass character that can only be one class from each
group.  Its hard for me to conceive of a FIGHTER/PALADIN multi-class, so I
made it so they could only be a RANGER/ILLUSIONIST/DRUID/BARD, which is hard
to conceive of too but that can be restricted elsewhere.  If I want to check
to see if they are a particular group then I can see if class[CLASS_GROUP]
==
CLASS_UNDEFINED, otherwise the class[CLASS_GROUP] will return what I'm
looking for.  I hope that made sense, I've been out of the coder-talk for
too
long.

Rick
(sorry for the autotext below that I have no control over)

"paulhastings.com" made the following annotations on 07/13/01 02:02:32
------------------------------------------------------------------------------

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/06/01 PST