update on multi-classing code

From: Thomas Larcombe (raucous@DIM.COM)
Date: 08/13/02

Hi all...
     Thank you for the additional input, some of it I have dealt with
already and some of it I hadn't yet. Yes GET_CLASS, class_abbr, GET_LEVEL,
etc... are referenced all over the place in the code but grep is a
wonderful command and is allowing me to go through nstance by instance
and add in the additional '2' variables in addition to the base. Here is
how I am handling the addition in case anyone else is interested. I'll
post a message with my complete solution when I am done and probably also
submit it to the FTP site as I don't want anyone else to have to go through
   In no particular order, I duplicated the spell_level function with a
spell_level2 function that takes in the variable chclass2 instead of
chclass. Additions to the pfile were chclass2 and level2. My original
problem in not getting them to assign was stupid, I hadn't initialized
the level2 variable to = 1 and as a result it wasn't assigning 1st lvl
skills. In the init_spell_levels all the entries are duplicated with a
spell_level2 call in front of them instead of spell_level. All instances of
GET_CLASS and/or GET_LEVEL have had an addition made to allow checking
both CLASS and CLASS2, LEVEL and LEVEL2. I added a parse_class2 call
in the character creation section in interpreter.c and built the
parse_class2 function in class.c, other minor variations that have led from
these changes have also occured. My big problem still coming up is to get
the xp to be only accessible to one class (for example gaining a level in
each class based on the same 2000 xp total that the character has) I am
thinking that I'll break the exp variable into three portions a 'pool' and
then used xp by each class, whenever a class gains a level it will subtract
xp from the 'pool' and add it into the appropriate class variable. Does
this sound as though it will work? Guild gaining and practicing code is
getting a workout also and the end result will be typing gain in a guild
will gain in the proper class(if the character has that class) and
practicing there will only give the appropriate class skills/spells to
   Is anyone interested in my continuing to detail what I've been doing or
should I just wait and put it all up in one batch at the end? I will
continue to ask any pertinent questions on the list but don't want to
clutter it up too much. I also realize that this may not be the most
efficient method of approaching the task but it is the one that has seemed
clear to me. If anyone wants to comment to help me streamline the code it
would be more than welcome.
Thank you...

   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |

This archive was generated by hypermail 2b30 : 06/25/03 PDT