More about adding races

From: Molley the Mage (mollems@WKUVX1.WKU.EDU)
Date: 03/21/94

I too have added races to the CircleMUD 2.2 code.  The process I went
through was basically the same as the one posted previously, so I
won't bore you with more code (besides, that code was nicely done).

However, I will point out a few things:

1. Don't forget that any place you want to use the arrays you define
in constants.c (like pc_race_type[] and race_apply for example) you
must first declare them to be external.  Otherwise they won't be
recognized since they aren't coming from a header file.

2. Here are a few other things that I've implemented.  I can post code
if anyone wants to see it, but the modifications are all very simple
so I won't offend anyone (none take more than one line of code).

  -- Change the stat_char() and do_score() functions to include race.
  -- Change the title so that if no custom player title exists, the
     race is prepended to the class title.  For example, a first level
     Dwarven fighter would be "Bot the Dwarven Swordpupil".
  -- Alter the hourly gain and level gain of mana, hitpoints, and
     movement points based on race.  For example, in my code Gnomes
     and Elves regain mana faster than other races, while Halflings
     regain movement points faster and Dwarves regain hitpoints
     faster.  Etc, etc, etc.

This is not to put down the original example as insufficient; it was
very good.  These are just a few ideas for things that race can
affect.  I would be interested in hearing what other people do.

Another thing I've added to the code, independent of race, is a sixth
ability score: Charisma.  It has the following effects:

  -- Shopkeepers charge less and pay more (slightly) to characters who
     have higher charisma scores.
  -- Charmed creatures get saving throw bonuses if the caster of the
     spell has a low Charisma, and a penalty if high.  Additionally,
     truly un-charming characters can't order their followers into a
     battle until the character himself is actually fighting.

This opens up all sorts of fun possibilities, of course, most of which
I haven't explored.  I have created an APPLY_CHARISMA item flag, and
various magic items to enhance or lower Charisma, along with the
spells "Beauty" and "Disfigure" whose effects you can deduce.

Again, if code is requested I can describe the process.  Be warned
that adding an ability score WILL corrupt the playerfile.  It requires
a fundamental change in one of the character structures if implemented
in a logical manner.  You could sneak in the back door and use one of
the "spares" to hold a value for Charisma, but then its location would
not be very intuitive.

I'm thinking about having certain socials that can only be performed
by characters with especially high or low Charisma scores.  Any

M. Sean Molley, CS Department, Western Kentucky University, Bowling Green, KY
RealSpace : (502) 745-4027  |  Email:  |  Life : Sucks
You don't know about Grammar Day?  It's a holiday for English teachers.
The government funds it with its syntax, and the weather is pluperfect.
"Al Gore is so boring that his Secret Service code name is ... Al Gore."
                           -- Al Gore

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