Help - Search - Members - Calendar
Full Version: Advanced HUD
RPG RPG Revolution Forums > Scripting > Script Tutorials > RGSS2
Kendorei
Version 1.1
By: Kendorei
Released: 1/27/09

Exclusive to RRR

This is a HUD System made to be customizable. This is used to show the basic stats of actors.

Features:
  1. Displays Name, HP, SP, EXP, and Level by default
  2. Possible to change the font style for the HUDs
  3. Shows up to 4 HUDs by default
  4. Can show up to 8 HUDs for large parties
  5. Can be toggled with the A key by default
  6. Customizable colors
  7. No lag
  8. Customizable terms
  9. Possible to use shadowed text
  10. Possible to set the HUD windowskin to a separate windowskin
  11. Possible to vertically stack the HUDs


The Script:
[Show/Hide] Version 1.1 Script
CODE
#============================================================
#                Kendorei's Advanced HUD v1.1
#------------------------------------------------------------
# ** Author:  Kendorei
#============================================================

#============================================================
#  ** Game_System
#============================================================
class Game_System
  attr_accessor  :hud_windowskin
  attr_accessor  :font
  attr_accessor  :font_size
  attr_accessor  :shadowed_text
  attr_accessor  :level_color
  attr_accessor  :hp_color
  attr_accessor  :sp_color
  attr_accessor  :exp_color
  attr_accessor  :other_color
  attr_accessor  :hud_switch
  attr_accessor  :level_word
  attr_accessor  :hp_word
  attr_accessor  :sp_word
  attr_accessor  :exp_word
  attr_accessor  :large_party
  attr_accessor  :vert_hud
  
  alias hud_initialize initialize
  
  def initialize
    hud_initialize
    #=======================================================
    #       **   **   *  *  ****  ***   **
    #      *    *  *  ** *  *      *   *  
    #      *    *  *  * **  **     *   *  **
    #       **   **   *  *  *     ***   ***
    #=======================================================
    # You can change the font style and terms in-game using:
    # Font:   $game_system.font = "Font"
    # Terms:  $game_system.x_word = y  Where x is the term to change, and y
    # is the new word.
    # Examples:
    # Font:   $game_system.font = "FangSong"
    # Term:   $game_system.sp_word = "Mana"
    #-------------------------------------------------------
    
    #-----------------------------
    # ** HUD Windowskin
    #-----------------------------
    # Change the line below to the name of windowskin you want for the HUD.
    #-----------------------------
    @hud_windowskin = "001-Blue01"
    
    #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    #  ** Font Config
    #-----------------------------
    # Change the line below to a font style you wish to use.
    # eg. @font = "Arial"
    #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    @font = "Arial"
    #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # Set this line to the size you want to use for the font.
    #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    @font_size = 15
    #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # Set this line to true to use shadowed text
    #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    @shadowed_text = true
    
    #--------------------
    # ** Colors Config
    #--------------------
    # This is a list of colors that you can use for the text in the HUD.
    # You can add more with 'Color.new(R, B, G)'.
    # Set the @colors to whichever colors you want.
    #--------------------
    @level_color = sky_blue
    @hp_color    = red
    @sp_color    = blue
    @exp_color   = green
    @other_color = white
    #--------------------
    
    #--------------------
    #  ** Teh Switch!
    #--------------------
    # Use '$game_system.hud_switch = true' or 'false' to turn the HUD on or off.
    #--------------------
    @hud_switch = false
    
    #--------------------
    # ** Terms
    #--------------------
    # You can change the terms for "Lv", "HP", "SP", and "XP" here.
    #--------------------
    @level_word = "Lv"
    @hp_word    = "HP"
    @sp_word    = "SP"
    @exp_word   = "XP"
    #--------------------
    
    #--------------------
    # ** Large Party?
    #--------------------
    # If you have more than 4 members possible and want to show up to 8 HUDs,
    # make this line true.
    #--------------------
    @large_party = false

    #--------------------
    # ** Vertical HUDs
    #--------------------
    # If you want the HUDs to be stacked vertically along the right side of the screen,
    # set this to true
    #--------------------
    @vert_hud = false
    
    #=======================================================
    #  ***  *  *  ***       **   **   *  *  ****  ***   **
    #  **   ** *  *  *     *    *  *  ** *  *      *   *
    #  *    * **  *  *     *    *  *  * **  **     *   * **
    #  ***  *  *  ***       **   **   *  *  *     ***   **
    #=======================================================
  end
  
  #--------------------
  # ** Colors List
  #--------------------
  def orange
    return Color.new(218, 83, 2)
  end

  def yellow
    return Color.new(191, 218, 2)
  end

  def green
    return Color.new(30, 218, 2)
  end

  def sea_green
    return Color.new(2, 218, 136)
  end

  def sky_blue
    return Color.new(2, 218, 216)
  end

  def blue
    return Color.new(2, 58, 218)
  end

  def blue_violet
    return Color.new(108, 2, 218)
  end

  def violet
    return Color.new(188, 2, 218)
  end

  def red_violet
    return Color.new(218, 2, 167)
  end

  def red
    return Color.new(218, 2, 5)
  end

  def black
    return Color.new(0, 0, 0)
  end

  def dark_gray
    return Color.new(102, 102, 102)
  end

  def gray
    return Color.new(204, 204, 204)
  end

  def light_gray
    return Color.new(245, 245, 245)
  end

  def white
    return Color.new(255, 255, 255)
  end
end

#============================================================
#  ** KenHUD
#============================================================
class KenHUD < Window_Base

  attr_accessor  :actor  # Actor

  #------------------------------------
  # ** Initialization
  #     actor  :  actor in the party
  #------------------------------------
  def initialize(actor)
    @actor_pos = actor
    @actor = $game_party.actors[@actor_pos]
    super(0, 0, 132, 92)
    @hud_windowskin = $game_system.hud_windowskin
    self.windowskin = RPG::Cache.windowskin(@hud_windowskin)
    self.opacity  = 140
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.size = $game_system.font_size
    self.contents.font.name = $game_system.font
    @shadowed_text = $game_system.shadowed_text
    @level_color   = $game_system.level_color
    @hp_color      = $game_system.hp_color
    @sp_color      = $game_system.sp_color
    @exp_color     = $game_system.exp_color
    @normal_color  = $game_system.other_color
    @hud_switch    = $game_system.hud_switch
    self.visible   = @hud_switch
    @level_word    = $game_system.level_word
    @hp_word       = $game_system.hp_word
    @sp_word       = $game_system.sp_word
    @exp_word      = $game_system.exp_word
    unless @actor == nil
      @name  = @actor.name
      @level = @actor.level
      @hp    = @actor.hp
      @maxhp = @actor.maxhp
      @sp    = @actor.sp
      @maxsp = @actor.maxsp
      @exp   = @actor.exp
      @nexp  = @actor.next_exp_s
      refresh
    else
      no_actor
    end
  end
  
  #------------------------------------
  # ** Shadow Text Color
  #------------------------------------
  def shadow
    return Color.new(0, 0, 0, 100)
  end

  #------------------------------------
  # ** No Actor
  #------------------------------------
  def no_actor
    self.contents.clear
    self.opacity = 0
  end

  #------------------------------------
  # ** Refresh
  #------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = @level_color
    self.contents.draw_text(10, 0, 100, 15, @level_word, 1)
    self.contents.font.color = @hp_color
    self.contents.draw_text(0, 15, 100, 15, @hp_word)
    self.contents.font.color = @sp_color
    self.contents.draw_text(0, 30, 100, 15, @sp_word)
    self.contents.font.color = @exp_color
    self.contents.draw_text(0, 45, 100, 15, @exp_word)
    self.contents.font.color = @normal_color
    self.contents.draw_text(0, 0,  100, 15, @name.to_s)
    self.contents.draw_text(0, 0,  100, 15, @level.to_s, 2)
    self.contents.draw_text(0, 15, 100, 15, @hp.to_s+" /", 1)
    self.contents.draw_text(0, 15, 100, 15, @maxhp.to_s, 2)
    self.contents.draw_text(0, 30, 100, 15, @sp.to_s+" /", 1)
    self.contents.draw_text(0, 30, 100, 15, @maxsp.to_s, 2)
    self.contents.draw_text(0, 45, 100, 15, @exp.to_s+" /", 1)
    self.contents.draw_text(0, 45, 100, 15, @nexp.to_s, 2)
    if @shadowed_text == true
      self.contents.font.color = shadow
      self.contents.draw_text(12, 2, 100, 15, @level_word, 1)
      self.contents.draw_text(2, 17, 100, 15, @hp_word)
      self.contents.draw_text(2, 32, 100, 15, @sp_word)
      self.contents.draw_text(2, 47, 100, 15, @exp_word)
      self.contents.draw_text(2,  2, 100, 15, @name.to_s)
      self.contents.draw_text(2,  2, 100, 15, @level.to_s, 2)
      self.contents.draw_text(2, 17, 100, 15, @hp.to_s+" /", 1)
      self.contents.draw_text(2, 17, 100, 15, @maxhp.to_s, 2)
      self.contents.draw_text(2, 32, 100, 15, @sp.to_s+" /", 1)
      self.contents.draw_text(2, 32, 100, 15, @maxsp.to_s, 2)
      self.contents.draw_text(2, 47, 100, 15, @exp.to_s+" /", 1)
      self.contents.draw_text(2, 47, 100, 15, @nexp.to_s, 2)
    end
  end

  #------------------------------------
  # ** Update
  #------------------------------------
  def update
    @actor = $game_party.actors[@actor_pos]
    if (self.contents.font.name != $game_system.font)        or
       (self.contents.font.size != $game_system.font_size)   or
       (@level_color            != $game_system.level_color) or
       (@hp_color               != $game_system.hp_color)    or
       (@sp_color               != $game_system.sp_color)    or
       (@exp_color              != $game_system.exp_color)   or
       (@normal_color           != $game_system.other_color) or
       (@level_word             != $game_system.level_word)  or
       (@hp_word                != $game_system.hp_word)     or
       (@sp_word                != $game_system.sp_word)     or
       (@exp_word               != $game_system.exp_word)    or
       (@shadowed_text          != $game_system.shadowed_text)
      self.contents.font.name = $game_system.font
      self.contents.font.size = $game_system.font_size
      @shadowed_text = $game_system.shadowed_text
      @level_color   = $game_system.level_color
      @hp_color      = $game_system.hp_color
      @sp_color      = $game_system.sp_color
      @exp_color     = $game_system.exp_color
      @normal_color  = $game_system.other_color
      @level_word    = $game_system.level_word
      @hp_word       = $game_system.hp_word
      @sp_word       = $game_system.sp_word
      @exp_word      = $game_system.exp_word
      if @actor != nil
        refresh
      elsif @actor == nil
        no_actor
      end
    end
    if @actor != nil
      if (@name   != @actor.name)       or
         (@level  != @actor.level)      or
         (@hp     != @actor.hp)         or
         (@maxhp  != @actor.maxhp)      or
         (@sp     != @actor.sp)         or
         (@maxsp  != @actor.maxsp)      or
         (@exp    != @actor.exp)        or
         (@nexp   != @actor.next_exp_s) or
         (@hud_switch != $game_system.hud_switch)
        @hud_switch  = $game_system.hud_switch
        self.visible = @hud_switch
        self.opacity = 140
        unless @actor == nil
          @name  = @actor.name
          @level = @actor.level
          @hp    = @actor.hp
          @maxhp = @actor.maxhp
          @sp    = @actor.sp
          @maxsp = @actor.maxsp
          @exp   = @actor.exp
          @nexp  = @actor.next_exp_s
          refresh
        else
          no_actor
        end
      end
    elsif @actor == nil
      no_actor
    end
  end
end

#=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

#============================================================
# ** Scene_Map
#============================================================
class Scene_Map

  #------------------------------------
  # ** Alias Listing
  #------------------------------------
  alias initialize_hud_now main
  alias update_hud_now update
  #------------------------------------
  
  def main
    @vert_hud = $game_system.vert_hud
    @large_party = $game_system.large_party
    
    if (@large_party == false) and (@vert_hud == false)
      @hud_window1 = KenHUD.new(0)
      @hud_window2 = KenHUD.new(1)
      @hud_window3 = KenHUD.new(2)
      @hud_window4 = KenHUD.new(3)
      @hud_window1.x = 26
      @hud_window2.x = 178
      @hud_window3.x = 330
      @hud_window4.x = 482
    elsif (@large_party == true) and (@vert_hud == false)
      @hud_window1 = KenHUD.new(0)
      @hud_window2 = KenHUD.new(1)
      @hud_window3 = KenHUD.new(2)
      @hud_window4 = KenHUD.new(3)
      @hud_window5 = KenHUD.new(4)
      @hud_window6 = KenHUD.new(5)
      @hud_window7 = KenHUD.new(6)
      @hud_window8 = KenHUD.new(7)
      @hud_window1.x = 26
      @hud_window2.x = 178
      @hud_window3.x = 330
      @hud_window4.x = 482
      @hud_window5.x = 26
      @hud_window6.x = 178
      @hud_window7.x = 330
      @hud_window8.x = 482
      @hud_window5.y = 135
      @hud_window6.y = 135
      @hud_window7.y = 135
      @hud_window8.y = 135
    elsif (@large_party == false) and (@vert_hud == true)
      @hud_window1 = KenHUD.new(0)
      @hud_window2 = KenHUD.new(1)
      @hud_window3 = KenHUD.new(2)
      @hud_window4 = KenHUD.new(3)
      @hud_window1.y = 0
      @hud_window2.y = 135
      @hud_window3.y = 270
      @hud_window4.y = 405
    elsif (@large_party == true) and (@vert_hud == true)
      @hud_window1 = KenHUD.new(0)
      @hud_window2 = KenHUD.new(1)
      @hud_window3 = KenHUD.new(2)
      @hud_window4 = KenHUD.new(3)
      @hud_window5 = KenHUD.new(4)
      @hud_window6 = KenHUD.new(5)
      @hud_window7 = KenHUD.new(6)
      @hud_window8 = KenHUD.new(7)
      @hud_window1.y = 0
      @hud_window2.y = 135
      @hud_window3.y = 270
      @hud_window4.y = 405
      @hud_window5.y = 0
      @hud_window6.y = 135
      @hud_window7.y = 270
      @hud_window8.y = 405
      @hud_window5.x = 100
      @hud_window6.x = 100
      @hud_window7.x = 100
      @hud_window8.x = 100
    end
    initialize_hud_now
    if @large_party == false
      @hud_window1.dispose
      @hud_window2.dispose
      @hud_window3.dispose
      @hud_window4.dispose
    elsif @large_party == true
      @hud_window1.dispose
      @hud_window2.dispose
      @hud_window3.dispose
      @hud_window4.dispose
      @hud_window5.dispose
      @hud_window6.dispose
      @hud_window7.dispose
      @hud_window8.dispose
    end
  end

  def update
    update_hud_now
    if @large_party == false
      @hud_window1.update
      @hud_window2.update
      @hud_window3.update
      @hud_window4.update
    elsif @large_party == true
      @hud_window1.update
      @hud_window2.update
      @hud_window3.update
      @hud_window4.update
      @hud_window5.update
      @hud_window6.update
      @hud_window7.update
      @hud_window8.update
    end
    # By default controls, hit the A button on the keyboard to switch the HUD on/off.
    if Input.trigger?(Input::X)
      unless $game_system.map_interpreter.running?
        $game_system.se_play($data_system.decision_se)
        if $game_system.hud_switch == true
          $game_system.hud_switch = false
        elsif $game_system.hud_switch == false
          $game_system.hud_switch = true
        end
      end
    end
  end
end


Simply change the settings in the Config section to customize this.wink.gif

This should be compatable with most scripts, but not a good idea to use this with another HUD. sweat.gif
Be sure to put this BELOW the SDK if you use it.

Kendorei's Advanced HUD v1.1 Demo

Screenshots:
[Show/Hide] Screenshots




To install this, simply paste it above Main.

Previous Versions:
Version 1.0
[Show/Hide] Version 1.0
CODE
#============================================================
#                Kendorei's Advanced HUD v1.0
#------------------------------------------------------------
# ** Author:  Kendorei
#============================================================

#============================================================
#  ** Game_System
#============================================================
class Game_System
  attr_accessor  :font
  attr_accessor  :font_size
  attr_accessor  :shadowed_text
  attr_accessor  :level_color
  attr_accessor  :hp_color
  attr_accessor  :sp_color
  attr_accessor  :exp_color
  attr_accessor  :other_color
  attr_accessor  :hud_switch
  attr_accessor  :level_word
  attr_accessor  :hp_word
  attr_accessor  :sp_word
  attr_accessor  :exp_word
  attr_accessor  :large_party
  
  alias font_hud_initialize initialize
  
  def initialize
    font_hud_initialize
    #=======================================================
    #       **   **   *  *  ****  ***   **
    #      *    *  *  ** *  *      *   *  
    #      *    *  *  * **  **     *   *  **
    #       **   **   *  *  *     ***   ***
    #=======================================================
    # You can change the font style and terms in-game using:
    # Font:   $game_system.font = "Font"
    # Terms:  $game_system.x_word = y  Where x is the term to change, and y
    # is the new word.
    # Examples:
    # Font:   $game_system.font = "FangSong"
    # Term:   $game_system.sp_word = "Mana"
    #-------------------------------------------------------
    
    #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    #  ** Font Config
    #-----------------------------
    # Change the line below to a font style you wish to use.
    # eg. @font = "Arial"
    #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    @font = "Arial"
    #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # Set this line to the size you want to use for the font.
    #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    @font_size = 15
    #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # Set this line to true to use shadowed text
    #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    @shadowed_text = false
    
    #--------------------
    # ** Colors Config
    #--------------------
    # This is a list of colors that you can use for the text in the HUD.
    # You can add more with 'Color.new(R, B, G)'.
    # Set the @colors to whichever colors you want.
    #--------------------
    @level_color = sky_blue
    @hp_color    = red
    @sp_color    = blue
    @exp_color   = green
    @other_color = white
    #--------------------
    
    #--------------------
    #  ** Teh Switch!
    #--------------------
    # Use '$game_system.hud_switch = true' or 'false' to turn the HUD on or off.
    #--------------------
    @hud_switch = false
    
    #--------------------
    # ** Terms
    #--------------------
    # You can change the terms for "Lv", "HP", "SP", and "XP" here.
    #--------------------
    @level_word = "Lv"
    @hp_word    = "HP"
    @sp_word    = "SP"
    @exp_word   = "XP"
    #--------------------
    
    #--------------------
    # Large Party?
    #--------------------
    # If you have more than 4 members possible and want to show up to 8 HUDs,
    # make this line true.
    #--------------------
    @large_party = false
    
    #=======================================================
    #  ***  *  *  ***       **   **   *  *  ****  ***   **
    #  **   ** *  *  *     *    *  *  ** *  *      *   *
    #  *    * **  *  *     *    *  *  * **  **     *   * **
    #  ***  *  *  ***       **   **   *  *  *     ***   **
    #=======================================================
  end
  
  #--------------------
  # ** Colors List
  #--------------------
  def orange
    return Color.new(218, 83, 2)
  end

  def yellow
    return Color.new(191, 218, 2)
  end

  def green
    return Color.new(30, 218, 2)
  end

  def sea_green
    return Color.new(2, 218, 136)
  end

  def sky_blue
    return Color.new(2, 218, 216)
  end

  def blue
    return Color.new(2, 58, 218)
  end

  def blue_violet
    return Color.new(108, 2, 218)
  end

  def violet
    return Color.new(188, 2, 218)
  end

  def red_violet
    return Color.new(218, 2, 167)
  end

  def red
    return Color.new(218, 2, 5)
  end

  def black
    return Color.new(0, 0, 0)
  end

  def dark_gray
    return Color.new(102, 102, 102)
  end

  def gray
    return Color.new(204, 204, 204)
  end

  def light_gray
    return Color.new(245, 245, 245)
  end

  def white
    return Color.new(255, 255, 255)
  end
end

#============================================================
#  ** KenHUD
#============================================================
class KenHUD < Window_Base

  attr_accessor  :actor  # Actor

  #------------------------------------
  # ** Initialization
  #     actor  :  actor in the party
  #------------------------------------
  def initialize(actor)
    @actor_pos = actor
    @actor = $game_party.actors[@actor_pos]
    super(0, 0, 132, 92)
    self.opacity  = 140
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.size = $game_system.font_size
    self.contents.font.name = $game_system.font
    @shadowed_text = $game_system.shadowed_text
    @level_color   = $game_system.level_color
    @hp_color      = $game_system.hp_color
    @sp_color      = $game_system.sp_color
    @exp_color     = $game_system.exp_color
    @normal_color  = $game_system.other_color
    @hud_switch    = $game_system.hud_switch
    self.visible   = @hud_switch
    @level_word    = $game_system.level_word
    @hp_word       = $game_system.hp_word
    @sp_word       = $game_system.sp_word
    @exp_word      = $game_system.exp_word
    unless @actor == nil
      @name  = @actor.name
      @level = @actor.level
      @hp    = @actor.hp
      @maxhp = @actor.maxhp
      @sp    = @actor.sp
      @maxsp = @actor.maxsp
      @exp   = @actor.exp
      @nexp  = @actor.next_exp_s
      refresh
    else
      no_actor
    end
  end
  
  #------------------------------------
  # ** Shadow Text Color
  #------------------------------------
  def shadow
    return Color.new(0, 0, 0, 100)
  end

  #------------------------------------
  # ** No Actor
  #------------------------------------
  def no_actor
    self.contents.clear
    self.opacity = 0
  end

  #------------------------------------
  # ** Refresh
  #------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = @level_color
    self.contents.draw_text(10, 0, 100, 15, @level_word, 1)
    self.contents.font.color = @hp_color
    self.contents.draw_text(0, 15, 100, 15, @hp_word)
    self.contents.font.color = @sp_color
    self.contents.draw_text(0, 30, 100, 15, @sp_word)
    self.contents.font.color = @exp_color
    self.contents.draw_text(0, 45, 100, 15, @exp_word)
    self.contents.font.color = @normal_color
    self.contents.draw_text(0, 0,  100, 15, @name.to_s)
    self.contents.draw_text(0, 0,  100, 15, @level.to_s, 2)
    self.contents.draw_text(0, 15, 100, 15, @hp.to_s+" /", 1)
    self.contents.draw_text(0, 15, 100, 15, @maxhp.to_s, 2)
    self.contents.draw_text(0, 30, 100, 15, @sp.to_s+" /", 1)
    self.contents.draw_text(0, 30, 100, 15, @maxsp.to_s, 2)
    self.contents.draw_text(0, 45, 100, 15, @exp.to_s+" /", 1)
    self.contents.draw_text(0, 45, 100, 15, @nexp.to_s, 2)
    if @shadowed_text == true
      self.contents.font.color = shadow
      self.contents.draw_text(12, 2, 100, 15, @level_word, 1)
      self.contents.draw_text(2, 17, 100, 15, @hp_word)
      self.contents.draw_text(2, 32, 100, 15, @sp_word)
      self.contents.draw_text(2, 47, 100, 15, @exp_word)
      self.contents.draw_text(2,  2, 100, 15, @name.to_s)
      self.contents.draw_text(2,  2, 100, 15, @level.to_s, 2)
      self.contents.draw_text(2, 17, 100, 15, @hp.to_s+" /", 1)
      self.contents.draw_text(2, 17, 100, 15, @maxhp.to_s, 2)
      self.contents.draw_text(2, 32, 100, 15, @sp.to_s+" /", 1)
      self.contents.draw_text(2, 32, 100, 15, @maxsp.to_s, 2)
      self.contents.draw_text(2, 47, 100, 15, @exp.to_s+" /", 1)
      self.contents.draw_text(2, 47, 100, 15, @nexp.to_s, 2)
    end
  end

  #------------------------------------
  # ** Update
  #------------------------------------
  def update
    @actor = $game_party.actors[@actor_pos]
    if (self.contents.font.name != $game_system.font)        or
       (self.contents.font.size != $game_system.font_size)   or
       (@level_color            != $game_system.level_color) or
       (@hp_color               != $game_system.hp_color)    or
       (@sp_color               != $game_system.sp_color)    or
       (@exp_color              != $game_system.exp_color)   or
       (@normal_color           != $game_system.other_color) or
       (@level_word             != $game_system.level_word)  or
       (@hp_word                != $game_system.hp_word)     or
       (@sp_word                != $game_system.sp_word)     or
       (@exp_word               != $game_system.exp_word)    or
       (@shadowed_text          != $game_system.shadowed_text)
      self.contents.font.name = $game_system.font
      self.contents.font.size = $game_system.font_size
      @shadowed_text = $game_system.shadowed_text
      @level_color   = $game_system.level_color
      @hp_color      = $game_system.hp_color
      @sp_color      = $game_system.sp_color
      @exp_color     = $game_system.exp_color
      @normal_color  = $game_system.other_color
      @level_word    = $game_system.level_word
      @hp_word       = $game_system.hp_word
      @sp_word       = $game_system.sp_word
      @exp_word      = $game_system.exp_word
      if @actor != nil
        refresh
      elsif @actor == nil
        no_actor
      end
    end
    if @actor != nil
      if (@name   != @actor.name)       or
         (@level  != @actor.level)      or
         (@hp     != @actor.hp)         or
         (@maxhp  != @actor.maxhp)      or
         (@sp     != @actor.sp)         or
         (@maxsp  != @actor.maxsp)      or
         (@exp    != @actor.exp)        or
         (@nexp   != @actor.next_exp_s) or
         (@hud_switch != $game_system.hud_switch)
        @hud_switch  = $game_system.hud_switch
        self.visible = @hud_switch
        self.opacity = 140
        unless @actor == nil
          @name  = @actor.name
          @level = @actor.level
          @hp    = @actor.hp
          @maxhp = @actor.maxhp
          @sp    = @actor.sp
          @maxsp = @actor.maxsp
          @exp   = @actor.exp
          @nexp  = @actor.next_exp_s
          refresh
        else
          no_actor
        end
      end
    elsif @actor == nil
      no_actor
    end
  end
end

#=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

#============================================================
# ** Scene_Map
#============================================================
class Scene_Map

  #------------------------------------
  # ** Alias Listing
  #------------------------------------
  alias initialize_hud_now main
  alias update_hud_now update
  #------------------------------------
  
  def main
    @large_party = $game_system.large_party
    
    if @large_party == false
      @hud_window1 = KenHUD.new(0)
      @hud_window2 = KenHUD.new(1)
      @hud_window3 = KenHUD.new(2)
      @hud_window4 = KenHUD.new(3)
      @hud_window1.x = 26
      @hud_window2.x = 178
      @hud_window3.x = 330
      @hud_window4.x = 482
    elsif @large_party == true
      @hud_window1 = KenHUD.new(0)
      @hud_window2 = KenHUD.new(1)
      @hud_window3 = KenHUD.new(2)
      @hud_window4 = KenHUD.new(3)
      @hud_window5 = KenHUD.new(4)
      @hud_window6 = KenHUD.new(5)
      @hud_window7 = KenHUD.new(6)
      @hud_window8 = KenHUD.new(7)
      @hud_window1.x = 26
      @hud_window2.x = 178
      @hud_window3.x = 330
      @hud_window4.x = 482
      @hud_window5.x = 26
      @hud_window6.x = 178
      @hud_window7.x = 330
      @hud_window8.x = 482
      @hud_window5.y = 100
      @hud_window6.y = 100
      @hud_window7.y = 100
      @hud_window8.y = 100
    end
    initialize_hud_now
    if @large_party == false
      @hud_window1.dispose
      @hud_window2.dispose
      @hud_window3.dispose
      @hud_window4.dispose
    elsif @large_party == true
      @hud_window1.dispose
      @hud_window2.dispose
      @hud_window3.dispose
      @hud_window4.dispose
      @hud_window5.dispose
      @hud_window6.dispose
      @hud_window7.dispose
      @hud_window8.dispose
    end
  end

  def update
    update_hud_now
    if @large_party == false
      @hud_window1.update
      @hud_window2.update
      @hud_window3.update
      @hud_window4.update
    elsif @large_party == true
      @hud_window1.update
      @hud_window2.update
      @hud_window3.update
      @hud_window4.update
      @hud_window5.update
      @hud_window6.update
      @hud_window7.update
      @hud_window8.update
    end
    # By default controls, hit the A button on the keyboard to switch the HUD on/off.
    if Input.trigger?(Input::X)
      unless $game_system.map_interpreter.running?
        $game_system.se_play($data_system.decision_se)
        if $game_system.hud_switch == true
          $game_system.hud_switch = false
        elsif $game_system.hud_switch == false
          $game_system.hud_switch = true
        end
      end
    end
  end
end

Ken's Adv HUD v1.0 Demo

Credits:
Kendorei (me) for making it all on my own! happy.gif

No credit is necessary, but would be appreciated.
Claim it as yours, and I will hunt you down though. happy.gif
amaro57
This looks good if its ur first script, but a question, can you change those boxes into ones from your own?
Kendorei
QUOTE (amaro57 @ Jan 27 2009, 08:40 PM) *
This looks good if its ur first script, but a question, can you change those boxes into ones from your own?

I'm not quite sure exactly what you mean. If you mean setting a windowskin for just the HUD, that's possible.
If that's not it, then could you please be more specific? wink.gif
Bt255
Just wanted to say thanks for making this. I've been looking for a Hud that doesn't have compatibility issues with my other scripts. The Hud looks and works great by the way!
carnie_natas
edit:figured out my problem.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.