Converting HP bar to percentage

Instead of showing 3000/3000 HP with a bar I'd like to show a percentage only (1-100%).
What if we've never played Halo?


If you need this to be done with, or to work with, another script, please provide a link to the script (that does not mean copying and pasting the script into your post).
class Window_Base < Window #-------------------------------------------------------------------------- # * Draw HP #-------------------------------------------------------------------------- def draw_actor_hp(actor, x, y, width = 124) change_color(normal_color) draw_text(x, y, width, line_height, "#{(actor.hp_rate * 100).to_i}%", 2) endendLike that?
class Window_Base < Window #-------------------------------------------------------------------------- # * Draw HP #-------------------------------------------------------------------------- def draw_actor_hp(actor, x, y, width = 124) change_color(normal_color) draw_text(x, y, width, line_height, "#{(actor.hp_rate * 100).to_i}%", 2) endendLike that?
I kind of love you.

This is somewhat unrelated but using that script can you have HP regenerate when out of combat? Say 6% every second?
How would I go about showing HP as a percentage in the field?

Original thread: https://forums.rpgmakerweb.com/threads/converting-hp-bar-to-percentage.34169/