[CF-Devel] does expmul work correctly with the 'skills command?

crossfire-devel at archives.real-time.com crossfire-devel at archives.real-time.com
Tue Jun 22 02:04:27 CDT 2004


Bren wrote:
>
     
      hello all,
     
     >
     
     
     >
     
     
     >
     
      I found the definition of expmul in crossfire/doc/Developers/skills and it 
     
     >
     
      doesn't seem to suggest it should act this way, saying nothing about level 
     
     >
     
      breaks.
     
     
  Correct.

>
     
     
     >
     
      However the comment for expmul in include/object.h says 
     
     >
     
      /* needed experience = (calc_exp*expmul) - means some */
     
     >
     
      /* races/classes can need less/more exp to gain levels */
     
     
  That is also correct.

>
     
     
     >
     
      So it looks like there are two conflicting definitions of this value, one 
     
     >
     
      altering rate at which xp goes to skill vs overall, and one where it 
     
     >
     
      determines the xp for level breaks. 
     
     >
     
     
     >
     
      If both are correct behavior (as they are currently) then expmul is currently 
     
     >
     
      acting like expmul squared and the skills command is misbehaving. 
     
     
  That is incorrect.


  I think the fix is this:
Index: common/living.c
===================================================================
RCS file: /cvsroot/crossfire/crossfire/common/living.c,v
retrieving revision 1.63
diff -c -w -r1.63 living.c
*** common/living.c     10 Apr 2004 07:27:56 -0000      1.63
--- common/living.c     22 Jun 2004 06:51:11 -0000
***************
*** 1528,1534 ****
       if(!op)        /* when rolling stats */
         op = who;

!     if(op->level < settings.max_level && op->stats.exp >= 
level_exp(op->level+1,op->expmul)) {
         op->level++;

         if (op != NULL && op == who && op->stats.exp > 1 && is_dragon_pl(who))
--- 1528,1534 ----
       if(!op)        /* when rolling stats */
         op = who;

!     if(op->level < settings.max_level && op->stats.exp >= 
level_exp(op->level+1,who->expmul)) {
         op->level++;

         if (op != NULL && op == who && op->stats.exp > 1 && is_dragon_pl(who))
***************
*** 1549,1555 ****
             if(who) (*draw_info_func)(NDI_UNIQUE|NDI_RED, 0, who,buf);
         }
         player_lvl_adj(who,op); /* To increase more levels */
!     } else if (op->level>1 && op->stats.exp<level_exp(op->level,op->expmul)) {
         op->level--;
         if(who) fix_player(who);
         if(op->type!=PLAYER) {
--- 1549,1555 ----
             if(who) (*draw_info_func)(NDI_UNIQUE|NDI_RED, 0, who,buf);
         }
         player_lvl_adj(who,op); /* To increase more levels */
!     } else if (op->level>1 && op->stats.exp<level_exp(op->level,who->expmul)) {
         op->level--;
         if(who) fix_player(who);
         if(op->type!=PLAYER) {


  Basically, always use the players expmul value for figuring this out - this is 
what the functions that show the level requirements do.  This means for example 
that if a player has .50 as their expmul value, it means they gain levels in 
skills twice as fast also.  I think this is the correct thing to do, but I 
haven't had a chance to properly test the above change.


_______________________________________________
crossfire-devel mailing list
     
     crossfire-devel at lists.real-time.com
     
     
     https://mailman.real-time.com/mailman/listinfo/crossfire-devel
     
     
    


More information about the crossfire mailing list