XP/Saving Throw Tables -> Formulas

From: Scott Bowden (bowden@MEDIAONE.NET)
Date: 08/25/98


Another thing I've done to get rid of some of the huge switches is to modify the
way experience is given, and made it based on the difference in levels of the
killer and the victim.  Then I've made it so that all classes need a certain
base amount of exp to get to the next level, every level. It looks something
like this:

  in level_exp:

  switch (level) {
    case  0: return 0; break;
    case  1: return 1; break;
    case LVL_IMMORT: return 8000000; break;
    default:
      switch (GET_CLASS(ch)) {
        case CLASS_MAGIC_USER: return (1250 * (level - 1));
        case CLASS_CLERIC: return (1000 * (level - 1));
        case CLASS_THIEF: return (800 * (level - 1));
        case CLASS_WARRIOR: return (1000 * (level - 1));
      }
      break;
  }

Then inside of the do_solo_gain and do_group_gain procedures, I've made
changes that look something like this:

  [*psuedo-code*]

  int gexp;

  gexp = ((base * (100 - (GET_LEVEL(ch) - GET_LEVEL(vict)))/100)

  (and then they gain gexp experience)

If I had the system that I'm doing my coding on in front of me I'd figure out
the exact, but you get the idea. (I'm doing my coding on a 486 dx2/66Mhz laptop
with 8mb of RAM and a 325mb HD, running slackware linux :P. Its not always with
me though :()

  - Scott Bowden


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST