Who: Jason Yarber (jasonyarber@hotmail.com) What: Changes experience, THAC0, and saving throw tables into formulas Where: class.c When: Made on September 20, 2001 Why: By using this system, you can change the maximum number of levels in structs.h while only having to revise the xp formulas a little bit. How: To implement this change simple follow the direction below: Notes: Some basic math is required to be done while putting this code in. Open class.c in any text editor. ------------------------------------------------------------------------------ STEP ONE ------------------------------------------------------------------------------ Under the line byte saving_throws(int class_num, int type, int level) look for every switch (level) { change the whole switch to if (level == 0) return 100; if (level >= LVL_IMMORT) { return 0; } else { return (# - ((# * level) / (LVL_IMMORT - 1))); } replace the #'s with the saving throw for level 1 ------------------------------------------------------------------------------ STEP TWO ------------------------------------------------------------------------------ Under the line int thaco(int class_num, int level) look for every switch (level) { change the whole switch to if (level == 0) return 100; if (level >= LVL_IMMORT) { return 0; } else { return (# - ((# * level) / (LVL_IMMORT - 1))); } replace the #'s with the THAC0 for level 1 ------------------------------------------------------------------------------ STEP THREE ------------------------------------------------------------------------------ Find the line that starts with #define EXP_MAX and change the number to 1500000000 The maximum value you can use is 2147483600, but I used 1500000000 to prevent overloading the integer. You can increase this number if you desire. ------------------------------------------------------------------------------ STEP FOUR ------------------------------------------------------------------------------ Look for switch (chclass) { and change the whole switch to /* * Adjust the mod values below to guarantee that the higest immortal level * does not exceed the value the value of EXP_MAX. * The higher the mod value you use, the more exp is needed per level. */ switch (chclass) { case CLASS_MAGIC_USER: mod = 45; return ((level * mod)*(level * mod)); break; case CLASS_CLERIC: mod = 44; return ((level * mod)*(level * mod)); break; case CLASS_THIEF: mod = 43; return ((level * mod)*(level * mod)); break; case CLASS_WARRIOR: mod = 42; return ((level * mod)*(level * mod)); break; } Add more cases for each class in your mud, change the modifiers accordingly also, to test that each one is done properly do the math for the maximum level on your mud. For example, if the highest immortal level on your mud is 100 and your highest modifier is 50 then