Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Users Online
CommonCrawl, Yandex

Members: 0
Guests: 6
Stats
Files
Topics
Posts
Members
Newest Member
477
3,706
19,240
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Bugfix Lists » SmaugFUSS Bugfix List » [Bug] Experience ratios are n...
Forum Rules | Mark all | Recent Posts

[Bug] Experience ratios are not being calculated properly
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 Sep 5, 2005, 9:48 am
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Bug: Experience ratios are not being calculated properly
Danger: Low - Assigning inflated value in some cases
Found by: GCC
Fixed by: Samson

---

fight.c, xp_compute

Locate:
   /*
    * semi-intelligent experienced player vs. novice player xp gain
    * "bell curve"ish xp mod by Thoric
    * based on time played vs. level
    */
   if( !IS_NPC( gch ) && gchlev > 5 )
   {
      xp_ratio = ( int )gch->played / gchlev;
      if( xp_ratio > 20000 )  /* 5/4 */
         xp = ( xp * 5 ) >> 2;
      else if( xp_ratio < 16000 )   /* 3/4 */
         xp = ( xp * 3 ) >> 2;
      else if( xp_ratio < 10000 )   /* 1/2 */
         xp >>= 1;
      else if( xp_ratio < 5000 ) /* 1/4 */
         xp >>= 2;
      else if( xp_ratio < 3500 ) /* 1/8 */
         xp >>= 3;
      else if( xp_ratio < 2000 ) /* 1/16 */
         xp >>= 4;
   }


Change to:
   /*
    * semi-intelligent experienced player vs. novice player xp gain
    * "bell curve"ish xp mod by Thoric
    * based on time played vs. level
    */
   if( !IS_NPC( gch ) && gchlev > 5 )
   {
      xp_ratio = ( int )gch->played / gchlev;
      if( xp_ratio > 20000 )  /* 5/4 */
         xp = ( xp * 5 ) >> 2;
      else if( xp_ratio > 16000 )   /* 3/4 */
         xp = ( xp * 3 ) >> 2;
      else if( xp_ratio > 10000 )   /* 1/2 */
         xp >>= 1;
      else if( xp_ratio > 5000 ) /* 1/4 */
         xp >>= 2;
      else if( xp_ratio > 3500 ) /* 1/8 */
         xp >>= 3;
      else if( xp_ratio > 2000 ) /* 1/16 */
         xp >>= 4;
   }


The way this was setup, if the xp_ratio came out under 16000, it would always choose the 3/4 case, regardless. The other values it's checking below there are obviously also below 16000 so the code simply never gets there. With the corrections above the ratios should do as they were intended. This might lead to some balance related side affects so it would be wise to monitor that and adjust accordingly.
       
Pages:<< prev 1 next >>