Help on ways to implement idea

From: The Gortemakers (wgortema@ESCAPE.CA)
Date: 09/28/98

What I plan to do, is get rid of practises and implement a
skill/spellbook system where players can get spellbooks by finding them
in certain rooms on the mud or killing mobs to get them.  These
spellbooks will contain one or more spells and upon reaching the level
assigned to the spellbook, the player will be able to scribe the spells
contained in that book to their own "repetoire" of spells.  There is a
whole lot more to it that I won't explain here as it is not really
necessary with respect to what I need help with.

I can code all this howdy-do no problem, but the problem I ran into was
the fact that each player will be unique with regards to the
spells/skills that s/he has at any given time with respect to the other
players.  So when it comes to storing this information into playerfiles,
I was wondering what you folks thought would be the best idea to
implement this.  I am particularly looking for a system that doesn't
catapult the pfile size to some unimaginable size.  I was thinking that
there might be a way to do this using bitvectors such as:

#define HAS_SPELL_SANCTUARY    (1 << 0)
#define HAS_SPELL_ARMOR             (1 << 1)
#define YADA_YADA_YADA              (1 << n)

and then just storing the bit in the playerfile.  One thing I'm not sure
about is how high bitvectors can be shifted till they reach a maximal
limit.  But perhaps you have better ways of coding this.  Your input
would be greatly appreciated.

Allan Gortemaker

     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

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