RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Making HUD information smaller

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 75
What the...?
I'm trying to edit Jens009's Simple HUD in order to fit all the party members info on the screen.  There are 6 members in the party and when the 5th one enters the game, half the information of his HUD is cut off the side of the screen.  I'm able to manage the HUD a little by manipulating x and y positioning, but I encounter a problem when I try to maneuver around the hp/mp bars.   They're just too big and overlap each other.  So, I was wondering what I needed to add/remove/edit in order to fit them nicely.
      This will more than likely consist of shrinking (re-scaling) the bars and removing the numerical values and "HP"/"MP" words that are displayed with them when calling draw_actor_hp/mp.  Or, erasing the bars altogether and just using the "HP"/"MP" followed by the numerical values.
       So, is there a way to do this?  Is there a way to call draw_actor_hp/mp without calling the oversided default bars into play? 
       I looked at Modern_Algebra's FullStatusCMS as an example of the perfect solution.  In that script, he uses two very compact bars turned vertically to show the actors in a window_selectable.  This would easily allow me to fit what I need where I need it.
        Here's three screenshots to give you an idea of the problem, my edits, and MA's script at work in the menu (notice the sprite images and the small hp/mp bars at the top.)

Spoiler for:

Spoiler for:

Spoiler for:
« Last Edit: September 28, 2010, 08:37:04 PM by IXFURU »

***
Rep:
Level 75
What the...?
You can close this.  After a day and a half of messing around with the script and comparing it to other scripts, then doing all that again I dare say a hundred times, I finally got it.   If this HUD looks like something others could use, I will gladly share my editted version of Jens009's script.  Anyway, in case you're interested, here's the finished product:

Spoiler for:

See, it's all neat and fits well enough so now the 6th party member will have room, too.   
« Last Edit: September 28, 2010, 08:34:19 PM by IXFURU »

**
Rep: +0/-0Level 75
RMRK Junior
I'd definitely like to use the finish product if you don't mind. Looks wonderful, great work!

***
Rep:
Level 75
What the...?
Okay.  I got the warning.  But I feel like a jerk for not visiting this topic since Skias replied.  So, to make it right I need to add this new version of the script so that others may find it and be able to use it, as he/she intended to do.

Sorry, Skias.

Again, this is my edit of Jens009's Simple HUD script which compacts it and allows for up to 6 actor HUDS to be displayed.  Also, it does away with the States part of it.  Screenshot is above in my previous post.

Code: [Select]
#============================================================================
# Jens009 Simple HP/SP/State HUD
# Version 2.0
# Release Date: August 11,2008
# Description: Display an HP/SP and State HUD information in map.
# Compatibility: Should be compatible with any system
# Configuration:
#   I. Turning off the HUD in game
#       use the call script $game_system.show_hud = true/false
#           true = show HUD, false = disable HUD
#   II. Changing maximum information shown
#        look at SHOW_MAX under JCONFIG, you can change the value to show
#        how many of the actors in the party to display their information
#        by default, it is set to show only 2 actors.
#   III. Changing maximum information shown in game
#        use the call script JCONFIG::SHOW_MAX = *integer*
#        You can change the amount of actors displayed in the HUD in game.
#        simply change integer to the value you want.
#   IV.  Changing Update methods
#        if you want the HUD to always update, set ALWAYS_UPDATE_HUD to true
#        but if you want to only update the HUD whenever you want to, set
#        this to false.
#        When $game_sysyem.always_update is false, you can update the hud
#        manually in game using the call script $game_system.refresh_hud = true.
#        this will refresh the hud information once.
#        However, you can also switch between always updating the HUD and
#        only updating the hud once during in game.
#        Simply use the call script:
#           $game_sysyem.always_update = true/false
#        and to reupdate once
#           $game_system.refresh_hud = true
#
# Optimization to achieve higher FPS
#    1) Set SHOW_MAX to a low value
#    You can also:
#    2) Set $game_sysyem.always_update = false
#      2.1) Use $game_temp.refresh_hud = true to reupdate the hud manually.
#============================================================================
module JCONFIG
  SHOW_MAX = 6 # By default, show 4 actor's information
end

#======================================
# Game_System edit
#=====================================
class Game_System
  # Add new instance
  attr_accessor :refresh_hud
  attr_accessor :show_hud
  attr_accessor :always_update
  alias jens009_initialize_hud initialize
  def initialize
    # Initialize instances
    @show_hud = true
    @always_update = true
    @refresh_hud = false
    # Call default methods
    jens009_initialize_hud
  end
 
end

#=============================================================================
# Window Hud < Window_Base
# Description: Handles Information to be shown in HUD
#=============================================================================

class Window_Hud < Window_Base
#==========================
# Initialize Values
#==========================
  def initialize
    super(0,0,544,110)
    self.opacity = 0
    self.visible = false if $game_system.show_hud == false
    refresh
  end
#=========================
# Create Information
#===========================
 
  def refresh
    self.contents.clear
    @item_max = JCONFIG::SHOW_MAX
    @party_size = $game_party.members.size
      for actor in $game_party.members
        x = actor.index * 80
        y = 0
        if actor.index < @item_max
          draw_actor_information(actor, x, y)
        end
      end
    end
 
  def draw_actor_information(actor, x, y)
    draw_actor_name (actor, x, y + 0)
    draw_actor_graphic(actor, x + 15, y + 60)
    draw_actor_hp_gauge(actor, x + 30, y + 16, 38)
    draw_actor_mp_gauge(actor, x + 30, y + 26, 38)
  end
   
#================================= 
# Define Update
#====================================
  def update
    refresh
  end

end
#===============================
# Start Scene_Map edit
#===============================
class Scene_Map
  # Alias methods main, update and terminate
  alias jens009_hud_main main
  alias jens009_hud_update update
  alias jens009_hud_terminate terminate
  # Edit Main
  def main
    # Call HUD
    @hud = Window_Hud.new
    # Call previous Methods
    jens009_hud_main
  end

  # Edit Update
  def update
    # Update hud only if $game_system.show_hud is true
    if $game_system.show_hud and $game_system.always_update
      @hud.update
    end
   
    if $game_system.refresh_hud == true
        @hud.update
       $game_system.refresh_hud = false
    end
   
    if $game_system.show_hud == true
      @hud.visible = true
    else
      @hud.visible = false
    end
    # Call previous methods
    jens009_hud_update
  end

  # Edit Terminate
  def terminate
    # Call previous methods, dispose of other windows first before HUD
    jens009_hud_terminate
    # Dispose HUD
    @hud.dispose
  end

#========================
# End of Scene_Map edit
#========================
end
« Last Edit: March 18, 2011, 04:25:34 PM by IXFURU »

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
You should make a script topic for it and put it in the Database. I am sure lots of people would like to use such a pleasing little script.