[XP] Z-HUD for Blizz-ABS

Started by Blizzard, July 29, 2009, 04:34:54 pm

Previous topic - Next topic

Blizzard

July 29, 2009, 04:34:54 pm Last Edit: March 23, 2019, 11:36:38 am by Blizzard
Z-HUD for Blizz-ABS
Authors: Blizzard
Version: 1.2b
Type: Blizz-ABS plugin
Key Term: Blizz-ABS Plugin



Introduction

This script will add will add a completely new HUD system for Blizz-ABS.

This script is to be distributed under the same terms and conditions like the script it was created for: Blizz-ABS.


Features


  • use SP display images as bars or tiles
  • use HP display images as bars or tiles
  • background images for assigned hotkeys
  • background images all hotkeys
  • background image for minimap
  • allows a Zelda style HUD by simply configuring the script properly and using the proper images



Screenshots





Demo

N/A


Script

Just make a new script above main and paste this code into it.
Spoiler: ShowHide
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Z-HUD for Blizz-ABS by Blizzard
# Version: 1.2b
# Type: Blizz-ABS Add-on
# Date: 29.7.2009
# Date v1.0b: 30.7.2009
# Date v1.01b: 17.12.2009
# Date v1.02b: 23.2.2010
# Date v1.2b: 18.2.2012
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
#  This script is to be distributed under the same terms and conditions like
#  the script it was created for: Blizz-ABS.
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Information:
#
#   This script must be placed below Blizz-ABS and requires Blizz-ABS v2.7 or
#   higher to work properly. It will add a completely new HUD system for
#   Blizz-ABS.
#   
# Notes:
#   
#   Images are placed in the Graphics/Pictures folder. Be sure to set up the
#   HUD height properly. Usually it is enough if it is the sum of the heights
#   of the HP and the SP image. If you use tiling, you need to calculate the
#   maximum possible height the HUD can be and then use that value. It is not
#   recommended to use extremely high values as your HUD will cover too much of
#   the screen and increase lag.
#
#
# If you find any bugs, please report them here:
# http://forum.chaos-project.com
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

if !$BlizzABS || BlizzABS::VERSION < 2.7
  raise 'ERROR: The "Z-HUD" requires Blizz-ABS 2.7 or higher.'
end

#==============================================================================
# module BlizzCFG
#==============================================================================

module BlizzCFG

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 
  # maximum height of the HUD
  Z_HUD_HEIGHT = 96
  # background image for whole HUD (leave empty for none)
  Z_HUD_BACKGROUND = ''
 
  # tiling HP images
  Z_HP_TILING = true
  # displays as if the images are filled up (only when tiling)
  Z_HP_FILL_UP = true
  # how many columns are used for the tile in one row (only when tiling)
  Z_HP_TILE_COLUMNS = 10
  # how many HP per column (only when tiling)
  Z_HP_PER_TILE = 100
  # full image file
  Z_HP_FILE = 'hud_HP'
  # empty image file
  Z_HP_FILE_EMPTY = 'hud_HP_empty'
 
  # tiling SP images
  Z_SP_TILING = false
  # displays as if the images are filled up (only when tiling)
  Z_SP_FILL_UP = false
  # how many columns are used for the tile in one row (only when tiling)
  Z_SP_TILE_COLUMNS = 10
  # how many SP per column (only when tiling)
  Z_SP_PER_TILE = 10
  # full image file
  Z_SP_FILE = 'hud_SP'
  # empty image file
  Z_SP_FILE_EMPTY = 'hud_SP_empty'
 
  # item hotkey background
  Z_ITEM_BACK = 'item'
  # skill hotkey background
  Z_SKILL_BACK = 'skill'
 
  # hotkeys display background
  Z_HOTKEYS_BACK = 'hotkey'
 
  # minimap background
  Z_MINIMAP_BACK = 'minimap'
 
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 
  $blizzabs_z_hud = 1.2
 
end

#==============================================================================
# Hud
#==============================================================================

class Hud
 
  attr_reader :hotkey_sprite
 
  alias init_zhud_later initialize
  def initialize(viewport = nil)
    init_hotkey_sprite(viewport)
    init_zhud_later(viewport)
    self.x, self.y = 4, 4
    @hotkey_sprite.z = self.z
    if BlizzCFG::Z_HUD_BACKGROUND != ''
      @zhud_back = Sprite.new
      @zhud_back.bitmap = RPG::Cache.picture(BlizzCFG::Z_HUD_BACKGROUND)
      @zhud_back.z = self.z - 1
    end
  end
 
  alias create_positions_zhud_later create_positions
  def create_positions
    create_positions_zhud_later
    b1 = RPG::Cache.picture(BlizzCFG::Z_HP_FILE)
    b2 = RPG::Cache.picture(BlizzCFG::Z_SP_FILE)
    if BlizzCFG::Z_HP_TILING
      w = b1.width * BlizzCFG::Z_HP_TILE_COLUMNS
    else
      w = b1.width
    end
    @hud_width = w if @hud_width < w
    if BlizzCFG::Z_SP_TILING
      w = b2.width * BlizzCFG::Z_SP_TILE_COLUMNS
    else
      w = b2.width
    end
    @hud_width = w if @hud_width < w
    @hud_height = BlizzCFG::Z_HUD_HEIGHT
    @hp_x, @hp_y, @sp_x, @sp_y = 0, 0, 0, b1.height + 4
    update_sp_y
    b = RPG::Cache.picture(BlizzCFG::Z_ITEM_BACK)
    @left_x = b.width
    @left_y = b.height
    @hot_x = b.width
  end
 
  def draw_basic
  end
 
  def draw_empty
  end
 
  def draw_name
  end
 
  def draw_level
  end
 
  def draw_hp
    @hp, @maxhp = actor.hp, actor.maxhp
    rate = (@maxhp > 0 ? @hp.to_f / @maxhp : 0)
    b1 = RPG::Cache.picture(BlizzCFG::Z_HP_FILE)
    b2 = RPG::Cache.picture(BlizzCFG::Z_HP_FILE_EMPTY)
    if BlizzCFG::Z_HP_TILING
      tiles = @maxhp / BlizzCFG::Z_HP_PER_TILE
      rows = (tiles.to_f / BlizzCFG::Z_HP_TILE_COLUMNS).ceil
      w, h = b1.width, b1.height
      self.bitmap.fill_rect(@hp_x, @hp_y, w * BlizzCFG::Z_HP_TILE_COLUMNS,
          h * rows, Color.new(0, 0, 0, 0))
      full_tiles = (rate * tiles).to_i
      semi_full = ((rate * tiles != full_tiles) ? 1 : 0)
      (0...full_tiles).each {|i|
          x = @hp_x + (i % BlizzCFG::Z_HP_TILE_COLUMNS) * w
          y = @hp_y + (i / BlizzCFG::Z_HP_TILE_COLUMNS) * h
          self.bitmap.blt(x, y, b1, Rect.new(0, 0, w, h))}
      if semi_full > 0
        x = @hp_x + (full_tiles % BlizzCFG::Z_HP_TILE_COLUMNS) * w
        y = @hp_y + (full_tiles / BlizzCFG::Z_HP_TILE_COLUMNS) * h
        if BlizzCFG::Z_HP_FILL_UP
          h2 = ((1 - rate * tiles + full_tiles) * h).to_i
          self.bitmap.blt(x, y, b2, Rect.new(0, 0, w, h2))
          self.bitmap.blt(x, y + h2, b1, Rect.new(0, h2, w, h - h2))
        else
          w2 = ((rate * tiles - full_tiles) * w).to_i
          self.bitmap.blt(x, y, b1, Rect.new(0, 0, w2, h))
          self.bitmap.blt(x + w2, y, b2, Rect.new(w2, 0, w - w2, h))
        end
      end
      ((full_tiles + semi_full)...tiles).each {|i|
          x = @hp_x + (i % BlizzCFG::Z_HP_TILE_COLUMNS) * w
          y = @hp_y + (i / BlizzCFG::Z_HP_TILE_COLUMNS) * h
          self.bitmap.blt(x, y, b2, Rect.new(0, 0, w, h))}
    else
      w1 = (b1.width * rate).to_i
      w2 = b2.width - w1
      self.bitmap.fill_rect(@hp_x, @hp_y, b1.width, b1.height, Color.new(0, 0, 0, 0))
      self.bitmap.blt(@hp_x, @hp_y, b1, Rect.new(0, 0, w1, b1.height))
      self.bitmap.blt(@hp_x + w1, @hp_y, b2, Rect.new(w1, 0, w2, b2.height))
    end
    draw_sp
  end
 
  def draw_sp
    @sp, @maxsp = actor.sp, actor.maxsp
    rate = (@maxsp > 0 ? @sp.to_f / @maxsp : 0)
    b1 = RPG::Cache.picture(BlizzCFG::Z_SP_FILE)
    b2 = RPG::Cache.picture(BlizzCFG::Z_SP_FILE_EMPTY)
    if BlizzCFG::Z_SP_TILING
      tiles = @maxsp / BlizzCFG::Z_SP_PER_TILE
      rows = (tiles.to_f / BlizzCFG::Z_SP_TILE_COLUMNS).ceil
      w, h = b1.width, b1.height
      self.bitmap.fill_rect(@sp_x, @sp_y, w * BlizzCFG::Z_SP_TILE_COLUMNS,
          h * rows, Color.new(0, 0, 0, 0))
      full_tiles = (rate * tiles).to_i
      semi_full = ((rate * tiles != full_tiles) ? 1 : 0)
      (0...full_tiles).each {|i|
          x = @sp_x + (i % BlizzCFG::Z_SP_TILE_COLUMNS) * w
          y = @sp_y + (i / BlizzCFG::Z_SP_TILE_COLUMNS) * h
          self.bitmap.blt(x, y, b1, Rect.new(0, 0, w, h))}
      if semi_full > 0
        x = @sp_x + (full_tiles % BlizzCFG::Z_SP_TILE_COLUMNS) * w
        y = @sp_y + (full_tiles / BlizzCFG::Z_SP_TILE_COLUMNS) * h
        if BlizzCFG::Z_SP_FILL_UP
          h2 = ((1 - rate * tiles + full_tiles) * h).to_i
          self.bitmap.blt(x, y, b2, Rect.new(0, 0, w, h2))
          self.bitmap.blt(x, y + h2, b1, Rect.new(0, h2, w, h - h2))
        else
          w2 = ((rate * tiles - full_tiles) * w).to_i
          self.bitmap.blt(x, y, b1, Rect.new(0, 0, w2, h))
          self.bitmap.blt(x + w2, y, b2, Rect.new(w2, 0, w - w2, h))
        end
      end
      ((full_tiles + semi_full)...tiles).each {|i|
          x = @sp_x + (i % BlizzCFG::Z_SP_TILE_COLUMNS) * w
          y = @sp_y + (i / BlizzCFG::Z_SP_TILE_COLUMNS) * h
          self.bitmap.blt(x, y, b2, Rect.new(0, 0, w, h))}
    else
      w1 = (b1.width * rate).to_i
      w2 = b2.width - w1
      self.bitmap.fill_rect(@sp_x, @sp_y, b1.width, b1.height, Color.new(0, 0, 0, 0))
      self.bitmap.blt(@sp_x, @sp_y, b1, Rect.new(0, 0, w1, b1.height))
      self.bitmap.blt(@sp_x + w1, @sp_y, b2, Rect.new(w1, 0, w2, b2.height))
    end
  end
 
  def draw_hskill
    @skill = actor.skill
    b1 = RPG::Cache.picture(BlizzCFG::Z_SKILL_BACK)
    @hotkey_sprite.bitmap.fill_rect(0, 0, b1.width, b1.height, Color.new(0, 0, 0, 0))
    @hotkey_sprite.bitmap.blt(0, 0, b1, Rect.new(0, 0, b1.width, b1.height))
    if @skill != 0
      bitmap = RPG::Cache.icon($data_skills[@skill].icon_name)
      x, y = (b1.width - 24) / 2, (b1.height - 24) / 2
      @hotkey_sprite.bitmap.blt(x, y, bitmap, Rect.new(0, 0, 24, 24))
    end
    draw_lskill
  end
 
  def draw_lskill
    @hotkey_sprite.bitmap.fill_rect(0, @left_y + 4, @left_x, 16, Color.new(0, 0, 0, 0))
    @skills_left = get_skills_left
    if @skill != nil && @skill > 0
      if @skills_left >= 0
        if @skills_left == 0
          @hotkey_sprite.bitmap.font.color = Color.new(255, 0, 0)
        elsif @skills_left <= 5
          @hotkey_sprite.bitmap.font.color = Color.new(255, 255, 0)
        else
          @hotkey_sprite.bitmap.font.color = normal_color
        end
        @hotkey_sprite.bitmap.font.size -= 2
        @hotkey_sprite.bitmap.draw_text_full(0, @left_y, @left_x, 20, @skills_left.to_s, 1)
        @hotkey_sprite.bitmap.font.size += 2
      elsif @skills_left == -1
        @hotkey_sprite.bitmap.font.color = Color.new(0, 255, 0)
        @hotkey_sprite.bitmap.font.size += 4
        @hotkey_sprite.bitmap.draw_text_full(0, @left_y, @left_x, 20, '∞', 1)
        @hotkey_sprite.bitmap.font.size -= 4
      end
    end
  end
 
  def draw_hitem
    @item = actor.item
    b1 = RPG::Cache.picture(BlizzCFG::Z_SKILL_BACK)
    b2 = RPG::Cache.picture(BlizzCFG::Z_ITEM_BACK)
    x = b1.width + 4
    @hotkey_sprite.bitmap.fill_rect(x, 0, b2.width, b2.height, Color.new(0, 0, 0, 0))
    @hotkey_sprite.bitmap.blt(x, 0, b2, Rect.new(0, 0, b2.width, b2.height))
    if @item != 0
      bitmap = RPG::Cache.icon($data_items[@item].icon_name)
      x, y = b1.width + 4 + (b2.width - 24) / 2, (b2.height - 24) / 2
      @hotkey_sprite.bitmap.blt(x, y, bitmap, Rect.new(0, 0, 24, 24))
    end
    draw_litem
  end
 
  def draw_litem
    @items_left = $game_party.item_number(@item)
    @hotkey_sprite.bitmap.fill_rect(@left_x + 4, @left_y + 4, @left_x, 16, Color.new(0, 0, 0, 0))
    if @item != nil && @item > 0
      if $data_items[@item] != nil && !$data_items[@item].consumable
        @hotkey_sprite.bitmap.font.color = Color.new(0, 255, 0)
        @hotkey_sprite.bitmap.font.size += 4
        @hotkey_sprite.bitmap.draw_text_full(@left_x + 4, @left_y, @left_x, 20, '∞', 1)
        @hotkey_sprite.bitmap.font.size -= 4
      else
        if @items_left == 0
          @hotkey_sprite.bitmap.font.color = Color.new(255, 0, 0)
        elsif @items_left <= 10
          @hotkey_sprite.bitmap.font.color = Color.new(255, 255, 0)
        else
          @hotkey_sprite.bitmap.font.color = normal_color
        end
        @hotkey_sprite.bitmap.font.size -= 2
        @hotkey_sprite.bitmap.draw_text_full(@left_x + 4, @left_y, @left_x, 20, @items_left.to_s, 1)
        @hotkey_sprite.bitmap.font.size += 2
      end
    end
  end
 
  alias update_zhud_later update
  def update
    update_sp_y if actor != nil
    update_zhud_later
  end
 
  def update_sp_y
    return if !BlizzCFG::Z_HP_TILING
    b1 = RPG::Cache.picture(BlizzCFG::Z_HP_FILE)
    tiles = actor.maxhp / BlizzCFG::Z_HP_PER_TILE
    @sp_y = (tiles.to_f / BlizzCFG::Z_HP_TILE_COLUMNS).ceil * b1.height
  end
 
  alias dispose_zhud_later dispose
  def dispose
    @hotkey_sprite.dispose if @hotkey_sprite != nil
    @hotkey_sprite = nil
    @zhud_back.dispose if @zhud_back != nil
    @zhud_back = nil
    dispose_zhud_later
  end
 
  def init_hotkey_sprite(viewport)
    b1 = RPG::Cache.picture(BlizzCFG::Z_ITEM_BACK)
    b2 = RPG::Cache.picture(BlizzCFG::Z_SKILL_BACK)
    width = b1.width + b2.width
    @hotkey_sprite = Sprite.new(viewport)
    @hotkey_sprite.x = 632 - width
    @hotkey_sprite.y = 4
    @hotkey_sprite.bitmap = Bitmap.new(width + 4, b1.height + 24)
    @hotkey_sprite.bitmap.font.name = 'Arial'
    @hotkey_sprite.bitmap.font.size = 16
    @hotkey_sprite.bitmap.font.bold = true
  end
   
end

#==============================================================================
# Hotkey_Assignment
#==============================================================================

class Hotkey_Assignment
 
  def initialize(viewport = nil)
    super
    self.bitmap = Bitmap.new(32, 320)
    self.bitmap.font.bold = true
    self.bitmap.font.size -= 8
    self.bitmap.font.color = system_color
    self.x, self.y, self.z = 0, 160, 1100
    @skills = BlizzABS::Cache::EmptyKeys
    @items = BlizzABS::Cache::EmptyKeys
    update
  end
 
  def draw(index = nil)
    back = RPG::Cache.picture(BlizzCFG::Z_HOTKEYS_BACK)
    w, h = back.width, back.height
    ow, oh = (w - 24) / 2, (h - 24) / 2
    (index == nil ? BlizzABS::Cache::HotkeyRange : [index]).each {|i|
        if $game_player.skill_hotkeys[i%10] != 0
          object = $data_skills[$game_player.skill_hotkeys[i%10]]
        elsif $game_player.item_hotkeys[i%10] != 0
          object = $data_items[$game_player.item_hotkeys[i%10]]
        end
        if @items[i%10] != $game_player.item_hotkeys[i%10] ||
            @skills[i%10] != $game_player.skill_hotkeys[i%10]
          self.bitmap.fill_rect(0, h*(i-1), w, h, Color.new(0, 0, 0, 0))
          self.bitmap.blt(0, h*(i-1), back, Rect.new(0, 0, w, h))
          if object != nil
            bitmap = RPG::Cache.icon(object.icon_name)
            self.bitmap.blt(ow, h*(i-1)+oh, bitmap, Rect.new(0, 0, 24, 24))
          end
          self.bitmap.draw_text_full(0, h*(i-1)+10, w-2, 32, (i%10).to_s, 2)
        end}
    @items = $game_player.item_hotkeys.clone
    @skills = $game_player.skill_hotkeys.clone
  end
 
end

#==============================================================================
# Minimap
#==============================================================================

class Minimap
 
  alias update_zhud_later update
  def update(override = false)
    update_zhud_later(override)
    update_minimap_back
  end
 
  def update_minimap_back
    if $game_system.minimap == 1
      if @minimap_back == nil
        @minimap_back = Sprite.new
        @minimap_back.bitmap = RPG::Cache.picture(BlizzCFG::Z_MINIMAP_BACK)
        @minimap_back.x = self.vx - (@minimap_back.bitmap.width - self.vw) / 2
        @minimap_back.y = self.vy - (@minimap_back.bitmap.height - self.vh) / 2
        @minimap_back.z = self.z + 1
        @minimap_back.opacity = self.opacity
      end
    elsif @minimap_back != nil
      @minimap_back.dispose
      @minimap_back = nil
    end
  end
 
  alias opacity_is_zhud_later opacity=
  def opacity=(value)
    opacity_is_zhud_later(value)
    @minimap_back.opacity = value if @minimap_back != nil
  end
 
  alias dispose_zhud_later dispose
  def dispose
    dispose_zhud_later
    @minimap_back.dispose if @minimap_back != nil
    @minimap_back = nil
  end
 
end
 
#==============================================================================
# Scene_Map
#==============================================================================

class Scene_Map
 
  alias hud_update_zhud_later hud_update
  def hud_update
    hud_update_zhud_later
    if @hud != nil
      s = @hud.hotkey_sprite
      s.update
      if $game_player.screen_x < s.vx + s.vw + 16 &&
          $game_player.screen_y < s.vy + s.vh + 48 &&
          $game_player.screen_x > s.vx && $game_player.screen_y > s.vy
        s.opacity -= 25 if s.opacity > 80
      elsif s.opacity <= 255
        s.opacity += 25
      end
    end
  end
 
end

#==============================================================================
# Window_Skill_Hotkey
#==============================================================================

class Window_Skill_Hotkey < Window_Skill
 
  def initialize(actor)
    super
    @column_max = 1
    self.width, self.height = 288, 480
    self.x, self.y, self.z = 64, 64, 21000
    self.cursor_rect.empty
    self.active = false
    refresh
  end
 
  def draw_item(i)
    if @data[i] == nil
      self.contents.font.color = normal_color
      self.contents.draw_text(32, i*32, 204, 32, '<Remove>')
    else
      if @actor.skill_can_use?(@data[i].id)
        self.contents.font.color = normal_color
      else
        self.contents.font.color = disabled_color
      end
      self.contents.fill_rect(Rect.new(4, i*32, 256, 32), Color.new(0, 0, 0, 0))
      bitmap = RPG::Cache.icon(@data[i].icon_name)
      opacity = self.contents.font.color == normal_color ? 255 : 128
      self.contents.blt(4, 4+i*32, bitmap, Rect.new(0, 0, 24, 24), opacity)
      text = @data[i].name
      if @actor.skills.include?(@data[i].id) &&
          $tons_version != nil && $tons_version >= 3.7 &&
          TONS_OF_ADDONS::EQUAP_SKILLS && DISPLAY_AP_REQ
        aps = BlizzCFG.maxap(@data[i].id)
        text = "#{text} (#{@actor.ap(@data[i].id)}/#{aps})" if aps != 0
      end
      self.contents.draw_text(32, i*32, 204, 32, text)
      sp_cost = @data[i].sp_cost
      if $tons_version != nil && $tons_version >= 6.54 &&
          $game_system.SP_COST_MOD
        sp_cost = BlizzCFG.get_cost_mod(@actor.states, sp_cost)
      end
      self.contents.draw_text(204, i*32, 48, 32, sp_cost.to_s, 2)
    end
  end
 
end

#==============================================================================
# Window_Item_Hotkey
#==============================================================================

class Window_Item_Hotkey < Window_Item
 
  def initialize
    super
    @column_max = 1
    self.width, self.height = 288, 480
    self.x, self.y, self.z = 352, 64, 21000
    self.cursor_rect.empty
    self.active = false
    refresh
  end
 
  def draw_item(i)
    if @data[i] == nil
      self.contents.font.color = normal_color
      self.contents.draw_text(32, i*32, 212, 32, '<Remove>')
    else
      number = $game_party.item_number(@data[i].id)
      if $game_party.item_can_use?(@data[i].id)
        self.contents.font.color = normal_color
      else
        self.contents.font.color = disabled_color
      end
      self.contents.fill_rect(Rect.new(4, i*32, 256, 32), Color.new(0, 0, 0, 0))
      bitmap = RPG::Cache.icon(@data[i].icon_name)
      opacity = self.contents.font.color == normal_color ? 255 : 128
      self.contents.blt(4, 4+i*32, bitmap, Rect.new(0, 0, 24, 24), opacity)
      self.contents.draw_text(32, i*32, 212, 32, @data[i].name)
      self.contents.draw_text(212, i*32, 16, 32, ':', 1)
      self.contents.draw_text(228, i*32, 24, 32, number.to_s, 2)
    end
  end
 
end

#==============================================================================
# Scene_Hotkeys
#==============================================================================

class Scene_Hotkeys
 
  def main
    @spriteset = Spriteset_Map.new
    @view = Viewport.new(0, 0, 640, 480)
    @view.tone = @tone.clone
    @hud = Hud.new if BlizzABS::Config::HUD_ENABLED && $game_system.hud
    if BlizzABS::Config::HOTKEYS
      @hotkeys = Hotkey_Assignment.new
      @hotkeys.z = 5000
    end
    if BlizzABS::Config::MINIMAP && $game_system.minimap > 0
      @minimap = Minimap.new
    end
    @choice = Sprite.new
    @choice.bitmap = $BlizzABS.cache.image('menu_arrow')
    @choice.x, @choice.y, @choice.z, @choice.opacity = 40, 192, 500, 128
    @choice.angle = 90
    @choice.ox = -8
    @active = true
    @index = 0
    @up_mode = true
    @skill_window = Window_Skill_Hotkey.new($game_player.battler)
    @item_window = Window_Item_Hotkey.new
    @last_active = true
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      break if $scene != self
    end
    Graphics.freeze
    @spriteset.dispose
    [@hud, @hotkeys, @minimap].each {|s| s.dispose if s != nil}
    @choice.dispose
    @skill_window.dispose
    @item_window.dispose
    @view.dispose
    while @party_leader != $game_party.actors[0]
      $BlizzABS.player.switch_leader
    end
  end
 
  def update
    @choice.update
    @skill_window.update
    @item_window.update
    @hotkeys.update if @hotkeys != nil
    @choice.oy += (@up_mode ? (@active ? 2 : 1) : (@active ? -2 : -1))
    @up_mode = (@up_mode ? (@choice.oy < 8) : (@choice.oy <= -8))
    if $game_system.select_button && Input.trigger?(Input::Select)
      $game_system.se_play($data_system.cursor_se)
      $BlizzABS.player.switch_leader
      @skill_window.switch_actor
      @hud.update if @hud != nil
      @hotkeys.update if @hotkeys != nil
    elsif @active
      @choice.oy = @choice.oy / 2 * 2
      update_choice
    elsif @skill_window.active
      update_skill
    elsif @item_window.active
      update_item
    end
  end
 
  def update_choice
    @choice.y = 192 + @index * 32
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      $game_system.se_play($data_system.decision_se)
      @active = false
      @skill_window.active = @last_active
      @item_window.active = (!@last_active)
    elsif Input.repeat?(Input::DOWN)
      if Input.trigger?(Input::DOWN) || @index < 9
        $game_system.se_play($data_system.cursor_se)
        @index = (@index + 1) % 10
      end
    elsif Input.repeat?(Input::UP)
      if Input.trigger?(Input::UP) || @index >= 1
        $game_system.se_play($data_system.cursor_se)
        @index = (@index + 9) % 10
      end
    end
  end
 
end



Instructions

In the script in the first comment.


Compatibility

Requires Blizz-ABS to work. Not compatible with the SR display from CRLS (with CRLS-Blizz-ABS plugin), EOS and EXP in HUD plugin directly. For this HUD to work with them, they had to be edited in such a way to change the position of the bars that are being drawn.


Credits and Thanks


  • Boris "Blizzard" Mikić



Author's Notes

Keep in mind that this plugin comes UNDER Blizz-ABS. This script was done on request (so people stop asking) and is not fully supported by me as my other scripts are.

Here are template images that have been provided by other people. Make sure you credit them if you use them!
Save them on your hard drive and extract them in the Graphics/Pictures folder. They will work with the default configuration without problems.

Z-HUD template by Taiine

If you find any bugs, please report them here:
http://forum.chaos-project.com

That's it! N-Joy! =D
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Aqua

*drools*
You messed up on the screenshot though

.png.png XD

winkio

nice, nice.  I have plans to redesign the Dissipate one to look like an MMO HUD.  But that won't be for a while.

Blizzard

Quote from: Aqua on July 29, 2009, 04:36:01 pm
*drools*
You messed up on the screenshot though

.png.png XD


Actually I didn't. The link was fine in the post. :/ After I pressed "save" in the edit window without touching anything it suddenly started working. xD
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Hellfire Dragon

:o looks awesome!
Quote from: Blizzard on July 29, 2009, 04:34:54 pm
You should NOT use those images in your game! They are here for demonstration purposes only!

Aw, but they look cool :xD:

Nice script Blizzy :)

Axerax



I actually requested this script, this is how it looks in my own game. Blizz added a few extra feature I didn't even ask for, so thank him for those, it is such a wonderful script and works quite smoothly. It's up to you to make your game beautiful.

acebelowzero

Awesome Blizzard, Man u know everything about scripting that's neat!
Whats up!
Vist www.dexia.tk and we will host your very own created games!
Thanks.

Kagutsuchi

Awesome blizzard! I <3 Blizz (Not to be taken literally ofc..)

Juan

There is a bug when you got to the hotkey menu. Screenshot of the bug
Spoiler: ShowHide
Dropbox Who need luck when you can make your own.
3ds Friend code: ShowHide
 4468 1422  6617

Blizzard

July 30, 2009, 11:41:29 am #9 Last Edit: July 30, 2009, 02:01:51 pm by Blizzard
I'll fix it later.

EDIT: Done.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Tazero

I might actually use this >.> now only to make custom images....Paint!  :D


If you were a fish...

Axerax

Quote from: Tazero on August 21, 2009, 09:25:01 pm
I might actually use this >.> now only to make custom images....Paint!  :D


I make graphic arts for HUD's for commissions, starting at 15$ for the first hour and 10$ every hour after. Professional looking work, just shoot me an email or PM and I'll get back to you, if you wish.

C.C. rOyAl

would this be compatible with ur easy od system and with just regular bars for health and mp. and is there exp display?
Spoiler: ShowHide

Blizzard

Quote from: Blizzard on July 29, 2009, 04:34:54 pm
Compatibility

Requires Blizz-ABS to work. Not compatible with the SR display from CRLS (with CRLS-Blizz-ABS plugin), EOS and EXP in HUD plugin directly. For this HUD to work with them, they had to be edited in such a way to change the position of the bars that are being drawn.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

dylanf3

August 26, 2009, 07:35:10 pm #14 Last Edit: August 26, 2009, 08:29:18 pm by Aqua
My custom bars are on the top of the screen Full length!!! :evil:
Red n green ;D
Its a Great HUD, Its like plug n play!!!

Spoiler: ShowHide

Better bars coming


Aqua Edit:
Gosh... Spoiler that thing D:

Holyrapid

This is cool. I think i´ll switch to this HUD instead of the regular, or winkios...
Sweet! :D

legacyblade

Wow, this is a really nice hud system. It works really well for what I had planned for changing my own game (I'm redoing a lot of the battle features). Just thought I'd share a screen shot of my hud.

Spoiler: ShowHide


icons (except for that nut, I'm not sure who made it) are by aqua. the rest of the hud graphics were done by myself (you may cry out that the scroll looking things on the left are an RTP icon. Well I edited it to be large enough by imitating the shading of the original. I'll say that was enough work to qualify it as an original graphic :P)

Thanks for making this HUD blizz :D

Lethal-Yarn

I love how you did the hotkeys!  I'd show mine off but all I changed was the HP/SP and never changed the hotkeys/skills/items graphics.  I stopped working on my game temporarily (I've gotten into Neverwinter Nights modding lately, my interests are all over the place!).

Blizzard

*puts LB's screenshot as example screenshot* I hope you don't mind. :3
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

G_G

Quote from: Hellfire Dragon on July 29, 2009, 05:16:24 pm
:o looks awesome!
Quote from: Blizzard on July 29, 2009, 04:34:54 pm
You should NOT use those images in your game! They are here for demonstration purposes only!

Aw, but they look cool :xD:

Nice script Blizzy :)


Can we use them anyways blizzy? :3