Editing HP display in the status menu

Hey, everyone! This is kind of a minor thing, but is it possible to change the way HP, and MP, are displayed in a character's status menu? I'm using YEA's Adjust Limits script to break 9999 HP, but beyond that, the numbers get squished. This is what I mean:

tb2j.png


I wanna make it so it's written out properly (and only shrinks when/if HP hits 100,000 and beyond). I've been looking around the Window_Base and Adjust Limits scripts and I'm getting it in my mind that I have to tamper with this bit from Window_Base:

  #--------------------------------------------------------------------------  # * Draw Current Value/Maximum Value in Fractional Format  #     current : Current value  #     max     : Maximum value  #     color1  : Color of current value  #     color2  : Color of maximum value  #--------------------------------------------------------------------------  def draw_current_and_max_values(x, y, width, current, max, color1, color2)    change_color(color1)    xr = x + width    if width < 96      draw_text(xr - 40, y, 42, line_height, current, 2)    else      draw_text(xr - 92, y, 42, line_height, current, 2)      change_color(color2)      draw_text(xr - 52, y, 12, line_height, "/", 2)      draw_text(xr - 42, y, 42, line_height, max, 2)    end  end  #--------------------------------------------------------------------------  # * Draw HP  #--------------------------------------------------------------------------  def draw_actor_hp(actor, x, y, width = 124)    draw_gauge(x, y, width, actor.hp_rate, hp_gauge_color1, hp_gauge_color2)    change_color(system_color)    draw_text(x, y, 30, line_height, Vocab::hp_a)    draw_current_and_max_values(x, y, width, actor.hp, actor.mhp,      hp_color(actor), normal_color)The reason I think this is because I took Adjust Limits and made a new project, set my Max, and Initial, Level at 160, and my HP was about 11,6xx and ended up the same way, so I don't think it's being influenced by any of my main project's scripts.

Any help is appreciated~
If you want to change it everywhere and make it wider, you are going to want to change the width = 124 line in the def draw_actor_hp line to a larger number.
Really? I've tried doing that just now; I've set it to 184, 200, 2500, and just now to 100000, but nothing's changed.

[Edit] Took it to a new project and found that that's actually changing the width of the HP bar and not the HP text.
You're actually right about the functions you posted from Window_Base.

draw_text draws out a rectangle and formats the text to fit inside it (to a certain extent). Changing the width value (draw_text(x, y, width, height, text)) to a larger number should work.

In your case look at this part of draw_current_and_max_values:

else draw_text(xr - 92, y, 42, line_height, current, 2) change_color(color2) draw_text(xr - 52, y, 12, line_height, "/", 2) draw_text(xr - 42, y, 42, line_height, max, 2)endand change it to

else new_width = 60 # or whatever works via trial and error, some value > 42 draw_text(xr - 92, y, new_width, line_height, current, 2) change_color(color2) draw_text(xr - 52, y, 12, line_height, "/", 2) draw_text(xr - 42, y, new_width, line_height, max, 2)endHope that helps!

Cheers,

Duncan
Hm. I gave that a try. I made the value 60, 85, 250, 100000, even 16500000, but there was no change. I did this in a new project with Adjust Limits in effect, by the way.
O.O weird, I got it to work in a new project with Adjust Limits.

Try putting this under Ajust Limits:

class Window_Base < Window #-------------------------------------------------------------------------- # * Draw Current Value/Maximum Value in Fractional Format # current : Current value # max : Maximum value # color1 : Color of current value # color2 : Color of maximum value #-------------------------------------------------------------------------- def draw_current_and_max_values(x, y, width, current, max, color1, color2) change_color(color1) xr = x + width if width < 96 draw_text(xr - 40, y, 42, line_height, current, 2) else draw_text(xr - 92, y, 60, line_height, current, 2) change_color(color2) draw_text(xr - 52, y, 12, line_height, "/", 2) draw_text(xr - 42, y, 60, line_height, max, 2) end endendYou'll probably need to adjust the x values as well to make it work nicely.
Oh, that worked! I'll have to adjust it, but the text is bigger now. Thanks, Duncan~ 😀

[Edit] With a further test, having 100,000 HP+ causes the text to shrink, just as I wanted. Worked like a charm~
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/editing-hp-display-in-the-status-menu.18299/