[ASK] RGSS3 EXP PERCENT

hy guys, im new here
my name is Darken
I want to ask about exp percentage

[IMG]http://i39.servimg.com/u/f39/18/13/24/37/gambar10.jpg[/IMG]

this is about the exp status

usually the exp menu counts the total exp,

example:

 level 4 = 2500

 next level = 5000

 usually is like that

 

now i want to ask, how to calculate the percentage "%"

example :

level 4 = 2500 ( in the database ) 

next level = 5000 ( in the database ) 

 

so at the end it will count as 50%

 

every reply will much appreciated

thanks in advice 

sorry, bad english 😀
Current XP / Needed XP for level * 100?

Or you want to calculate for only the current level?
i want to calculate for the current level

so, to next level, exp player must be 100% to next level

if level up, exp can be recalculating from 0%
Then, (actor.exp - actor.current_level_exp) / (actor.next_level_exp - actor.current_level_exp) * 100
calculating percentage (%) ? 

i mean, like this :

( screenshot ) sorry my image too large

[IMG]http://i39.servimg.com/u/f39/18/13/24/37/gambar11.jpg[/IMG]
Yes, my formula works then.

(Current XP - XP needed for this level) / (XP needed for next level - XP needed for this level) * 100

E.g. your character is level 2 with 110 XP total. And for level you need 162XP total, and to reach level 2 required 50XP.

(110 - 50) / (162 - 50) * 100 = 60/112 * 100 = 53.56% of the current level.
[edited]

i understand, your formula is good, but I can't to make the script

sorry, im not coder 😀
please gift me script
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/ask-rgss3-exp-percent.28271/