Jump to content
Sign in to follow this  
The Greenhorn

Prevent font size change in HP/MP/TP Bars?

Recommended Posts

I'm picking around in Window_Base, looking for whatever code tells the game when to make the numbers for the HP/MP/TP bars smaller once it's three digits, and I can't seem to find it. If at all possible, I'd like to keep it doing that once the number is four digits long, but at three, with the font I'm using, it just makes everything look squashed while there's still plenty of room.

 

I'd also like to do the same thing for the "HP" "MP" and "TP" text, as well, if possible.

 

So as an example, right now it might look like

HP    1000/1000
MP           99/99

TP         100/100

 

But what I want it to look like is

HP       1000/1000
MP             99/99

TP         100/100

 

Is that doable without a script?

Edited by The Greenhorn

Share this post


Link to post
Share on other sites

Yes it should be doable without a script, you'll have to edit some things in base scripts.

What do you exactly want to have?

Share this post


Link to post
Share on other sites

So... when there are 2 digits - normal size and if there's more then smaller?

For example

HP 325/421

MP 45/60

TP 100/100

Something like this? 

Share this post


Link to post
Share on other sites

Aaahh! Now I understand! *lol I'm thinking slower today, because haven't sleep today*

Go to:

Window_Base

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) #current value
    else
      draw_text(xr - 92, y, 42, line_height, current, 2) #also current value
      change_color(color2)
      draw_text(xr - 52, y, 12, line_height, "/", 2) # "/" mark
      draw_text(xr - 42, y, 42, line_height, max, 2) # max value
    end
  end

And increase 42 / 12 numbers to make it fit.

For example change:

draw_text(xr - 92, y, 42, line_height, current, 2) #also current value

to:

draw_text(xr - 92, y, 70, line_height, current, 2) #also current value

and change this in all lines, I marked them for you so you can see what each line does.

It should work, but I can be mistaking - always worth trying.

Share this post


Link to post
Share on other sites

Okay, cool, that got it working for the status screen. But it's still doing it in battle, and on things like character level.

 

Is there any way to just disable the 'squash text to width' thing entirely? It's doing more harm than good with this font, I'd rather just bugtest and keep a close eye on max values/string lengths.

 

Or will I have to go through each 'width' entry in the code individually and make sure it fits?

 

Edit I did all the manual changes, but I'd still like to know if it's possible, in case there's some that I missed.

Edited by The Greenhorn

Share this post


Link to post
Share on other sites

*Lights went out when I was typing*

I see you have found these thingies, so 'saved content' is useless now. =P

-----------------------------------------

Perhaps there is a way to do that, but keep in mind it is squashed, because there's no room. So either it'll be squashed or cut off. You need to increase their 'room' to make them able to be fully displayed.

The things you've changed is called 'width' so basically you're giving them more room. Game automatically squishes text, to prevent from cut-off. (but if squished text doesn't fit, then it's cut off anyway)

It is possible to disable that I think, but anyway it'll be just cut off when out of space.

Edited by Rikifive

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted