• Add Review
  • Subscribe
  • Nominate
  • Submit Media
  • RSS

08-15-2009: Experience Bug Slain

While returning to the police station at level forty, I ran into a mysterious glitch where pitifully weak enemies yielded obscenely high experience awards. Turns out, the branch that sets negative level differences was misplaced.

The experience formula is x = ((e+2)-p)^2, where x is the Exp. award, e is the enemy group's level, and p is the player character's level. (EXP is calculated separately for each party member.)

The problem lied in the squaring - a negative number squared becomes positive. Since I set it to check for totals below zero after the rest of the equation was done, all awards assume the enemy group was a higher level than the player, leading to obscene awards for killing small fries. Moving the branch to before the squaring cut this problem off perfectly.

Posts

Pages: 1
Is it because there were no monsters higher than level 40? I've seen that happen in some games. Heck, Final Fantasy Mystic Quest barely goes beyond 40 (it stops at 41), and Dragon Quest games effectively stop around level 40 as well. And as for RM2k(3) games, level 20 is often the end of the game (or demo).
Pages: 1