Problem with HP display and gauge size

Discussion in 'RPG Maker VX Ace' started by CuddleFox, May 9, 2019.

    Tags:
  1. CuddleFox

    CuddleFox Furry Veteran

    Messages:
    69
    Likes Received:
    33
    Location:
    France
    First Language:
    French
    Primarily Uses:
    RMVXA
    Hi. It's me again.

    Something's bothering me about VX Ace. When the text is too wide for the window in which it is located, it is overwritten on the width. In my game, characters can have more than 9999 HP, and the number becomes unreadable. I would like to know if there is a way to remove the term "HP", to gain additional space? Or remove the term "MP" and reduce the size of the MP gauge to enlarge the HP gauge?

    Thank you in advance ^^
     
    #1
  2. TheoAllen

    TheoAllen Self-proclaimed jack of all trades Veteran

    Messages:
    4,455
    Likes Received:
    5,048
    Location:
    Riftverse
    First Language:
    Indonesian
    Primarily Uses:
    RMVXA
    Can you just remove the HP terms in Database --> Terms tab?
     
    #2
  3. CuddleFox

    CuddleFox Furry Veteran

    Messages:
    69
    Likes Received:
    33
    Location:
    France
    First Language:
    French
    Primarily Uses:
    RMVXA
    I've already tried that. This does not change the size of the area on which the text is written.
     
    #3
  4. gstv87

    gstv87 Veteran Veteran

    Messages:
    1,800
    Likes Received:
    829
    First Language:
    Spanish
    Primarily Uses:
    RMVXA
    main status window or battle status?
     
    #4
  5. CuddleFox

    CuddleFox Furry Veteran

    Messages:
    69
    Likes Received:
    33
    Location:
    France
    First Language:
    French
    Primarily Uses:
    RMVXA
    All right, thank you. I got what I wanted.

    In case others have this display problem. I edited Window_BattleStatus, lines 107-109
    Code:
      def draw_gauge_area_without_tp(rect, actor)
        draw_actor_hp(actor, rect.x + 0, rect.y, 150)
        draw_actor_mp(actor, rect.x + 160,  rect.y, 60)
    And Window_Base lines 481-501
    Code:
      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 - 121, y, 60, line_height, current, 2)
          change_color(color2)
          draw_text(xr - 64, y, 12, line_height, "/", 2)
          draw_text(xr - 57, y, 60, line_height, max, 2)
        end
      end
      #--------------------------------------------------------------------------
      # * Draw HP
      #--------------------------------------------------------------------------
      def draw_actor_hp(actor, x, y, width = 142)
        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)
    Thank you for your help and suggestions ^^

    This is the rendering I was looking for : [​IMG]
     
    #5

Share This Page