Thanks for the quick answer OneDollar, it looks like you are applying a kind of % and it made me think of one way,
If i have:
Level up happens every 1000xp and max xp is 100 000 at lv100 :
Code: ags
This way the xp you gain is a percentage of the enemy base xp, lv30 will get -30% of the enemy's base xp, lv 8 will get -8%.
So if i have for example:
Code: ags
Maybe you were thinking about the same thing but i didnt get it sorry i'm so bad at maths and i'm french so it's even harder to get everything you told me...
Do you think it is appropriate? I just want it to look like xp gain is decreasing as you level up to avoid farming the same mob over and over and get the same xp whatever your lv is, thanks again.
If i have:
Level up happens every 1000xp and max xp is 100 000 at lv100 :
current_lv = current_xp / 1000;
gained_xp = enemy_xp - ( (current_lv * enemy_xp) / max_lv);
This way the xp you gain is a percentage of the enemy base xp, lv30 will get -30% of the enemy's base xp, lv 8 will get -8%.
So if i have for example:
enemy_xp = 500;
current_lv = 25; // max is 100 but it works fo any number
gained_xp = 500 - ( (25*500) / 100) );
gained_xp = 500 - 125;
gained_xp = 375;
Maybe you were thinking about the same thing but i didnt get it sorry i'm so bad at maths and i'm french so it's even harder to get everything you told me...
Do you think it is appropriate? I just want it to look like xp gain is decreasing as you level up to avoid farming the same mob over and over and get the same xp whatever your lv is, thanks again.