Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Closed TopicStart new topic
> Advanced HUD, Author: Kendorei
Kendorei
post Jan 27 2009, 06:10 PM
Post #1


Level 2
Group Icon

Group: Member
Posts: 25
Type: Event Designer
RM Skill: Intermediate




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
Attached File  KenAdvHUD1.png ( 105.7K ) Number of downloads: 509
Attached File  KenAdvHUD2.png ( 101.76K ) Number of downloads: 142

Attached File  KenAdvHUD3.png ( 83.31K ) Number of downloads: 123
Attached File  KenAdvHUD4.png ( 100.22K ) Number of downloads: 122




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

This post has been edited by Kendorei: Feb 3 2009, 02:28 PM


__________________________
Kendorei, Old Soul

Current Project: Elemental War: Blade of Elements

Cna yuo raed tihs? Olny 55% of plepoe can.
I cdnuolt blveiee taht I cluod aulaclty uesdnatnrd waht I was rdanieg. The phaonmneal pweor of the hmuan mnid, aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it dseno't mtaetr in waht oerdr the ltteres in a wrod are, the olny iproamtnt tihng is taht the frsit and lsat ltteer be in the rghit pclae. The rset can be a taotl mses and you can sitll raed it whotuit a pboerlm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe. Azanmig huh? yaeh and I awlyas tghuhot slpeling was ipmorantt!
fi yuo cna raed tihs, palce it in yuor siantugre.

My scripts:
Go to the top of the page
 
+Quote Post
   
amaro57
post Jan 27 2009, 06:40 PM
Post #2


Enigmatic Art
Group Icon

Group: Revolutionary
Posts: 825
Type: Developer
RM Skill: Skilled




This looks good if its ur first script, but a question, can you change those boxes into ones from your own?


__________________________
[Show/Hide] Sig Inside

[Show/Hide] Member Card


Ty Holder :D

[Show/Hide] My UBER Art




[Show/Hide] My Project Logo by Axerax
Still going on Construct Classic. Currently drawing dialogue portraits for the characters. Some can be found on my DA.

Mystery of the Seventh Tower: Reborn
-------------------
[Show/Hide] Progress

------------------------------------
I've got my Platform Engine now. Still have to tweak it a bit to allow the 'action' part xD.
------------------------------------
Running into some errors, I'm trying to fix them up as soon as possible though.
------------------------------------
*Fixed*
Let's go back to tweaking shall we?
------------------------------------
Mega thanks to DarkYoshi for helping me on so many things. I'm understanding things better now. Just need to see how to call on some object states...mmm...
------------------------------------
Coding AI for enemies
------------------------------------
*Project Moves to Construct*
------------------------------------
I've established a deal with Christian Andersson for his music. That guy is a Fantasy Music GOD.
------------------------------------
Contacting several people for pixel work commissions.
------------------------------------
Gathering some more BGs.
------------------------------------
Editing current sprites for use in Construct.
------------------------------------
Waiting for v1 for Construct.
------------------------------------
Finishing Game Flow Design.
------------------------------------
Finished Story, yet to finalize.
------------------------------------
Finished Red and Yellow tower's level design.
------------------------------------
Finished Aeiner's Sky Port design.
------------------------------------
Character Design time.
------------------------------------


A project developed by Ambry. This used to be my old RMXP project but I converted it to GM8 and now Construct due to the game play possibilities. It's an action platformer with RPG elements and slight twists here and there. The project is based on 'The Seventh Tower' series by Garth Nix, but I assure you, I'm changing a lot of things!

Go to the top of the page
 
+Quote Post
   
Kendorei
post Jan 29 2009, 09:09 PM
Post #3


Level 2
Group Icon

Group: Member
Posts: 25
Type: Event Designer
RM Skill: Intermediate




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


__________________________
Kendorei, Old Soul

Current Project: Elemental War: Blade of Elements

Cna yuo raed tihs? Olny 55% of plepoe can.
I cdnuolt blveiee taht I cluod aulaclty uesdnatnrd waht I was rdanieg. The phaonmneal pweor of the hmuan mnid, aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it dseno't mtaetr in waht oerdr the ltteres in a wrod are, the olny iproamtnt tihng is taht the frsit and lsat ltteer be in the rghit pclae. The rset can be a taotl mses and you can sitll raed it whotuit a pboerlm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe. Azanmig huh? yaeh and I awlyas tghuhot slpeling was ipmorantt!
fi yuo cna raed tihs, palce it in yuor siantugre.

My scripts:
Go to the top of the page
 
+Quote Post
   
Bt255
post Feb 14 2009, 02:49 PM
Post #4


Level 4
Group Icon

Group: Member
Posts: 56
Type: Writer
RM Skill: Skilled




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!


__________________________
Current Projects:

Moonlight Dreams-Paused

Shimmering Darkness-In Progress




Moonlight Dreams Preview <--------Check it out
!!!
Go to the top of the page
 
+Quote Post
   
carnie_natas
post Aug 22 2011, 12:02 PM
Post #5


~Noctem~Shinai~
Group Icon

Group: Revolutionary
Posts: 261
Type: Developer
RM Skill: Advanced




edit:figured out my problem.

This post has been edited by carnie_natas: Aug 25 2011, 01:27 PM


__________________________
Light one up!
You can run.....But you'll only die tired!
Go to the top of the page
 
+Quote Post
   

Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 19th June 2013 - 08:13 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker