Re: How would I go about chaning the max number of spells?

From: Brandon Brown (BBrown@uasoft.com)
Date: 03/17/01


> You won't screw anything up, as long as you also renumber all the skills
> as well.  You'll have to change the MAX_SKILLS as well.
> I did this myself, without any problems at all. Of course, I have
> ASCII pfiles, so I didn't have to worry about screwing up my pfiles
> either. It's been so long since I've had BINARY pfiles, that I can't
> remember if there was a problem with changing MAX_SKILLS or not.

*sighs*


structs.h :

/*
 *  If you want to add new values to the playerfile, do it here.  DO NOT
 * ADD, DELETE OR MOVE ANY OF THE VARIABLES - doing so will change the
 * size of the structure and ruin the playerfile.  However, you can change
 * the names of the spares to something more meaningful, and then use them
 * in your new code.  They will automatically be transferred from the
 * playerfile into memory when players log in.
 */
struct player_special_data_saved {
   byte skills[MAX_SKILLS+1];   /* array of skills plus skill 0         */
   byte PADDING0;               /* used to be spells_to_learn           */
   bool talks[MAX_TONGUE];      /* PC s Tongues 0 for NPC               */
   int  wimp_level;             /* Below this # of hit points, flee!    */
   byte freeze_level;           /* Level of god who froze char, if any  */
 ( ... )


Notice how MAX_SKILLS must be a constant essentially to prevent messing up
the pfile.


 - B. Brown
TimeTraveller - fate.digital-genesis.com : 3000

--
   +---------------------------------------------------------------+
   | 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/04/01 PST