   How To Calculate Exponential Skill Level Using Experience Points ?
 Please note: I graduated high school 16+ years ago - my advanced math skills are rusty.  I am running into an issue when it comes to calculating a player's non combat skill level based on the total experience points they have.Each skill level requires 108% more experience than the level before it.Example:Level 5 requires 100 expLevel 6 requires 108 expLevel 7 requires 116 expLevel 8 requires 125 expand so on.  In simple terms, how would I calculate the player's skill level by just using the experience points they have ? Could you provide a code example of how it would work in Java or Python ?  Thank you very much for your time !
  Let's assume level 1 requires 100 exp, what we'll call the base exp.If a level requires 8% more exp than the previous one, we would have the following:1 - base_exp = 1002 - lvl1 * 1.08 = 100 * 1.08 = 108 (208 total)3 - lvl2 * 1.08 = 108 * 1.08 = 116.64 (324.64 total)4 - lvl3 * 1.08 = 116.64 * 1.08 = 125.9712 (450.6112 total)and so on.My Java is a little rusty, but I'll give it a try.public class level{public static final double base_exp = 100;public static final double exp_increase_per_level = 0.08;public static final int max_level = 99;public static int level (double exp) {int i = 0;//Starting from lvl 0, if you want to start from lvl 1, just initialize to 1double test_exp = base_exp;while ( i < max_level ) { //Test for max_level, replace with while(true) for no maxif (test_exp > exp) { //Check if enough exp for lvl ireturn i; //if so, return the level}//The test failed, so the exp is higher than the necessary for level i.test_exp = test_exp + test_exp * exp_increase_per_level; //Increase it by 8% to test the next leveli++; //Since the test failed, the level is higher}return max_level;//Return when it reach max_level}public static double level_to_exp (int level) {if(level == 1)return base_exp; //return the base_exp when reach the first achievable levelelse {double prev = level_to_exp(level-1); //Computes the previous level exp to calculate this onereturn prev + prev * exp_increase_per_level;}}public static double level_to_total_exp (int level) {if(level == 1)return base_exp; //return the base_exp when reach the first achievable  levelelse {return level_to_total_exp(level-1) + level_to_exp(level-1) * (1 + exp_increase_per_level);}}public static void main(String []args){System.out.println("90 exp is level "+level(90));System.out.println("900 exp is level "+level(900));System.out.println("9'000 exp is level "+level(9000));System.out.println("90'000 exp is level "+level(90000));System.out.println("188'594 exp is level "+level(188594));System.out.println("188'595 exp is level "+level(188595));System.out.println("900'000 exp is level "+level(900000));System.out.println("To level 3, "+level_to_exp(3)+" exp");System.out.println("To level 30, "+level_to_exp(30)+" exp");System.out.println("To level 99, "+level_to_exp(99)+" exp");System.out.println("Total exp to level 4, "+level_to_total_exp(4)+" accumulated");}}This is the output:90 exp is level 0900 exp is level 299'000 exp is level 5990'000 exp is level 89188'594 exp is level 98188'595 exp is level 99900'000 exp is level 99To level 3, 116.64 expTo level 30, 931.7274897290217 expTo level 99, 188594.07204572056 expTotal exp to level 4, 450.6112 accumulated;Your equation for xp needed for a particular level is: xp = 100*1.08^level  (Same formula as "compound interest") So turning that around should be: level = ln(xp/100) / ln(1.08)  (Using algebraic rules for exponents ) Java code: float level = Math.log(xp/100) / Math.log(1.08);;Your equation for xp needed for a particular level is: xp = 100*1.08^level So turning that around should be: level = ln(xp/100) / ln(1.08) You can use Math.log for that.It's actually xp = 100*1.08^(level-1). To go from level 0 to level 1, you only need (say) 100 exp, which is a base, so base*1.08^0 = base. To go from lv1 to lv2, you need 100*1.08 extra, which is 100*1.08^(2-1) = ... = 108.When you sum those up, you get something like total_xp_for_level = base*(level - 1 + 1.08^(level-1)). So if you use L as the target level, M as the modifier (1.08 in this case), B as the base exp for level 1 (100 in this case) an T as the total exp for level L, turning that around, i got to:L + pow(M, L-1) = 1+ T/Band i was lazy to continue. :);Ah, thats true. You can just add that after to offset the numbers though: xp = 100*1.08^(level-1)  => xp/100 = 1.08^(level-1) => level - 1 = ln(xp/100) / ln(1.08) => level = ln(xp/100) / ln(1.08) + 1;Thanks. I'll implement that as soon as I can.