[Resolved] Blizz Abs Hud

Started by Shalaren, May 03, 2011, 10:24:11 pm

Previous topic - Next topic

Shalaren

May 03, 2011, 10:24:11 pm Last Edit: May 09, 2011, 10:34:14 pm by Shalaren
example
Spoiler: ShowHide

I requested this hud before and nathmatt scripted it for me but I requested it to soon,
the hud should of been probably the last thing to request for as I know what I want in it,
I can imagen how hard it will be to script this one so I guess I just at least need help with it
Its with images
EXP\HP+MP\NAME+LVL\HOTKEYS background
Spoiler: ShowHide

Map background
Spoiler: ShowHide

and then bars background, and full bars images, in a way that it would be easy to move it around.
Spoiler: ShowHide
HP
MP
Emepty
EXP
Emepty Exp

the rest you can probably figure out by the example.

I tried doing it my self with other hud scripts, but Im just no experienced enough with scripting :\
Big thanks to who ever could help.

also the one nathmatt made for me
Spoiler: ShowHide
#==============================================================================
# Hud
#------------------------------------------------------------------------------
#  This class was modified to support SR display and modify the number of
#  skills left to use.
#==============================================================================
$map_infos = load_data('Data/MapInfos.rxdata')
$map_infos.keys.each {|key| $map_infos[key] = $map_infos[key].name}
class Hud < Sprite
 
 #----------------------------------------------------------------------------
 # Initialization
 #  viewport - the viewport for the sprite
 #----------------------------------------------------------------------------
 def initialize(viewport = nil)
   # call superclass method
   super
   # create positions
   create_positions
   # get height
   h = @hud_height
   $game_system.minimap = 1
   $game_system.hotkeys = true
   @name = Player_Name.new(self)
   @lvl  = Player_Lvl.new(self)
   # create bitmap
   self.bitmap = Bitmap.new(@hud_width, h)
   # set font
   self.bitmap.font.name = 'Arial'
   # set font size
   self.bitmap.font.size = 12
   # set font to bold
   self.bitmap.font.bold = true
   # set x, y position depending on which HUD mode
   self.y = 480 - (h)
   # set z coordinate
   self.z = 1000
   # draw basic HUD
   draw_basic
   # update
   update
 end
 #----------------------------------------------------------------------------
 # create_positions
 #  Sets drawing positions. Can be aliased and the positions modified to
 #  create a different HUD.
 #----------------------------------------------------------------------------
 def create_positions
   @original_width = @hud_width = 474
   @original_height = @hud_height = 54
   @hp_x, @hp_y, @sp_x, @sp_y = 3, 15, 3, 35
   @hot_x, @hot_y, @left_x, @left_y = 4, 49, 8, 63
   @exp_x,@exp_y = 175, 0
 end
 #----------------------------------------------------------------------------
 # draw_basic
 #  Draws the HUD template.
 #----------------------------------------------------------------------------
 def draw_basic
   # fill with grey rectangle
   bitmap = RPG::Cache.picture('Hud_Back')
   cw = bitmap.width
   ch = bitmap.height
   src_rect = Rect.new(0, 0, cw, ch)
   self.bitmap.blt(0,0, bitmap, src_rect)
   # determine color depending on HUD style
   color = case BlizzABS::Config::HUD_TYPE
   when 0 then Color.new(255, 255, 255, 192)
   when 1 then Color.new(0, 0, 0, 0)
   end
   # if color exists
   if color.is_a?(Color)
     # draw outline in color
     self.bitmap.fill_rect(@hp_x, @hp_y+3, 116, 14, color)
     # draw outline in color
     self.bitmap.fill_rect(@sp_x, @sp_y+3, 116, 14, color)
   end
   # set font color
   self.bitmap.font.color = system_color
 end
 #----------------------------------------------------------------------------
 # draw_empty
 #  Draws the HP and SP display when actor doesn't exist.
 #----------------------------------------------------------------------------
 def draw_empty
   # draw empty bars
   self.bitmap.gradient_bar_hud(@hp_x, @hp_y+3, 114, 0, 'hud_red_bar', 1)
   # draw empty bars
   self.bitmap.gradient_bar_hud(@sp_x, @sp_y+3, 114, 0, 'hud_blue_bar', 2)
   # draw empty bars
   self.bitmap.gradient_bar_hud(@exp_x, @exp_y+3, 200,0, 'hud_green_bar', 3)
   # set font color
   self.bitmap.font.color = disabled_color
   # draw empty HP
   self.bitmap.draw_text_full(@hp_x + 6, @hp_y, 48, 20, '0', 2)
   self.bitmap.draw_text_full(@hp_x + 54, @hp_y, 12, 20, '/', 1)
   self.bitmap.draw_text_full(@hp_x + 66, @hp_y, 48, 20, '0')
   # draw empty SP
   self.bitmap.draw_text_full(@sp_x + 6, @sp_y, 48, 20, '0', 2)
   self.bitmap.draw_text_full(@sp_x + 54, @sp_y, 12, 20, '/', 1)
   self.bitmap.draw_text_full(@sp_x + 66, @sp_y, 48, 20, '0')
    # draw empty EXP
   self.bitmap.draw_text_full(@exp_x + 54, @exp_y, 84, 20, '0.0', 2)
   # reset all flag variables
   @name = @level = @hp = @sp = @maxhp = @maxsp = @exp = @states = @skill =
       @skills_left = @item = @items_left = @gold = @exp = nil
 end
 #----------------------------------------------------------------------------
 # draw_hp
 #  Draws the HP display.
 #----------------------------------------------------------------------------
 def draw_hp
   # set current variables
   @hp, @maxhp = actor.hp, actor.maxhp
   # set fill rate
   rate = (@maxhp > 0 ? @hp.to_f / @maxhp : 0)
   # draw gradient bar
   self.bitmap.picture_bar(@hp_x, @hp_y+3,rate,'hp')
   # set font color depending on how many HP left
   self.bitmap.font.color = @hp == 0 ? knockout_color :
       @hp <= @maxhp / 4 ? crisis_color : normal_color
   # draw HP
   self.bitmap.draw_text_full(@hp_x+6, @hp_y, 48, 20, @hp.to_s, 2)
   # set color
   self.bitmap.font.color = normal_color
   # draw "/"
   self.bitmap.draw_text_full(@hp_x+54, @hp_y, 12, 20, '/', 1)
   # draw max HP
   self.bitmap.draw_text_full(@hp_x+66, @hp_y, 48, 20, @maxhp.to_s)
   self.bitmap.draw_text_full(@hp_x+2, @hp_y, 32, 20, $data_system.words.hp)
 end
 #----------------------------------------------------------------------------
 # draw_sp
 #  Draws the SP display.
 #----------------------------------------------------------------------------
 def draw_sp
   # set current variables
   @sp, @maxsp = actor.sp, actor.maxsp
   # set fill rate
   rate = (@maxsp > 0 ? @sp.to_f / @maxsp : 0)
   # draw gradient bar
   self.bitmap.picture_bar(@sp_x, @sp_y+3,rate,'sp')
   # set font color depending on how many SP left
   self.bitmap.font.color = @sp == 0 ? knockout_color :
       @sp <= @maxsp / 4 ? crisis_color : normal_color
   # draw SP
   self.bitmap.draw_text_full(@sp_x+6, @sp_y, 48, 20, @sp.to_s, 2)
   # set font color
   self.bitmap.font.color = normal_color
   # draw "/"
   self.bitmap.draw_text_full(@sp_x+54, @sp_y, 12, 20, '/', 1)
   # draw max SP
   self.bitmap.draw_text_full(@sp_x+66, @sp_y, 48, 20, @maxsp.to_s)
   self.bitmap.draw_text_full(@sp_x+2, @sp_y, 32, 20, $data_system.words.sp)
 end
 #----------------------------------------------------------------------------
 # draw_exp
 #  Draws the EXP display.
 #----------------------------------------------------------------------------
 def draw_exp
   # set current variables
   @exp = actor.exp
   # set fill rate
   rate = (actor.next_exp != 0 ? actor.now_exp.to_f / actor.next_exp : 1)
   # draw gradient bar
   self.bitmap.picture_bar(@exp_x, @exp_y+3,rate,'exp')
   self.bitmap.font.color = normal_color
   percent = (rate * 100).to_i
   self.bitmap.draw_text_full(@exp_x+60, @exp_y, 200, 18,
   "#{actor.cur_exp} / #{actor.max_exp}")
   self.bitmap.draw_text_full(@exp_x+195, @exp_y, 145, 18,percent.to_s)
   self.bitmap.draw_text_full(@exp_x+210, @exp_y, 150, 18,'%')
   self.bitmap.draw_text_full(@exp_x+2, @exp_y, 32, 18, 'EXP')
 end
 
 def draw_name
 end
 
 def draw_level
 end

 alias hud_update update
 def update
   draw_basic  if $game_temp.hud_refresh
   $game_temp.hud_refresh ? draw_exp : test_exp if actor != nil
   @name.update
   @lvl.update
   hud_update
 end
 
 def dispose
   super
   @name.dispose
   @lvl.dispose
 end
 
 def test_exp
   draw_exp if actor.exp != @exp
 end
 
 def test_name
   return
 end
 
 def test_level
   return
 end
 
end

class Hotkey_Assignment < Sprite
 
 def initialize(viewport = nil)
   # call superclass
   super
   # create bitmap
   self.bitmap = Bitmap.new(320, 32)
   # set font to bold
   self.bitmap.font.bold = true
   # decrease font size
   self.bitmap.font.size -= 8
   # set font color
   self.bitmap.font.color = system_color
   # set x and y position
   self.x, self.y, self.z = 174, 448, 1100
   # skill IDs on hotkeys
   @skills = BlizzABS::Cache::EmptyKeys
   # item IDs on hotkeys
   @items = BlizzABS::Cache::EmptyKeys
   # update display
   update
 end
 
 def draw(index = nil)
   # iterate through all hotkeys
   (index == nil ? BlizzABS::Cache::HotkeyRange : [index]).each {|i|
       # if hotkey is skill hotkey
       if $game_player.skill_hotkeys[i%10] != 0
         # temporary object
         object = $data_skills[$game_player.skill_hotkeys[i%10]]
       # if hotkey is item hotkey
       elsif $game_player.item_hotkeys[i%10] != 0
         # temporary object
         object = $data_items[$game_player.item_hotkeys[i%10]]
       end
       # if any change applied (10 is used for 0)
       if @items[i%10] != $game_player.item_hotkeys[i%10] ||
           @skills[i%10] != $game_player.skill_hotkeys[i%10]
         $game_temp.hud_refresh = true
         # if object exists
         if object != nil
           # load bitmap
           bitmap = RPG::Cache.icon(object.icon_name)
           # draw bitmap
           self.bitmap.blt(30*(i-1), 0, bitmap, Rect.new(0, 0, 24, 24))
         end
         # draw hotkey number
         self.bitmap.draw_text_full(30*(i-1), 10, 30, 32, (i%10).to_s, 2)
       end}
   # set new items
   @items = $game_player.item_hotkeys.clone
   # set new skills
   @skills = $game_player.skill_hotkeys.clone
 end
 
end

class Minimap < Sprite
 
 def initialize
   # call superclass method
   super(Viewport.new(483, 364, 150, 110))
   # get autotile image from Blizz-ABS Cache
   @autotile = $BlizzABS.cache.image('minimap_autotile')
   # creates the passable floor map
   @map_back = Map_Back.new(self)
   create_passable_floor
   # set x and y position
   self.x = self.y = 0
   # set z position
   viewport.z = 5000
   # store events
   @events, @names = check_events
   # create sprites for events
   create_sevents
   @map_name = Map_Name.new(self)
   # set all sprites visible
   self.visible = true
   # update
   update
 end
 
 alias hud_update update
 def update(con=false)
   hud_update(con)
   @map_back.update
   @map_name.update
 end
 
 def dispose
   destroy_sevents
   @map_back.dispose
   @map_name.dispose
   super
 end
 
end

class Scene_Hotkeys
 
 #----------------------------------------------------------------------------
 # main
 #  The main processing method.
 #----------------------------------------------------------------------------
 def main
   # create spriteset
   @spriteset = Spriteset_Map.new
   # create viewport
   @view = Viewport.new(0, 0, 0, 0)
   # set tone to current screen tone
   @view.tone = @tone.clone
   # create HUD if HUD is turned on and HUD active
   @hud = Hud.new if BlizzABS::Config::HUD_ENABLED && $game_system.hud
   # if ASSIGNMENT is turned
   if BlizzABS::Config::HOTKEYS
     # create assignment display
     @hotkeys = Hotkey_Assignment.new
     # set z position
     @hotkeys.z = 5000
   end
   # if MINIMAP is turned on and minimap active
   if BlizzABS::Config::MINIMAP && $game_system.minimap > 0
     # create minimap
     @minimap = Minimap.new
   end
   # create sprite
   @choice = Sprite.new
   # create bitmap
   @choice.bitmap = $BlizzABS.cache.image('menu_arrow')
   @choice.angle = 180
   # set x, y and z positions
   @choice.x, @choice.y, @choice.z, @choice.opacity = 204, 448, 5001, 108
   # set x position offset
   @choice.ox = -8
   # set active flag
   @active = true
   # set index
   @index = 0
   # set up mode flag
   @up_mode = true
   # create modified skill window
   @skill_window = Window_Skill_Hotkey.new($game_player.battler)
   @skill_window.y -= 66
   @skill_window.height -= 70
   # create modified item window
   @item_window = Window_Item_Hotkey.new
   @item_window.y -= 66
   @item_window.height -= 70
   # set last active
   @last_active = true
   # transtition
   Graphics.transition
   # loop
   loop do
     # update game screen
     Graphics.update
     # update input
     Input.update
     # frame update
     update
     # stop if chosen an option
     break if $scene != self
   end
   # freeze screen
   Graphics.freeze
   # delete spriteset
   @spriteset.dispose
   # delete HUD elements that exist
   [@hud, @hotkeys, @minimap].each {|s| s.dispose if s != nil}
   # delete choice sprite
   @choice.dispose
   # delete skill window
   @skill_window.dispose
   # delete item window
   @item_window.dispose
   # delete viewport
   @view.dispose
   # while real leader is not first actor in party
   while @party_leader != $game_party.actors[0]
     # switch to next actor
     $BlizzABS.player.switch_leader
   end
 end
 
 def update_choice
   # set x position
   @choice.x = 204 + @index * 30
   # if pressed B
   if Input.trigger?(Input::B)
     # play cancel sound
     $game_system.se_play($data_system.cancel_se)
     # create map scene
     $scene = Scene_Map.new
   # if C is pressed
   elsif Input.trigger?(Input::C)
     # play sound
     $game_system.se_play($data_system.decision_se)
     # not active
     @active = false
     # the one that was active the last time is now active
     @skill_window.active = @last_active
     @item_window.active = (!@last_active)
   # if RIGHT is being pressed
   elsif Input.repeat?(Input::RIGHT)
     # if RIGHT is pressed or index is less than 9
     if Input.trigger?(Input::RIGHT) || @index < 9
       # play sound
       $game_system.se_play($data_system.cursor_se)
       # set new index
       @index = (@index + 1) % 10
     end
   # if LEFT is being pressed
   elsif Input.repeat?(Input::LEFT)
     # if LEFT is pressed or index is equal or greater than 1
     if Input.trigger?(Input::LEFT) || @index >= 1
       # play sound
       $game_system.se_play($data_system.cursor_se)
       # set new index
       @index = (@index + 9) % 10
     end
   end
 end
 
end

class Map_Back < Sprite
 
 def initialize(map)
   super()
   self.x ,self.y, self.z = 474, 356, 4999
   self.bitmap = RPG::Cache.picture('Map_Back')
   cw = bitmap.width
   ch = bitmap.height
   src_rect = Rect.new(0, 0, cw, ch)
   self.bitmap.blt(0, 0, bitmap, src_rect)
   @map = map
 end
 
 def update
   self.opacity = @map.opacity
   if $game_system.minimap != 1
     self.visible = false
   end
 end
 
end

class Map_Name < Sprite
 
 def initialize(map)
   super()
   self.x ,self.y, self.z = 474, 456, 5001
   self.bitmap = Bitmap.new(120,32)
   self.bitmap.font.color = Color.new(255,255,255)
   self.bitmap.font.size = 16
   draw_map_name
   @map = map
 end
 
 def draw_map_name
   self.bitmap.clear
   @map_id = $game_map.map_id
   self.bitmap.draw_text_full(0,0, 160, 20, $map_infos[@map_id],1)
 end
 
 def update
   super
   self.opacity = @map.opacity
   if $game_system.minimap != 1
     self.visible = false
   end
   draw_map_name if @map_id != $game_map.map_id
 end
 
end

class Player_Name < Sprite
 
 def initialize(hud)
   super()
   self.x ,self.y, self.z = 123, 441, 5001
   self.bitmap = Bitmap.new(120,32)
   self.bitmap.font.color = Color.new(255,255,255)
   self.bitmap.font.size = 14
   @hud = hud
   draw_text
 end
 
 def draw_text
   self.bitmap.clear
   @actor = @hud.actor
   self.bitmap.font.color = Color.new(255, 255, 255)
   self.bitmap.draw_text_full(0,0, 120, 20, @actor.name)
 end
 
 def update
   super
   self.opacity = @hud.opacity
   draw_text if @actor != @hud.actor
 end
 
end

class Player_Lvl < Sprite
 
 def initialize(hud)
   super()
   self.x ,self.y, self.z = 123, 461, 5001
   self.bitmap = Bitmap.new(120,32)
   self.bitmap.font.color = Color.new(255,255,255)
   self.bitmap.font.size = 12
   @hud = hud
   draw_text
 end
 
 def draw_text
   self.bitmap.clear
   @level = @hud.actor.level
   self.bitmap.font.color = system_color
   self.bitmap.draw_text_full(0,0, 120, 20, 'LV')
   self.bitmap.font.color = normal_color
   self.bitmap.draw_text_full(15,0, 20, 20, @level.to_s,2)
 end
 
 def update
   super
   self.opacity = @hud.opacity
   draw_text if @level != @hud.actor.level
 end
 
end

class Game_Actor < Game_Battler
 
 def cur_exp
   return (@exp - @exp_list[@level] > 0 ? @exp - @exp_list[@level] : 0)
 end
 
 def max_exp
   return (@exp_list[@level] - @exp_list[@level+1]).abs
 end
 
end

class Bitmap
 
 def picture_bar(x,y,r,image)
   empty_bar = RPG::Cache.picture('empty_'+image)
   bar       = RPG::Cache.picture(image)
   h = bar.height
   w = bar.width
   self.blt(x,y,empty_bar,Rect.new(0,0,w,h))
   self.blt(x,y,bar,Rect.new(0,0,w*r,h))
 end

end

which doesnt work with "Blizz-ABS Action Recharge Time by Winkio" a script i need to use.
Thanks in advance to who ever even bothers to try.

nathmatt

May 05, 2011, 09:30:17 am #1 Last Edit: May 05, 2011, 03:48:18 pm by nathmatt
doesn't just tested worked just fine for me ?
make sure action recharge times is below the hud

btw i edited it some to allow easy graphic name changes and so the you can put them in a folder called HUD in the picture folder

Spoiler: ShowHide
module Hud_Config
 HP       = 'HP'
 MP       = 'MP'
 EXP      = 'EXP'
 Empty    = 'Empty'
 EmptyExp = 'Empty_Exp'
 Back     = 'Back'
 MapBack  = 'Map_Back'
 EmptyExt = 'Empty_'
end
#==============================================================================
# Hud
#------------------------------------------------------------------------------
#  This class was modified to support SR display and modify the number of
#  skills left to use.
#==============================================================================
$map_infos = load_data('Data/MapInfos.rxdata')
$map_infos.keys.each {|key| $map_infos[key] = $map_infos[key].name}
class Hud < Sprite
 
 #----------------------------------------------------------------------------
 # Initialization
 #  viewport - the viewport for the sprite
 #----------------------------------------------------------------------------
 def initialize(viewport = nil)
   # call superclass method
   super
   # create positions
   create_positions
   # get height
   h = @hud_height
   $game_system.minimap = 1
   $game_system.hotkeys = true
   @name = Player_Name.new(self)
   @lvl  = Player_Lvl.new(self)
   # create bitmap
   self.bitmap = Bitmap.new(@hud_width, h)
   # set font
   self.bitmap.font.name = 'Arial'
   # set font size
   self.bitmap.font.size = 12
   # set font to bold
   self.bitmap.font.bold = true
   # set x, y position depending on which HUD mode
   self.y = 480 - (h)
   # set z coordinate
   self.z = 1000
   # draw basic HUD
   draw_basic
   # update
   update
 end
 #----------------------------------------------------------------------------
 # create_positions
 #  Sets drawing positions. Can be aliased and the positions modified to
 #  create a different HUD.
 #----------------------------------------------------------------------------
 def create_positions
   @original_width = @hud_width = 474
   @original_height = @hud_height = 54
   @hp_x, @hp_y, @sp_x, @sp_y = 3, 15, 3, 35
   @hot_x, @hot_y, @left_x, @left_y = 4, 49, 8, 63
   @exp_x,@exp_y = 175, 0
 end
 #----------------------------------------------------------------------------
 # draw_basic
 #  Draws the HUD template.
 #----------------------------------------------------------------------------
 def draw_basic
   # fill with grey rectangle
   bitmap = RPG::Cache.picture('HUD/'+Hud_Config::Back)
   cw = bitmap.width
   ch = bitmap.height
   src_rect = Rect.new(0, 0, cw, ch)
   self.bitmap.blt(0,0, bitmap, src_rect)
   # determine color depending on HUD style
   color = case BlizzABS::Config::HUD_TYPE
   when 0 then Color.new(255, 255, 255, 192)
   when 1 then Color.new(0, 0, 0, 0)
   end
   # if color exists
   if color.is_a?(Color)
     # draw outline in color
     self.bitmap.fill_rect(@hp_x, @hp_y+3, 116, 14, color)
     # draw outline in color
     self.bitmap.fill_rect(@sp_x, @sp_y+3, 116, 14, color)
   end
   # set font color
   self.bitmap.font.color = system_color
 end
 #----------------------------------------------------------------------------
 # draw_empty
 #  Draws the HP and SP display when actor doesn't exist.
 #----------------------------------------------------------------------------
 def draw_empty
   # draw empty bars
   self.bitmap.gradient_bar_hud(@hp_x, @hp_y+3, 114, 0, 'hud_red_bar', 1)
   # draw empty bars
   self.bitmap.gradient_bar_hud(@sp_x, @sp_y+3, 114, 0, 'hud_blue_bar', 2)
   # draw empty bars
   self.bitmap.gradient_bar_hud(@exp_x, @exp_y+3, 200,0, 'hud_green_bar', 3)
   # set font color
   self.bitmap.font.color = disabled_color
   # draw empty HP
   self.bitmap.draw_text_full(@hp_x + 6, @hp_y, 48, 20, '0', 2)
   self.bitmap.draw_text_full(@hp_x + 54, @hp_y, 12, 20, '/', 1)
   self.bitmap.draw_text_full(@hp_x + 66, @hp_y, 48, 20, '0')
   # draw empty SP
   self.bitmap.draw_text_full(@sp_x + 6, @sp_y, 48, 20, '0', 2)
   self.bitmap.draw_text_full(@sp_x + 54, @sp_y, 12, 20, '/', 1)
   self.bitmap.draw_text_full(@sp_x + 66, @sp_y, 48, 20, '0')
    # draw empty EXP
   self.bitmap.draw_text_full(@exp_x + 54, @exp_y, 84, 20, '0.0', 2)
   # reset all flag variables
   @name = @level = @hp = @sp = @maxhp = @maxsp = @exp = @states = @skill =
       @skills_left = @item = @items_left = @gold = @exp = nil
 end
 #----------------------------------------------------------------------------
 # draw_hp
 #  Draws the HP display.
 #----------------------------------------------------------------------------
 def draw_hp
   # set current variables
   @hp, @maxhp = actor.hp, actor.maxhp
   # set fill rate
   rate = (@maxhp > 0 ? @hp.to_f / @maxhp : 0)
   # draw gradient bar
   self.bitmap.picture_bar(@hp_x, @hp_y+3,rate,Hud_Config::HP)
   # set font color depending on how many HP left
   self.bitmap.font.color = @hp == 0 ? knockout_color :
       @hp <= @maxhp / 4 ? crisis_color : normal_color
   # draw HP
   self.bitmap.draw_text_full(@hp_x+6, @hp_y, 48, 20, @hp.to_s, 2)
   # set color
   self.bitmap.font.color = normal_color
   # draw "/"
   self.bitmap.draw_text_full(@hp_x+54, @hp_y, 12, 20, '/', 1)
   # draw max HP
   self.bitmap.draw_text_full(@hp_x+66, @hp_y, 48, 20, @maxhp.to_s)
   self.bitmap.draw_text_full(@hp_x+2, @hp_y, 32, 20, $data_system.words.hp)
 end
 #----------------------------------------------------------------------------
 # draw_sp
 #  Draws the SP display.
 #----------------------------------------------------------------------------
 def draw_sp
   # set current variables
   @sp, @maxsp = actor.sp, actor.maxsp
   # set fill rate
   rate = (@maxsp > 0 ? @sp.to_f / @maxsp : 0)
   # draw gradient bar
   self.bitmap.picture_bar(@sp_x, @sp_y+3,rate,Hud_Config::MP)
   # set font color depending on how many SP left
   self.bitmap.font.color = @sp == 0 ? knockout_color :
       @sp <= @maxsp / 4 ? crisis_color : normal_color
   # draw SP
   self.bitmap.draw_text_full(@sp_x+6, @sp_y, 48, 20, @sp.to_s, 2)
   # set font color
   self.bitmap.font.color = normal_color
   # draw "/"
   self.bitmap.draw_text_full(@sp_x+54, @sp_y, 12, 20, '/', 1)
   # draw max SP
   self.bitmap.draw_text_full(@sp_x+66, @sp_y, 48, 20, @maxsp.to_s)
   self.bitmap.draw_text_full(@sp_x+2, @sp_y, 32, 20, $data_system.words.sp)
 end
 #----------------------------------------------------------------------------
 # draw_exp
 #  Draws the EXP display.
 #----------------------------------------------------------------------------
 def draw_exp
   # set current variables
   @exp = actor.exp
   # set fill rate
   rate = (actor.next_exp != 0 ? actor.now_exp.to_f / actor.next_exp : 1)
   # draw gradient bar
   self.bitmap.picture_bar(@exp_x, @exp_y+3,rate,Hud_Config::EXP)
   self.bitmap.font.color = normal_color
   percent = (rate * 100).to_i
   self.bitmap.draw_text_full(@exp_x+60, @exp_y, 200, 18,
   "#{actor.cur_exp} / #{actor.max_exp}")
   self.bitmap.draw_text_full(@exp_x+195, @exp_y, 145, 18,percent.to_s)
   self.bitmap.draw_text_full(@exp_x+210, @exp_y, 150, 18,'%')
   self.bitmap.draw_text_full(@exp_x+2, @exp_y, 32, 18, 'EXP')
 end
 
 def draw_name
 end
 
 def draw_level
 end

 alias hud_update update
 def update
   draw_basic  if $game_temp.hud_refresh
   $game_temp.hud_refresh ? draw_exp : test_exp if actor != nil
   @name.update
   @lvl.update
   hud_update
 end
 
 def dispose
   super
   @name.dispose
   @lvl.dispose
 end
 
 def test_exp
   draw_exp if actor.exp != @exp
 end
 
 def test_name
   return
 end
 
 def test_level
   return
 end
 
end

class Hotkey_Assignment < Sprite
 
 def initialize(viewport = nil)
   # call superclass
   super
   # create bitmap
   self.bitmap = Bitmap.new(320, 32)
   # set font to bold
   self.bitmap.font.bold = true
   # decrease font size
   self.bitmap.font.size -= 8
   # set font color
   self.bitmap.font.color = system_color
   # set x and y position
   self.x, self.y, self.z = 174, 448, 1100
   # skill IDs on hotkeys
   @skills = BlizzABS::Cache::EmptyKeys
   # item IDs on hotkeys
   @items = BlizzABS::Cache::EmptyKeys
   # update display
   update
 end
 
 def draw(index = nil)
   # iterate through all hotkeys
   (index == nil ? BlizzABS::Cache::HotkeyRange : [index]).each {|i|
       # if hotkey is skill hotkey
       if $game_player.skill_hotkeys[i%10] != 0
         # temporary object
         object = $data_skills[$game_player.skill_hotkeys[i%10]]
       # if hotkey is item hotkey
       elsif $game_player.item_hotkeys[i%10] != 0
         # temporary object
         object = $data_items[$game_player.item_hotkeys[i%10]]
       end
       # if any change applied (10 is used for 0)
       if @items[i%10] != $game_player.item_hotkeys[i%10] ||
           @skills[i%10] != $game_player.skill_hotkeys[i%10]
         $game_temp.hud_refresh = true
         # if object exists
         if object != nil
           # load bitmap
           bitmap = RPG::Cache.icon(object.icon_name)
           # draw bitmap
           self.bitmap.blt(30*(i-1), 0, bitmap, Rect.new(0, 0, 24, 24))
         end
         # draw hotkey number
         self.bitmap.draw_text_full(30*(i-1), 10, 30, 32, (i%10).to_s, 2)
       end}
   # set new items
   @items = $game_player.item_hotkeys.clone
   # set new skills
   @skills = $game_player.skill_hotkeys.clone
 end
 
end

class Minimap < Sprite
 
 def initialize
   # call superclass method
   super(Viewport.new(483, 364, 150, 110))
   # get autotile image from Blizz-ABS Cache
   @autotile = $BlizzABS.cache.image('minimap_autotile')
   # creates the passable floor map
   @map_back = Map_Back.new(self)
   create_passable_floor
   # set x and y position
   self.x = self.y = 0
   # set z position
   viewport.z = 5000
   # store events
   @events, @names = check_events
   # create sprites for events
   create_sevents
   @map_name = Map_Name.new(self)
   # set all sprites visible
   self.visible = true
   # update
   update
 end
 
 alias hud_update update
 def update(con=false)
   hud_update(con)
   @map_back.update
   @map_name.update
 end
 
 def dispose
   destroy_sevents
   @map_back.dispose
   @map_name.dispose
   super
 end
 
end

class Scene_Hotkeys
 
 #----------------------------------------------------------------------------
 # main
 #  The main processing method.
 #----------------------------------------------------------------------------
 def main
   # create spriteset
   @spriteset = Spriteset_Map.new
   # create viewport
   @view = Viewport.new(0, 0, 0, 0)
   # set tone to current screen tone
   @view.tone = @tone.clone
   # create HUD if HUD is turned on and HUD active
   @hud = Hud.new if BlizzABS::Config::HUD_ENABLED && $game_system.hud
   # if ASSIGNMENT is turned
   if BlizzABS::Config::HOTKEYS
     # create assignment display
     @hotkeys = Hotkey_Assignment.new
     # set z position
     @hotkeys.z = 5000
   end
   # if MINIMAP is turned on and minimap active
   if BlizzABS::Config::MINIMAP && $game_system.minimap > 0
     # create minimap
     @minimap = Minimap.new
   end
   # create sprite
   @choice = Sprite.new
   # create bitmap
   @choice.bitmap = $BlizzABS.cache.image('menu_arrow')
   @choice.angle = 180
   # set x, y and z positions
   @choice.x, @choice.y, @choice.z, @choice.opacity = 204, 448, 5001, 108
   # set x position offset
   @choice.ox = -8
   # set active flag
   @active = true
   # set index
   @index = 0
   # set up mode flag
   @up_mode = true
   # create modified skill window
   @skill_window = Window_Skill_Hotkey.new($game_player.battler)
   @skill_window.y -= 66
   @skill_window.height -= 70
   # create modified item window
   @item_window = Window_Item_Hotkey.new
   @item_window.y -= 66
   @item_window.height -= 70
   # set last active
   @last_active = true
   # transtition
   Graphics.transition
   # loop
   loop do
     # update game screen
     Graphics.update
     # update input
     Input.update
     # frame update
     update
     # stop if chosen an option
     break if $scene != self
   end
   # freeze screen
   Graphics.freeze
   # delete spriteset
   @spriteset.dispose
   # delete HUD elements that exist
   [@hud, @hotkeys, @minimap].each {|s| s.dispose if s != nil}
   # delete choice sprite
   @choice.dispose
   # delete skill window
   @skill_window.dispose
   # delete item window
   @item_window.dispose
   # delete viewport
   @view.dispose
   # while real leader is not first actor in party
   while @party_leader != $game_party.actors[0]
     # switch to next actor
     $BlizzABS.player.switch_leader
   end
 end
 
 def update_choice
   # set x position
   @choice.x = 204 + @index * 30
   # if pressed B
   if Input.trigger?(Input::B)
     # play cancel sound
     $game_system.se_play($data_system.cancel_se)
     # create map scene
     $scene = Scene_Map.new
   # if C is pressed
   elsif Input.trigger?(Input::C)
     # play sound
     $game_system.se_play($data_system.decision_se)
     # not active
     @active = false
     # the one that was active the last time is now active
     @skill_window.active = @last_active
     @item_window.active = (!@last_active)
   # if RIGHT is being pressed
   elsif Input.repeat?(Input::RIGHT)
     # if RIGHT is pressed or index is less than 9
     if Input.trigger?(Input::RIGHT) || @index < 9
       # play sound
       $game_system.se_play($data_system.cursor_se)
       # set new index
       @index = (@index + 1) % 10
     end
   # if LEFT is being pressed
   elsif Input.repeat?(Input::LEFT)
     # if LEFT is pressed or index is equal or greater than 1
     if Input.trigger?(Input::LEFT) || @index >= 1
       # play sound
       $game_system.se_play($data_system.cursor_se)
       # set new index
       @index = (@index + 9) % 10
     end
   end
 end
 
end

class Map_Back < Sprite
 
 def initialize(map)
   super()
   self.x ,self.y, self.z = 474, 356, 4999
   self.bitmap = RPG::Cache.picture('HUD/'+Hud_Config::MapBack)
   cw = bitmap.width
   ch = bitmap.height
   src_rect = Rect.new(0, 0, cw, ch)
   self.bitmap.blt(0, 0, bitmap, src_rect)
   @map = map
 end
 
 def update
   self.opacity = @map.opacity
   if $game_system.minimap != 1
     self.visible = false
   end
 end
 
end

class Map_Name < Sprite
 
 def initialize(map)
   super()
   self.x ,self.y, self.z = 474, 456, 5001
   self.bitmap = Bitmap.new(120,32)
   self.bitmap.font.color = Color.new(255,255,255)
   self.bitmap.font.size = 16
   draw_map_name
   @map = map
 end
 
 def draw_map_name
   self.bitmap.clear
   @map_id = $game_map.map_id
   self.bitmap.draw_text_full(0,0, 160, 20, $map_infos[@map_id],1)
 end
 
 def update
   super
   self.opacity = @map.opacity
   if $game_system.minimap != 1
     self.visible = false
   end
   draw_map_name if @map_id != $game_map.map_id
 end
 
end

class Player_Name < Sprite
 
 def initialize(hud)
   super()
   self.x ,self.y, self.z = 123, 441, 5001
   self.bitmap = Bitmap.new(120,32)
   self.bitmap.font.color = Color.new(255,255,255)
   self.bitmap.font.size = 14
   @hud = hud
   draw_text
 end
 
 def draw_text
   self.bitmap.clear
   @actor = @hud.actor
   self.bitmap.font.color = Color.new(255, 255, 255)
   self.bitmap.draw_text_full(0,0, 120, 20, @actor.name)
 end
 
 def update
   super
   self.opacity = @hud.opacity
   draw_text if @actor != @hud.actor
 end
 
end

class Player_Lvl < Sprite
 
 def initialize(hud)
   super()
   self.x ,self.y, self.z = 123, 461, 5001
   self.bitmap = Bitmap.new(120,32)
   self.bitmap.font.color = Color.new(255,255,255)
   self.bitmap.font.size = 12
   @hud = hud
   draw_text
 end
 
 def draw_text
   self.bitmap.clear
   @level = @hud.actor.level
   self.bitmap.font.color = system_color
   self.bitmap.draw_text_full(0,0, 120, 20, 'LV')
   self.bitmap.font.color = normal_color
   self.bitmap.draw_text_full(15,0, 20, 20, @level.to_s,2)
 end
 
 def update
   super
   self.opacity = @hud.opacity
   draw_text if @level != @hud.actor.level
 end
 
end

class Game_Actor < Game_Battler
 
 def cur_exp
   return (@exp - @exp_list[@level] > 0 ? @exp - @exp_list[@level] : 0)
 end
 
 def max_exp
   return (@exp_list[@level] - @exp_list[@level+1]).abs
 end
 
end

class Bitmap
 
 def picture_bar(x,y,r,image)
   empty_bar = RPG::Cache.picture('HUD/'+Hud_Config::EmptyExt+image)
   bar       = RPG::Cache.picture('HUD/'+image)
   h = bar.height
   w = bar.width
   self.blt(x,y,empty_bar,Rect.new(0,0,w,h))
   self.blt(x,y,bar,Rect.new(0,0,w*r,h))
 end

end


edit noticed it was the alignment that was messed up put this script below Action recharge times

Spoiler: ShowHide
class Hotkey_Assignment_Recharge < Sprite
 
 #----------------------------------------------------------------------------
 # draw
 #  Draws the recharge sectors over the hotkey display.
 #----------------------------------------------------------------------------
 def draw(index = nil)
   # iterate through all skills that need to be recharged
   (@skillrecharge).each {|i|
     # temporary var
     object = $data_skills[$game_player.skill_hotkeys[i%10]]
     ind = $game_player.skill_hotkeys[i%10]+1
     if $game_player.recharging?(ind)
       # remove old image
       self.bitmap.fill_rect(30*(i-1), 0, 32, 32, Color.new(0, 0, 0, 0))
       # draw recharge indicator
       len = (24*$game_player.rech_rate(ind)).to_i
       self.bitmap.fill_rect(30*(i-1)+4, 0, len, 4, Color.new(255, 255, 0))
       self.bitmap.draw_text_full(30*(i-1)+4, 4, 24, 24, (($game_player.rechcounter[ind]/40).to_i+1).to_s, 1)
     else
       if object != nil
         # remove old image
         self.bitmap.fill_rect(30*(i-1), 0, 32, 32, Color.new(0, 0, 0, 0))
       end
       @skillrecharge.delete(i)
     end}
   # iterate through all items that need to be recharged
   (@itemrecharge).each {|i|
     # temporary var
     object = $data_items[$game_player.item_hotkeys[i%10]]
     ind = $game_player.item_hotkeys[i%10]+1
     if $game_player.recharging?(ind)
       # remove old image
       self.bitmap.fill_rect(30*(i-1), 0, 32, 32, Color.new(0, 0, 0, 0))
       # draw recharge indicator
       len = (24*$game_player.rech_rate(ind)).to_i
       self.bitmap.fill_rect(30*(i-1)+4, 0, len, 4, Color.new(255, 255, 0))
       self.bitmap.draw_text_full(30*(i-1)+4, 4, 24, 24, (($game_player.rechcounter[ind]/40).to_i+1).to_s, 1)
     else
       if object != nil
         # remove old image
         self.bitmap.fill_rect(30*(i-1), 0, 32, 32, Color.new(0, 0, 0, 0))
       end
       @itemrecharge.delete(i)
     end}
   end
   
end
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Shalaren

May 05, 2011, 04:53:49 pm #2 Last Edit: May 05, 2011, 05:08:57 pm by Shalaren
AWSOME! thanks alot :) *lvup* Your really helping Alot :}}}
if were already at it check the mini map, theres a little problem with it not showing all of the map, meaning, try going down at the map, like till you touch the end of the screen, and the arrow on the map is gone.

nathmatt

i fixed it but you will need to edit you map back some because the only fix is to make the map back to the original size i apparently made it smaller

fixed: ShowHide
module Hud_Config
  HP       = 'HP'
  MP       = 'MP'
  EXP      = 'EXP'
  Empty    = 'Empty'
  EmptyExp = 'Empty_Exp'
  Back     = 'Back'
  MapBack  = 'Map_Back'
  EmptyExt = 'Empty_'
end
#==============================================================================
# Hud
#------------------------------------------------------------------------------
#  This class was modified to support SR display and modify the number of
#  skills left to use.
#==============================================================================
$map_infos = load_data('Data/MapInfos.rxdata')
$map_infos.keys.each {|key| $map_infos[key] = $map_infos[key].name}
class Hud < Sprite
 
  #----------------------------------------------------------------------------
  # Initialization
  #  viewport - the viewport for the sprite
  #----------------------------------------------------------------------------
  def initialize(viewport = nil)
    # call superclass method
    super
    # create positions
    create_positions
    # get height
    h = @hud_height
    $game_system.minimap = 1
    $game_system.hotkeys = true
    @name = Player_Name.new(self)
    @lvl  = Player_Lvl.new(self)
    # create bitmap
    self.bitmap = Bitmap.new(@hud_width, h)
    # set font
    self.bitmap.font.name = 'Arial'
    # set font size
    self.bitmap.font.size = 12
    # set font to bold
    self.bitmap.font.bold = true
    # set x, y position depending on which HUD mode
    self.y = 480 - (h)
    # set z coordinate
    self.z = 1000
    # draw basic HUD
    draw_basic
    # update
    update
  end
  #----------------------------------------------------------------------------
  # create_positions
  #  Sets drawing positions. Can be aliased and the positions modified to
  #  create a different HUD.
  #----------------------------------------------------------------------------
  def create_positions
    @original_width = @hud_width = 474
    @original_height = @hud_height = 54
    @hp_x, @hp_y, @sp_x, @sp_y = 3, 15, 3, 35
    @hot_x, @hot_y, @left_x, @left_y = 4, 49, 8, 63
    @exp_x,@exp_y = 175, 0
  end
  #----------------------------------------------------------------------------
  # draw_basic
  #  Draws the HUD template.
  #----------------------------------------------------------------------------
  def draw_basic
    # fill with grey rectangle
    bitmap = RPG::Cache.picture('HUD/'+Hud_Config::Back)
    cw = bitmap.width
    ch = bitmap.height
    src_rect = Rect.new(0, 0, cw, ch)
    self.bitmap.blt(0,0, bitmap, src_rect)
    # determine color depending on HUD style
    color = case BlizzABS::Config::HUD_TYPE
    when 0 then Color.new(255, 255, 255, 192)
    when 1 then Color.new(0, 0, 0, 0)
    end
    # if color exists
    if color.is_a?(Color)
      # draw outline in color
      self.bitmap.fill_rect(@hp_x, @hp_y+3, 116, 14, color)
      # draw outline in color
      self.bitmap.fill_rect(@sp_x, @sp_y+3, 116, 14, color)
    end
    # set font color
    self.bitmap.font.color = system_color
  end
  #----------------------------------------------------------------------------
  # draw_empty
  #  Draws the HP and SP display when actor doesn't exist.
  #----------------------------------------------------------------------------
  def draw_empty
    # draw empty bars
    self.bitmap.gradient_bar_hud(@hp_x, @hp_y+3, 114, 0, 'hud_red_bar', 1)
    # draw empty bars
    self.bitmap.gradient_bar_hud(@sp_x, @sp_y+3, 114, 0, 'hud_blue_bar', 2)
    # draw empty bars
    self.bitmap.gradient_bar_hud(@exp_x, @exp_y+3, 200,0, 'hud_green_bar', 3)
    # set font color
    self.bitmap.font.color = disabled_color
    # draw empty HP
    self.bitmap.draw_text_full(@hp_x + 6, @hp_y, 48, 20, '0', 2)
    self.bitmap.draw_text_full(@hp_x + 54, @hp_y, 12, 20, '/', 1)
    self.bitmap.draw_text_full(@hp_x + 66, @hp_y, 48, 20, '0')
    # draw empty SP
    self.bitmap.draw_text_full(@sp_x + 6, @sp_y, 48, 20, '0', 2)
    self.bitmap.draw_text_full(@sp_x + 54, @sp_y, 12, 20, '/', 1)
    self.bitmap.draw_text_full(@sp_x + 66, @sp_y, 48, 20, '0')
     # draw empty EXP
    self.bitmap.draw_text_full(@exp_x + 54, @exp_y, 84, 20, '0.0', 2)
    # reset all flag variables
    @name = @level = @hp = @sp = @maxhp = @maxsp = @exp = @states = @skill =
        @skills_left = @item = @items_left = @gold = @exp = nil
  end
  #----------------------------------------------------------------------------
  # draw_hp
  #  Draws the HP display.
  #----------------------------------------------------------------------------
  def draw_hp
    # set current variables
    @hp, @maxhp = actor.hp, actor.maxhp
    # set fill rate
    rate = (@maxhp > 0 ? @hp.to_f / @maxhp : 0)
    # draw gradient bar
    self.bitmap.picture_bar(@hp_x, @hp_y+3,rate,Hud_Config::HP)
    # set font color depending on how many HP left
    self.bitmap.font.color = @hp == 0 ? knockout_color :
        @hp <= @maxhp / 4 ? crisis_color : normal_color
    # draw HP
    self.bitmap.draw_text_full(@hp_x+6, @hp_y, 48, 20, @hp.to_s, 2)
    # set color
    self.bitmap.font.color = normal_color
    # draw "/"
    self.bitmap.draw_text_full(@hp_x+54, @hp_y, 12, 20, '/', 1)
    # draw max HP
    self.bitmap.draw_text_full(@hp_x+66, @hp_y, 48, 20, @maxhp.to_s)
    self.bitmap.draw_text_full(@hp_x+2, @hp_y, 32, 20, $data_system.words.hp)
  end
  #----------------------------------------------------------------------------
  # draw_sp
  #  Draws the SP display.
  #----------------------------------------------------------------------------
  def draw_sp
    # set current variables
    @sp, @maxsp = actor.sp, actor.maxsp
    # set fill rate
    rate = (@maxsp > 0 ? @sp.to_f / @maxsp : 0)
    # draw gradient bar
    self.bitmap.picture_bar(@sp_x, @sp_y+3,rate,Hud_Config::MP)
    # set font color depending on how many SP left
    self.bitmap.font.color = @sp == 0 ? knockout_color :
        @sp <= @maxsp / 4 ? crisis_color : normal_color
    # draw SP
    self.bitmap.draw_text_full(@sp_x+6, @sp_y, 48, 20, @sp.to_s, 2)
    # set font color
    self.bitmap.font.color = normal_color
    # draw "/"
    self.bitmap.draw_text_full(@sp_x+54, @sp_y, 12, 20, '/', 1)
    # draw max SP
    self.bitmap.draw_text_full(@sp_x+66, @sp_y, 48, 20, @maxsp.to_s)
    self.bitmap.draw_text_full(@sp_x+2, @sp_y, 32, 20, $data_system.words.sp)
  end
  #----------------------------------------------------------------------------
  # draw_exp
  #  Draws the EXP display.
  #----------------------------------------------------------------------------
  def draw_exp
    # set current variables
    @exp = actor.exp
    # set fill rate
    rate = (actor.next_exp != 0 ? actor.now_exp.to_f / actor.next_exp : 1)
    # draw gradient bar
    self.bitmap.picture_bar(@exp_x, @exp_y+3,rate,Hud_Config::EXP)
    self.bitmap.font.color = normal_color
    percent = (rate * 100).to_i
    self.bitmap.draw_text_full(@exp_x+60, @exp_y, 200, 18,
    "#{actor.cur_exp} / #{actor.max_exp}")
    self.bitmap.draw_text_full(@exp_x+195, @exp_y, 145, 18,percent.to_s)
    self.bitmap.draw_text_full(@exp_x+210, @exp_y, 150, 18,'%')
    self.bitmap.draw_text_full(@exp_x+2, @exp_y, 32, 18, 'EXP')
  end
 
  def draw_name
  end
 
  def draw_level
  end

  alias hud_update update
  def update
    draw_basic  if $game_temp.hud_refresh
    $game_temp.hud_refresh ? draw_exp : test_exp if actor != nil
    @name.update
    @lvl.update
    hud_update
  end
 
  def dispose
    super
    @name.dispose
    @lvl.dispose
  end
 
  def test_exp
    draw_exp if actor.exp != @exp
  end
 
  def test_name
    return
  end
 
  def test_level
    return
  end
 
end

class Hotkey_Assignment < Sprite
 
  def initialize(viewport = nil)
    # call superclass
    super
    # create bitmap
    self.bitmap = Bitmap.new(320, 32)
    # set font to bold
    self.bitmap.font.bold = true
    # decrease font size
    self.bitmap.font.size -= 8
    # set font color
    self.bitmap.font.color = system_color
    # set x and y position
    self.x, self.y, self.z = 174, 448, 1100
    # skill IDs on hotkeys
    @skills = BlizzABS::Cache::EmptyKeys
    # item IDs on hotkeys
    @items = BlizzABS::Cache::EmptyKeys
    # update display
    update
  end
 
  def draw(index = nil)
    # iterate through all hotkeys
    (index == nil ? BlizzABS::Cache::HotkeyRange : [index]).each {|i|
        # if hotkey is skill hotkey
        if $game_player.skill_hotkeys[i%10] != 0
          # temporary object
          object = $data_skills[$game_player.skill_hotkeys[i%10]]
        # if hotkey is item hotkey
        elsif $game_player.item_hotkeys[i%10] != 0
          # temporary object
          object = $data_items[$game_player.item_hotkeys[i%10]]
        end
        # if any change applied (10 is used for 0)
        if @items[i%10] != $game_player.item_hotkeys[i%10] ||
            @skills[i%10] != $game_player.skill_hotkeys[i%10]
          $game_temp.hud_refresh = true
          # if object exists
          if object != nil
            # load bitmap
            bitmap = RPG::Cache.icon(object.icon_name)
            # draw bitmap
            self.bitmap.blt(30*(i-1), 0, bitmap, Rect.new(0, 0, 24, 24))
          end
          # draw hotkey number
          self.bitmap.draw_text_full(30*(i-1), 10, 30, 32, (i%10).to_s, 2)
        end}
    # set new items
    @items = $game_player.item_hotkeys.clone
    # set new skills
    @skills = $game_player.skill_hotkeys.clone
  end
 
end

class Minimap < Sprite
 
  def initialize
    # call superclass method
    super(Viewport.new(478, 359, 160, 120))
    # get autotile image from Blizz-ABS Cache
    @autotile = $BlizzABS.cache.image('minimap_autotile')
    # creates the passable floor map
    @map_back = Map_Back.new(self)
    create_passable_floor
    # set x and y position
    self.x = self.y = 0
    # set z position
    viewport.z = 5000
    # store events
    @events, @names = check_events
    # create sprites for events
    create_sevents
    @map_name = Map_Name.new(self)
    # set all sprites visible
    self.visible = true
    # update
    update
  end
 
  alias hud_update update
  def update(con=false)
    hud_update(con)
    @map_back.update
    @map_name.update
  end
 
  def dispose
    destroy_sevents
    @map_back.dispose
    @map_name.dispose
    super
  end
 
end

class Scene_Hotkeys
 
  #----------------------------------------------------------------------------
  # main
  #  The main processing method.
  #----------------------------------------------------------------------------
  def main
    # create spriteset
    @spriteset = Spriteset_Map.new
    # create viewport
    @view = Viewport.new(0, 0, 0, 0)
    # set tone to current screen tone
    @view.tone = @tone.clone
    # create HUD if HUD is turned on and HUD active
    @hud = Hud.new if BlizzABS::Config::HUD_ENABLED && $game_system.hud
    # if ASSIGNMENT is turned
    if BlizzABS::Config::HOTKEYS
      # create assignment display
      @hotkeys = Hotkey_Assignment.new
      # set z position
      @hotkeys.z = 5000
    end
    # if MINIMAP is turned on and minimap active
    if BlizzABS::Config::MINIMAP && $game_system.minimap > 0
      # create minimap
      @minimap = Minimap.new
    end
    # create sprite
    @choice = Sprite.new
    # create bitmap
    @choice.bitmap = $BlizzABS.cache.image('menu_arrow')
    @choice.angle = 180
    # set x, y and z positions
    @choice.x, @choice.y, @choice.z, @choice.opacity = 204, 448, 5001, 108
    # set x position offset
    @choice.ox = -8
    # set active flag
    @active = true
    # set index
    @index = 0
    # set up mode flag
    @up_mode = true
    # create modified skill window
    @skill_window = Window_Skill_Hotkey.new($game_player.battler)
    @skill_window.y -= 66
    @skill_window.height -= 70
    # create modified item window
    @item_window = Window_Item_Hotkey.new
    @item_window.y -= 66
    @item_window.height -= 70
    # set last active
    @last_active = true
    # transtition
    Graphics.transition
    # loop
    loop do
      # update game screen
      Graphics.update
      # update input
      Input.update
      # frame update
      update
      # stop if chosen an option
      break if $scene != self
    end
    # freeze screen
    Graphics.freeze
    # delete spriteset
    @spriteset.dispose
    # delete HUD elements that exist
    [@hud, @hotkeys, @minimap].each {|s| s.dispose if s != nil}
    # delete choice sprite
    @choice.dispose
    # delete skill window
    @skill_window.dispose
    # delete item window
    @item_window.dispose
    # delete viewport
    @view.dispose
    # while real leader is not first actor in party
    while @party_leader != $game_party.actors[0]
      # switch to next actor
      $BlizzABS.player.switch_leader
    end
  end
 
  def update_choice
    # set x position
    @choice.x = 204 + @index * 30
    # if pressed B
    if Input.trigger?(Input::B)
      # play cancel sound
      $game_system.se_play($data_system.cancel_se)
      # create map scene
      $scene = Scene_Map.new
    # if C is pressed
    elsif Input.trigger?(Input::C)
      # play sound
      $game_system.se_play($data_system.decision_se)
      # not active
      @active = false
      # the one that was active the last time is now active
      @skill_window.active = @last_active
      @item_window.active = (!@last_active)
    # if RIGHT is being pressed
    elsif Input.repeat?(Input::RIGHT)
      # if RIGHT is pressed or index is less than 9
      if Input.trigger?(Input::RIGHT) || @index < 9
        # play sound
        $game_system.se_play($data_system.cursor_se)
        # set new index
        @index = (@index + 1) % 10
      end
    # if LEFT is being pressed
    elsif Input.repeat?(Input::LEFT)
      # if LEFT is pressed or index is equal or greater than 1
      if Input.trigger?(Input::LEFT) || @index >= 1
        # play sound
        $game_system.se_play($data_system.cursor_se)
        # set new index
        @index = (@index + 9) % 10
      end
    end
  end
 
end

class Map_Back < Sprite
 
  def initialize(map)
    super()
    self.x ,self.y, self.z = 474, 356, 4999
    self.bitmap = RPG::Cache.picture('HUD/'+Hud_Config::MapBack)
    cw = bitmap.width
    ch = bitmap.height
    src_rect = Rect.new(0, 0, cw, ch)
    self.bitmap.blt(0, 0, bitmap, src_rect)
    @map = map
  end
 
  def update
    self.opacity = @map.opacity
    if $game_system.minimap != 1
      self.visible = false
    end
  end
 
end

class Map_Name < Sprite
 
  def initialize(map)
    super()
    self.x ,self.y, self.z = 474, 456, 5001
    self.bitmap = Bitmap.new(120,32)
    self.bitmap.font.color = Color.new(255,255,255)
    self.bitmap.font.size = 16
    draw_map_name
    @map = map
  end
 
  def draw_map_name
    self.bitmap.clear
    @map_id = $game_map.map_id
    self.bitmap.draw_text_full(0,0, 160, 20, $map_infos[@map_id],1)
  end
 
  def update
    super
    self.opacity = @map.opacity
    if $game_system.minimap != 1
      self.visible = false
    end
    draw_map_name if @map_id != $game_map.map_id
  end
 
end

class Player_Name < Sprite
 
  def initialize(hud)
    super()
    self.x ,self.y, self.z = 123, 441, 5001
    self.bitmap = Bitmap.new(120,32)
    self.bitmap.font.color = Color.new(255,255,255)
    self.bitmap.font.size = 14
    @hud = hud
    draw_text
  end
 
  def draw_text
    self.bitmap.clear
    @actor = @hud.actor
    self.bitmap.font.color = Color.new(255, 255, 255)
    self.bitmap.draw_text_full(0,0, 120, 20, @actor.name)
  end
 
  def update
    super
    self.opacity = @hud.opacity
    draw_text if @actor != @hud.actor
  end
 
end

class Player_Lvl < Sprite
 
  def initialize(hud)
    super()
    self.x ,self.y, self.z = 123, 461, 5001
    self.bitmap = Bitmap.new(120,32)
    self.bitmap.font.color = Color.new(255,255,255)
    self.bitmap.font.size = 12
    @hud = hud
    draw_text
  end
 
  def draw_text
    self.bitmap.clear
    @level = @hud.actor.level
    self.bitmap.font.color = system_color
    self.bitmap.draw_text_full(0,0, 120, 20, 'LV')
    self.bitmap.font.color = normal_color
    self.bitmap.draw_text_full(15,0, 20, 20, @level.to_s,2)
  end
 
  def update
    super
    self.opacity = @hud.opacity
    draw_text if @level != @hud.actor.level
  end
 
end

class Game_Actor < Game_Battler
 
  def cur_exp
    return (@exp - @exp_list[@level] > 0 ? @exp - @exp_list[@level] : 0)
  end
 
  def max_exp
    return (@exp_list[@level] - @exp_list[@level+1]).abs
  end
 
end

class Bitmap
 
  def picture_bar(x,y,r,image)
    empty_bar = RPG::Cache.picture('HUD/'+Hud_Config::EmptyExt+image)
    bar       = RPG::Cache.picture('HUD/'+image)
    h = bar.height
    w = bar.width
    self.blt(x,y,empty_bar,Rect.new(0,0,w,h))
    self.blt(x,y,bar,Rect.new(0,0,w*r,h))
  end

end
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Shalaren

Ah, alright, and um also another bug i noticed in this version, the map keeps on dissappearing when changing map and then coming back, instead of satying put with the hotkeys

nathmatt

it doesn't do it when i transfer maps
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Shalaren

when u transfer it doesnt do anything at all? it just stays there? doesnt even dissappear for a single second?
what it does is its kinda fading out when transfering to a map, but the moment the transfering is done the map is back

nathmatt

here is my test project you can see it doesn't disappear
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


nathmatt

i fixed a hotkey bug and its $game_system.hud = false

Spoiler: ShowHide
module Hud_Config
  HP       = 'HP'
  MP       = 'MP'
  EXP      = 'EXP'
  Empty    = 'Empty'
  EmptyExp = 'Empty_Exp'
  Back     = 'Back'
  MapBack  = 'Map_Back'
  EmptyExt = 'Empty_'
end
#==============================================================================
# Hud
#------------------------------------------------------------------------------
#  This class was modified to support SR display and modify the number of
#  skills left to use.
#==============================================================================
$map_infos = load_data('Data/MapInfos.rxdata')
$map_infos.keys.each {|key| $map_infos[key] = $map_infos[key].name}
class Hud < Sprite
 
  #----------------------------------------------------------------------------
  # Initialization
  #  viewport - the viewport for the sprite
  #----------------------------------------------------------------------------
  def initialize(viewport = nil)
    # call superclass method
    super
    # create positions
    create_positions
    # get height
    h = @hud_height
    $game_system.minimap = 1
    $game_system.hotkeys = true
    @name = Player_Name.new(self)
    @lvl  = Player_Lvl.new(self)
    # create bitmap
    self.bitmap = Bitmap.new(@hud_width, h)
    # set font
    self.bitmap.font.name = 'Arial'
    # set font size
    self.bitmap.font.size = 12
    # set font to bold
    self.bitmap.font.bold = true
    # set x, y position depending on which HUD mode
    self.y = 480 - (h)
    # set z coordinate
    self.z = 1000
    # draw basic HUD
    draw_basic
    # update
    update
  end
  #----------------------------------------------------------------------------
  # create_positions
  #  Sets drawing positions. Can be aliased and the positions modified to
  #  create a different HUD.
  #----------------------------------------------------------------------------
  def create_positions
    @original_width = @hud_width = 474
    @original_height = @hud_height = 54
    @hp_x, @hp_y, @sp_x, @sp_y = 3, 15, 3, 35
    @hot_x, @hot_y, @left_x, @left_y = 4, 49, 8, 63
    @exp_x,@exp_y = 175, 0
  end
  #----------------------------------------------------------------------------
  # draw_basic
  #  Draws the HUD template.
  #----------------------------------------------------------------------------
  def draw_basic
    # fill with grey rectangle
    bitmap = RPG::Cache.picture('HUD/'+Hud_Config::Back)
    cw = bitmap.width
    ch = bitmap.height
    src_rect = Rect.new(0, 0, cw, ch)
    self.bitmap.blt(0,0, bitmap, src_rect)
    # determine color depending on HUD style
    color = case BlizzABS::Config::HUD_TYPE
    when 0 then Color.new(255, 255, 255, 192)
    when 1 then Color.new(0, 0, 0, 0)
    end
    # if color exists
    if color.is_a?(Color)
      # draw outline in color
      self.bitmap.fill_rect(@hp_x, @hp_y+3, 116, 14, color)
      # draw outline in color
      self.bitmap.fill_rect(@sp_x, @sp_y+3, 116, 14, color)
    end
    # set font color
    self.bitmap.font.color = system_color
  end
  #----------------------------------------------------------------------------
  # draw_empty
  #  Draws the HP and SP display when actor doesn't exist.
  #----------------------------------------------------------------------------
  def draw_empty
    # draw empty bars
    self.bitmap.gradient_bar_hud(@hp_x, @hp_y+3, 114, 0, 'hud_red_bar', 1)
    # draw empty bars
    self.bitmap.gradient_bar_hud(@sp_x, @sp_y+3, 114, 0, 'hud_blue_bar', 2)
    # draw empty bars
    self.bitmap.gradient_bar_hud(@exp_x, @exp_y+3, 200,0, 'hud_green_bar', 3)
    # set font color
    self.bitmap.font.color = disabled_color
    # draw empty HP
    self.bitmap.draw_text_full(@hp_x + 6, @hp_y, 48, 20, '0', 2)
    self.bitmap.draw_text_full(@hp_x + 54, @hp_y, 12, 20, '/', 1)
    self.bitmap.draw_text_full(@hp_x + 66, @hp_y, 48, 20, '0')
    # draw empty SP
    self.bitmap.draw_text_full(@sp_x + 6, @sp_y, 48, 20, '0', 2)
    self.bitmap.draw_text_full(@sp_x + 54, @sp_y, 12, 20, '/', 1)
    self.bitmap.draw_text_full(@sp_x + 66, @sp_y, 48, 20, '0')
     # draw empty EXP
    self.bitmap.draw_text_full(@exp_x + 54, @exp_y, 84, 20, '0.0', 2)
    # reset all flag variables
    @name = @level = @hp = @sp = @maxhp = @maxsp = @exp = @states = @skill =
        @skills_left = @item = @items_left = @gold = @exp = nil
  end
  #----------------------------------------------------------------------------
  # draw_hp
  #  Draws the HP display.
  #----------------------------------------------------------------------------
  def draw_hp
    # set current variables
    @hp, @maxhp = actor.hp, actor.maxhp
    # set fill rate
    rate = (@maxhp > 0 ? @hp.to_f / @maxhp : 0)
    # draw gradient bar
    self.bitmap.picture_bar(@hp_x, @hp_y+3,rate,Hud_Config::HP)
    # set font color depending on how many HP left
    self.bitmap.font.color = @hp == 0 ? knockout_color :
        @hp <= @maxhp / 4 ? crisis_color : normal_color
    # draw HP
    self.bitmap.draw_text_full(@hp_x+6, @hp_y, 48, 20, @hp.to_s, 2)
    # set color
    self.bitmap.font.color = normal_color
    # draw "/"
    self.bitmap.draw_text_full(@hp_x+54, @hp_y, 12, 20, '/', 1)
    # draw max HP
    self.bitmap.draw_text_full(@hp_x+66, @hp_y, 48, 20, @maxhp.to_s)
    self.bitmap.draw_text_full(@hp_x+2, @hp_y, 32, 20, $data_system.words.hp)
  end
  #----------------------------------------------------------------------------
  # draw_sp
  #  Draws the SP display.
  #----------------------------------------------------------------------------
  def draw_sp
    # set current variables
    @sp, @maxsp = actor.sp, actor.maxsp
    # set fill rate
    rate = (@maxsp > 0 ? @sp.to_f / @maxsp : 0)
    # draw gradient bar
    self.bitmap.picture_bar(@sp_x, @sp_y+3,rate,Hud_Config::MP)
    # set font color depending on how many SP left
    self.bitmap.font.color = @sp == 0 ? knockout_color :
        @sp <= @maxsp / 4 ? crisis_color : normal_color
    # draw SP
    self.bitmap.draw_text_full(@sp_x+6, @sp_y, 48, 20, @sp.to_s, 2)
    # set font color
    self.bitmap.font.color = normal_color
    # draw "/"
    self.bitmap.draw_text_full(@sp_x+54, @sp_y, 12, 20, '/', 1)
    # draw max SP
    self.bitmap.draw_text_full(@sp_x+66, @sp_y, 48, 20, @maxsp.to_s)
    self.bitmap.draw_text_full(@sp_x+2, @sp_y, 32, 20, $data_system.words.sp)
  end
  #----------------------------------------------------------------------------
  # draw_exp
  #  Draws the EXP display.
  #----------------------------------------------------------------------------
  def draw_exp
    # set current variables
    @exp = actor.exp
    # set fill rate
    rate = (actor.next_exp != 0 ? actor.now_exp.to_f / actor.next_exp : 1)
    # draw gradient bar
    self.bitmap.picture_bar(@exp_x, @exp_y+3,rate,Hud_Config::EXP)
    self.bitmap.font.color = normal_color
    percent = (rate * 100).to_i
    self.bitmap.draw_text_full(@exp_x+60, @exp_y, 200, 18,
    "#{actor.cur_exp} / #{actor.max_exp}")
    self.bitmap.draw_text_full(@exp_x+195, @exp_y, 145, 18,percent.to_s)
    self.bitmap.draw_text_full(@exp_x+210, @exp_y, 150, 18,'%')
    self.bitmap.draw_text_full(@exp_x+2, @exp_y, 32, 18, 'EXP')
  end
 
  def draw_name
  end
 
  def draw_level
  end

  alias hud_update update
  def update
    draw_basic  if $game_temp.hud_refresh
    $game_temp.hud_refresh ? draw_exp : test_exp if actor != nil
    @name.update
    @lvl.update
    hud_update
  end
 
  def dispose
    super
    @name.dispose
    @lvl.dispose
  end
 
  def test_exp
    draw_exp if actor.exp != @exp
  end
 
  def test_name
    return
  end
 
  def test_level
    return
  end
 
end

class Hotkey_Assignment < Sprite
 
  def initialize(viewport = nil)
    # call superclass
    super
    # create bitmap
    self.bitmap = Bitmap.new(320, 32)
    # set font to bold
    self.bitmap.font.bold = true
    # decrease font size
    self.bitmap.font.size -= 8
    # set font color
    self.bitmap.font.color = system_color
    # set x and y position
    self.x, self.y, self.z = 174, 448, 1100
    # skill IDs on hotkeys
    @skills = BlizzABS::Cache::EmptyKeys
    # item IDs on hotkeys
    @items = BlizzABS::Cache::EmptyKeys
    # update display
    update
  end
 
  def draw(index = nil)
    # iterate through all hotkeys
    (index == nil ? BlizzABS::Cache::HotkeyRange : [index]).each {|i|
        # if hotkey is skill hotkey
        if $game_player.skill_hotkeys[i%10] != 0
          # temporary object
          object = $data_skills[$game_player.skill_hotkeys[i%10]]
        # if hotkey is item hotkey
        elsif $game_player.item_hotkeys[i%10] != 0
          # temporary object
          object = $data_items[$game_player.item_hotkeys[i%10]]
        end
        # if any change applied (10 is used for 0)
        if @items[i%10] != $game_player.item_hotkeys[i%10] ||
            @skills[i%10] != $game_player.skill_hotkeys[i%10]
          $game_temp.hud_refresh = true
          # if object exists
          if object != nil
            # load bitmap
            bitmap = RPG::Cache.icon(object.icon_name)
            # draw bitmap
            self.bitmap.blt(30*(i-1), 0, bitmap, Rect.new(0, 0, 24, 24))
          end
          # draw hotkey number
          self.bitmap.draw_text_full(30*(i-1), 10, 30, 32, (i%10).to_s, 2)
        end}
    # set new items
    @items = $game_player.item_hotkeys.clone
    # set new skills
    @skills = $game_player.skill_hotkeys.clone
  end
 
  alias hud_update update
  def update
    $game_system.hotkeys = ($game_system.hud)
    hud_update
  end
 
end

class Minimap < Sprite
 
  def initialize
    # call superclass method
    super(Viewport.new(478, 359, 160, 120))
    # get autotile image from Blizz-ABS Cache
    @autotile = $BlizzABS.cache.image('minimap_autotile')
    # creates the passable floor map
    @map_back = Map_Back.new(self)
    create_passable_floor
    # set x and y position
    self.x = self.y = 0
    # set z position
    viewport.z = 5000
    # store events
    @events, @names = check_events
    # create sprites for events
    create_sevents
    @map_name = Map_Name.new(self)
    # set all sprites visible
    self.visible = true
    # update
    update
  end
 
  alias hud_update update
  def update(con=false)
    hud_update(con)
    @map_back.update
    @map_name.update
  end
 
  def dispose
    destroy_sevents
    @map_back.dispose
    @map_name.dispose
    super
  end
 
end

class Scene_Hotkeys
 
  #----------------------------------------------------------------------------
  # main
  #  The main processing method.
  #----------------------------------------------------------------------------
  def main
    # create spriteset
    @spriteset = Spriteset_Map.new
    # create viewport
    @view = Viewport.new(0, 0, 0, 0)
    # set tone to current screen tone
    @view.tone = @tone.clone
    # create HUD if HUD is turned on and HUD active
    @hud = Hud.new if BlizzABS::Config::HUD_ENABLED && $game_system.hud
    # if ASSIGNMENT is turned
    if BlizzABS::Config::HOTKEYS
      # create assignment display
      @hotkeys = Hotkey_Assignment.new
      # set z position
      @hotkeys.z = 5000
    end
    # if MINIMAP is turned on and minimap active
    if BlizzABS::Config::MINIMAP && $game_system.minimap > 0
      # create minimap
      @minimap = Minimap.new
    end
    # create sprite
    @choice = Sprite.new
    # create bitmap
    @choice.bitmap = $BlizzABS.cache.image('menu_arrow')
    @choice.angle = 180
    # set x, y and z positions
    @choice.x, @choice.y, @choice.z, @choice.opacity = 204, 448, 5001, 108
    # set x position offset
    @choice.ox = -8
    # set active flag
    @active = true
    # set index
    @index = 0
    # set up mode flag
    @up_mode = true
    # create modified skill window
    @skill_window = Window_Skill_Hotkey.new($game_player.battler)
    @skill_window.y -= 66
    @skill_window.height -= 70
    # create modified item window
    @item_window = Window_Item_Hotkey.new
    @item_window.y -= 66
    @item_window.height -= 70
    # set last active
    @last_active = true
    # transtition
    Graphics.transition
    # loop
    loop do
      # update game screen
      Graphics.update
      # update input
      Input.update
      # frame update
      update
      # stop if chosen an option
      break if $scene != self
    end
    # freeze screen
    Graphics.freeze
    # delete spriteset
    @spriteset.dispose
    # delete HUD elements that exist
    [@hud, @hotkeys, @minimap].each {|s| s.dispose if s != nil}
    # delete choice sprite
    @choice.dispose
    # delete skill window
    @skill_window.dispose
    # delete item window
    @item_window.dispose
    # delete viewport
    @view.dispose
    # while real leader is not first actor in party
    while @party_leader != $game_party.actors[0]
      # switch to next actor
      $BlizzABS.player.switch_leader
    end
  end
 
  def update_choice
    # set x position
    @choice.x = 204 + @index * 30
    # if pressed B
    if Input.trigger?(Input::B)
      # play cancel sound
      $game_system.se_play($data_system.cancel_se)
      # create map scene
      $scene = Scene_Map.new
    # if C is pressed
    elsif Input.trigger?(Input::C)
      # play sound
      $game_system.se_play($data_system.decision_se)
      # not active
      @active = false
      # the one that was active the last time is now active
      @skill_window.active = @last_active
      @item_window.active = (!@last_active)
    # if RIGHT is being pressed
    elsif Input.repeat?(Input::RIGHT)
      # if RIGHT is pressed or index is less than 9
      if Input.trigger?(Input::RIGHT) || @index < 9
        # play sound
        $game_system.se_play($data_system.cursor_se)
        # set new index
        @index = (@index + 1) % 10
      end
    # if LEFT is being pressed
    elsif Input.repeat?(Input::LEFT)
      # if LEFT is pressed or index is equal or greater than 1
      if Input.trigger?(Input::LEFT) || @index >= 1
        # play sound
        $game_system.se_play($data_system.cursor_se)
        # set new index
        @index = (@index + 9) % 10
      end
    end
  end
 
end

class Map_Back < Sprite
 
  def initialize(map)
    super()
    self.x ,self.y, self.z = 474, 356, 4999
    self.bitmap = RPG::Cache.picture('HUD/'+Hud_Config::MapBack)
    cw = bitmap.width
    ch = bitmap.height
    src_rect = Rect.new(0, 0, cw, ch)
    self.bitmap.blt(0, 0, bitmap, src_rect)
    @map = map
  end
 
  def update
    self.opacity = @map.opacity
    if $game_system.minimap != 1
      self.visible = false
    end
  end
 
end

class Map_Name < Sprite
 
  def initialize(map)
    super()
    self.x ,self.y, self.z = 474, 456, 5001
    self.bitmap = Bitmap.new(120,32)
    self.bitmap.font.color = Color.new(255,255,255)
    self.bitmap.font.size = 16
    draw_map_name
    @map = map
  end
 
  def draw_map_name
    self.bitmap.clear
    @map_id = $game_map.map_id
    self.bitmap.draw_text_full(0,0, 160, 20, $map_infos[@map_id],1)
  end
 
  def update
    super
    self.opacity = @map.opacity
    if $game_system.minimap != 1
      self.visible = false
    end
    draw_map_name if @map_id != $game_map.map_id
  end
 
end

class Player_Name < Sprite
 
  def initialize(hud)
    super()
    self.x ,self.y, self.z = 123, 441, 5001
    self.bitmap = Bitmap.new(120,32)
    self.bitmap.font.color = Color.new(255,255,255)
    self.bitmap.font.size = 14
    @hud = hud
    draw_text
  end
 
  def draw_text
    self.bitmap.clear
    @actor = @hud.actor
    self.bitmap.font.color = Color.new(255, 255, 255)
    self.bitmap.draw_text_full(0,0, 120, 20, @actor.name)
  end
 
  def update
    super
    self.opacity = @hud.opacity
    draw_text if @actor != @hud.actor
  end
 
end

class Player_Lvl < Sprite
 
  def initialize(hud)
    super()
    self.x ,self.y, self.z = 123, 461, 5001
    self.bitmap = Bitmap.new(120,32)
    self.bitmap.font.color = Color.new(255,255,255)
    self.bitmap.font.size = 12
    @hud = hud
    draw_text
  end
 
  def draw_text
    self.bitmap.clear
    @level = @hud.actor.level
    self.bitmap.font.color = system_color
    self.bitmap.draw_text_full(0,0, 120, 20, 'LV')
    self.bitmap.font.color = normal_color
    self.bitmap.draw_text_full(15,0, 20, 20, @level.to_s,2)
  end
 
  def update
    super
    self.opacity = @hud.opacity
    draw_text if @level != @hud.actor.level
  end
 
end

class Game_Actor < Game_Battler
 
  def cur_exp
    return (@exp - @exp_list[@level] > 0 ? @exp - @exp_list[@level] : 0)
  end
 
  def max_exp
    return (@exp_list[@level] - @exp_list[@level+1]).abs
  end
 
end

class Bitmap
 
  def picture_bar(x,y,r,image)
    empty_bar = RPG::Cache.picture('HUD/'+Hud_Config::EmptyExt+image)
    bar       = RPG::Cache.picture('HUD/'+image)
    h = bar.height
    w = bar.width
    self.blt(x,y,empty_bar,Rect.new(0,0,w,h))
    self.blt(x,y,bar,Rect.new(0,0,w*r,h))
  end

end
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Shalaren

Edit: I figured what couses to do the thing with the map, try the hud with blizzards tons of addons.


yeah I found the call a moment after i posted this, it was easy to find, i somehow missed it. and I am extremly thankful! You really did help alot! Thank you! :)))
In the recharge script, try using it, and youll notice its not placed very well on the Hotkeys

and one more request for who ever,
for nathmatt Mouse Map Menu Script, made a Script call that disables the menu and hides it, and when ever i want to call a Script that returns it.
I hope it isnt hard or alot to do, But thanks in advance

nathmatt

Did you use the fix I gave you or o's the aliagnment still off
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Shalaren

Quote from: nathmatt on May 06, 2011, 03:15:20 am
Did you use the fix I gave you or o's the aliagnment still off

Still off,
and the map thing i mentioned before, try using the hud with tons of addons, no need to actually use any script of em, it does that just wit the script being there

nathmatt

i figured out what was causing the map to disappear you just need to comment out the Quick Passability Test
and the minimap from tons if you dont know how to batch comment you use
=begin
to start commenting and
=end
to stop of course you could always just remove the code also

try it now
Spoiler: ShowHide
class Hotkey_Assignment_Recharge < Sprite
 
  #----------------------------------------------------------------------------
  # draw
  #  Draws the recharge sectors over the hotkey display.
  #----------------------------------------------------------------------------
  def draw(index = nil)
    # iterate through all skills that need to be recharged
    (@skillrecharge).each {|i|
      # temporary var
      object = $data_skills[$game_player.skill_hotkeys[i%10]]
      ind = $game_player.skill_hotkeys[i%10]+1
      if $game_player.recharging?(ind)
        # remove old image
        self.bitmap.fill_rect(30*(i-1), 0, 32, 32, Color.new(0, 0, 0, 0))
        # draw recharge indicator
        len = (24*$game_player.rech_rate(ind)).to_i
        self.bitmap.fill_rect(30*(i-1), 0, len, 4, Color.new(255, 255, 0))
        self.bitmap.draw_text_full(30*(i-1), 4, 24, 24, (($game_player.rechcounter[ind]/40).to_i+1).to_s, 1)
      else
        if object != nil
          # remove old image
          self.bitmap.fill_rect(30*(i-1), 0, 32, 32, Color.new(0, 0, 0, 0))
        end
        @skillrecharge.delete(i)
      end}
    # iterate through all items that need to be recharged
    (@itemrecharge).each {|i|
      # temporary var
      object = $data_items[$game_player.item_hotkeys[i%10]]
      ind = $game_player.item_hotkeys[i%10]+1
      if $game_player.recharging?(ind)
        # remove old image
        self.bitmap.fill_rect(30*(i-1), 0, 32, 32, Color.new(0, 0, 0, 0))
        # draw recharge indicator
        len = (24*$game_player.rech_rate(ind)).to_i
        self.bitmap.fill_rect(30*(i-1), 0, len, 4, Color.new(255, 255, 0))
        self.bitmap.draw_text_full(30*(i-1), 4, 24, 24, (($game_player.rechcounter[ind]/40).to_i+1).to_s, 1)
      else
        if object != nil
          # remove old image
          self.bitmap.fill_rect(30*(i-1), 0, 32, 32, Color.new(0, 0, 0, 0))
        end
        @itemrecharge.delete(i)
      end}
    end
   
end
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Shalaren

Perfect :)
and um another bug, Icons dont update when u change a hotkey. the last icon stays in the back of it.

nathmatt

here: ShowHide
module Hud_Config
  HP       = 'HP'
  MP       = 'MP'
  EXP      = 'EXP'
  Empty    = 'Empty'
  EmptyExp = 'Empty_Exp'
  Back     = 'Back'
  MapBack  = 'Map_Back'
  EmptyExt = 'Empty_'
end
#==============================================================================
# Hud
#------------------------------------------------------------------------------
#  This class was modified to support SR display and modify the number of
#  skills left to use.
#==============================================================================
$map_infos = load_data('Data/MapInfos.rxdata')
$map_infos.keys.each {|key| $map_infos[key] = $map_infos[key].name}
class Hud < Sprite
 
  #----------------------------------------------------------------------------
  # Initialization
  #  viewport - the viewport for the sprite
  #----------------------------------------------------------------------------
  def initialize(viewport = nil)
    # call superclass method
    super
    # create positions
    create_positions
    # get height
    h = @hud_height
    $game_system.minimap = 1
    $game_system.hotkeys = true
    @name = Player_Name.new(self)
    @lvl  = Player_Lvl.new(self)
    # create bitmap
    self.bitmap = Bitmap.new(@hud_width, h)
    # set font
    self.bitmap.font.name = 'Arial'
    # set font size
    self.bitmap.font.size = 12
    # set font to bold
    self.bitmap.font.bold = true
    # set x, y position depending on which HUD mode
    self.y = 480 - (h)
    # set z coordinate
    self.z = 1000
    # draw basic HUD
    draw_basic
    # update
    update
  end
  #----------------------------------------------------------------------------
  # create_positions
  #  Sets drawing positions. Can be aliased and the positions modified to
  #  create a different HUD.
  #----------------------------------------------------------------------------
  def create_positions
    @original_width = @hud_width = 474
    @original_height = @hud_height = 54
    @hp_x, @hp_y, @sp_x, @sp_y = 3, 15, 3, 35
    @hot_x, @hot_y, @left_x, @left_y = 4, 49, 8, 63
    @exp_x,@exp_y = 175, 0
  end
  #----------------------------------------------------------------------------
  # draw_basic
  #  Draws the HUD template.
  #----------------------------------------------------------------------------
  def draw_basic
    # fill with grey rectangle
    bitmap = RPG::Cache.picture('HUD/'+Hud_Config::Back)
    cw = bitmap.width
    ch = bitmap.height
    src_rect = Rect.new(0, 0, cw, ch)
    self.bitmap.blt(0,0, bitmap, src_rect)
    # determine color depending on HUD style
    color = case BlizzABS::Config::HUD_TYPE
    when 0 then Color.new(255, 255, 255, 192)
    when 1 then Color.new(0, 0, 0, 0)
    end
    # if color exists
    if color.is_a?(Color)
      # draw outline in color
      self.bitmap.fill_rect(@hp_x, @hp_y+3, 116, 14, color)
      # draw outline in color
      self.bitmap.fill_rect(@sp_x, @sp_y+3, 116, 14, color)
    end
    # set font color
    self.bitmap.font.color = system_color
  end
  #----------------------------------------------------------------------------
  # draw_empty
  #  Draws the HP and SP display when actor doesn't exist.
  #----------------------------------------------------------------------------
  def draw_empty
    # draw empty bars
    self.bitmap.gradient_bar_hud(@hp_x, @hp_y+3, 114, 0, 'hud_red_bar', 1)
    # draw empty bars
    self.bitmap.gradient_bar_hud(@sp_x, @sp_y+3, 114, 0, 'hud_blue_bar', 2)
    # draw empty bars
    self.bitmap.gradient_bar_hud(@exp_x, @exp_y+3, 200,0, 'hud_green_bar', 3)
    # set font color
    self.bitmap.font.color = disabled_color
    # draw empty HP
    self.bitmap.draw_text_full(@hp_x + 6, @hp_y, 48, 20, '0', 2)
    self.bitmap.draw_text_full(@hp_x + 54, @hp_y, 12, 20, '/', 1)
    self.bitmap.draw_text_full(@hp_x + 66, @hp_y, 48, 20, '0')
    # draw empty SP
    self.bitmap.draw_text_full(@sp_x + 6, @sp_y, 48, 20, '0', 2)
    self.bitmap.draw_text_full(@sp_x + 54, @sp_y, 12, 20, '/', 1)
    self.bitmap.draw_text_full(@sp_x + 66, @sp_y, 48, 20, '0')
     # draw empty EXP
    self.bitmap.draw_text_full(@exp_x + 54, @exp_y, 84, 20, '0.0', 2)
    # reset all flag variables
    @name = @level = @hp = @sp = @maxhp = @maxsp = @exp = @states = @skill =
        @skills_left = @item = @items_left = @gold = @exp = nil
  end
  #----------------------------------------------------------------------------
  # draw_hp
  #  Draws the HP display.
  #----------------------------------------------------------------------------
  def draw_hp
    # set current variables
    @hp, @maxhp = actor.hp, actor.maxhp
    # set fill rate
    rate = (@maxhp > 0 ? @hp.to_f / @maxhp : 0)
    # draw gradient bar
    self.bitmap.picture_bar(@hp_x, @hp_y+3,rate,Hud_Config::HP)
    # set font color depending on how many HP left
    self.bitmap.font.color = @hp == 0 ? knockout_color :
        @hp <= @maxhp / 4 ? crisis_color : normal_color
    # draw HP
    self.bitmap.draw_text_full(@hp_x+6, @hp_y, 48, 20, @hp.to_s, 2)
    # set color
    self.bitmap.font.color = normal_color
    # draw "/"
    self.bitmap.draw_text_full(@hp_x+54, @hp_y, 12, 20, '/', 1)
    # draw max HP
    self.bitmap.draw_text_full(@hp_x+66, @hp_y, 48, 20, @maxhp.to_s)
    self.bitmap.draw_text_full(@hp_x+2, @hp_y, 32, 20, $data_system.words.hp)
  end
  #----------------------------------------------------------------------------
  # draw_sp
  #  Draws the SP display.
  #----------------------------------------------------------------------------
  def draw_sp
    # set current variables
    @sp, @maxsp = actor.sp, actor.maxsp
    # set fill rate
    rate = (@maxsp > 0 ? @sp.to_f / @maxsp : 0)
    # draw gradient bar
    self.bitmap.picture_bar(@sp_x, @sp_y+3,rate,Hud_Config::MP)
    # set font color depending on how many SP left
    self.bitmap.font.color = @sp == 0 ? knockout_color :
        @sp <= @maxsp / 4 ? crisis_color : normal_color
    # draw SP
    self.bitmap.draw_text_full(@sp_x+6, @sp_y, 48, 20, @sp.to_s, 2)
    # set font color
    self.bitmap.font.color = normal_color
    # draw "/"
    self.bitmap.draw_text_full(@sp_x+54, @sp_y, 12, 20, '/', 1)
    # draw max SP
    self.bitmap.draw_text_full(@sp_x+66, @sp_y, 48, 20, @maxsp.to_s)
    self.bitmap.draw_text_full(@sp_x+2, @sp_y, 32, 20, $data_system.words.sp)
  end
  #----------------------------------------------------------------------------
  # draw_exp
  #  Draws the EXP display.
  #----------------------------------------------------------------------------
  def draw_exp
    # set current variables
    @exp = actor.exp
    # set fill rate
    rate = (actor.next_exp != 0 ? actor.now_exp.to_f / actor.next_exp : 1)
    # draw gradient bar
    self.bitmap.picture_bar(@exp_x, @exp_y+3,rate,Hud_Config::EXP)
    self.bitmap.font.color = normal_color
    percent = (rate * 100).to_i
    self.bitmap.draw_text_full(@exp_x+60, @exp_y, 200, 18,
    "#{actor.cur_exp} / #{actor.max_exp}")
    self.bitmap.draw_text_full(@exp_x+195, @exp_y, 145, 18,percent.to_s)
    self.bitmap.draw_text_full(@exp_x+210, @exp_y, 150, 18,'%')
    self.bitmap.draw_text_full(@exp_x+2, @exp_y, 32, 18, 'EXP')
  end
 
  def draw_name
  end
 
  def draw_level
  end

  alias hud_update update
  def update
    draw_basic  if $game_temp.hud_refresh
    $game_temp.hud_refresh ? draw_exp : test_exp if actor != nil
    @name.update
    @lvl.update
    hud_update
  end
 
  def dispose
    super
    @name.dispose
    @lvl.dispose
  end
 
  def test_exp
    draw_exp if actor.exp != @exp
  end
 
  def test_name
    return
  end
 
  def test_level
    return
  end
 
end

class Hotkey_Assignment < Sprite
 
  def initialize(viewport = nil)
    # call superclass
    super
    # create bitmap
    self.bitmap = Bitmap.new(320, 32)
    # set font to bold
    self.bitmap.font.bold = true
    # decrease font size
    self.bitmap.font.size -= 8
    # set font color
    self.bitmap.font.color = system_color
    # set x and y position
    self.x, self.y, self.z = 174, 448, 1100
    # skill IDs on hotkeys
    @skills = BlizzABS::Cache::EmptyKeys
    # item IDs on hotkeys
    @items = BlizzABS::Cache::EmptyKeys
    # update display
    update
  end
 
  def draw(index = nil)
    # iterate through all hotkeys
    (index == nil ? BlizzABS::Cache::HotkeyRange : [index]).each {|i|
        # if hotkey is skill hotkey
        if $game_player.skill_hotkeys[i%10] != 0
          # temporary object
          object = $data_skills[$game_player.skill_hotkeys[i%10]]
        # if hotkey is item hotkey
        elsif $game_player.item_hotkeys[i%10] != 0
          # temporary object
          object = $data_items[$game_player.item_hotkeys[i%10]]
        end
        # if any change applied (10 is used for 0)
        if @items[i%10] != $game_player.item_hotkeys[i%10] ||
            @skills[i%10] != $game_player.skill_hotkeys[i%10]
          # remove this icon
          self.bitmap.fill_rect(30*(i-1), 0, 24, 24, Color.new(0, 0, 0, 0))
          # if object exists
          if object != nil
            # load bitmap
            bitmap = RPG::Cache.icon(object.icon_name)
            # draw bitmap
            self.bitmap.blt(30*(i-1), 0, bitmap, Rect.new(0, 0, 24, 24))
          end
          # draw hotkey number
          self.bitmap.draw_text_full(30*(i-1), 10, 30, 32, (i%10).to_s, 2)
        end}
    # set new items
    @items = $game_player.item_hotkeys.clone
    # set new skills
    @skills = $game_player.skill_hotkeys.clone
  end
 
  alias hud_update update
  def update
    $game_system.hotkeys = ($game_system.hud)
    hud_update
  end
 
end

class Minimap < Sprite
 
  def initialize
    # call superclass method
    super(Viewport.new(478, 359, 160, 120))
    # get autotile image from Blizz-ABS Cache
    @autotile = $BlizzABS.cache.image('minimap_autotile')
    # creates the passable floor map
    @map_back = Map_Back.new(self)
    create_passable_floor
    # set x and y position
    self.x = self.y = 0
    # set z position
    viewport.z = 5000
    # store events
    @events, @names = check_events
    # create sprites for events
    create_sevents
    @map_name = Map_Name.new(self)
    # set all sprites visible
    self.visible = true
    # update
    update
  end
 
  alias hud_update update
  def update(con=false)
    hud_update(con)
    @map_back.update
    @map_name.update
  end
 
  def dispose
    destroy_sevents
    @map_back.dispose
    @map_name.dispose
    super
  end
 
end

class Scene_Hotkeys
 
  #----------------------------------------------------------------------------
  # main
  #  The main processing method.
  #----------------------------------------------------------------------------
  def main
    # create spriteset
    @spriteset = Spriteset_Map.new
    # create viewport
    @view = Viewport.new(0, 0, 0, 0)
    # set tone to current screen tone
    @view.tone = @tone.clone
    # create HUD if HUD is turned on and HUD active
    @hud = Hud.new if BlizzABS::Config::HUD_ENABLED && $game_system.hud
    # if ASSIGNMENT is turned
    if BlizzABS::Config::HOTKEYS
      # create assignment display
      @hotkeys = Hotkey_Assignment.new
      # set z position
      @hotkeys.z = 5000
    end
    # if MINIMAP is turned on and minimap active
    if BlizzABS::Config::MINIMAP && $game_system.minimap > 0
      # create minimap
      @minimap = Minimap.new
    end
    # create sprite
    @choice = Sprite.new
    # create bitmap
    @choice.bitmap = $BlizzABS.cache.image('menu_arrow')
    @choice.angle = 180
    # set x, y and z positions
    @choice.x, @choice.y, @choice.z, @choice.opacity = 204, 448, 5001, 108
    # set x position offset
    @choice.ox = -8
    # set active flag
    @active = true
    # set index
    @index = 0
    # set up mode flag
    @up_mode = true
    # create modified skill window
    @skill_window = Window_Skill_Hotkey.new($game_player.battler)
    @skill_window.y -= 66
    @skill_window.height -= 70
    # create modified item window
    @item_window = Window_Item_Hotkey.new
    @item_window.y -= 66
    @item_window.height -= 70
    # set last active
    @last_active = true
    # transtition
    Graphics.transition
    # loop
    loop do
      # update game screen
      Graphics.update
      # update input
      Input.update
      # frame update
      update
      # stop if chosen an option
      break if $scene != self
    end
    # freeze screen
    Graphics.freeze
    # delete spriteset
    @spriteset.dispose
    # delete HUD elements that exist
    [@hud, @hotkeys, @minimap].each {|s| s.dispose if s != nil}
    # delete choice sprite
    @choice.dispose
    # delete skill window
    @skill_window.dispose
    # delete item window
    @item_window.dispose
    # delete viewport
    @view.dispose
    # while real leader is not first actor in party
    while @party_leader != $game_party.actors[0]
      # switch to next actor
      $BlizzABS.player.switch_leader
    end
  end
 
  def update_choice
    # set x position
    @choice.x = 204 + @index * 30
    # if pressed B
    if Input.trigger?(Input::B)
      # play cancel sound
      $game_system.se_play($data_system.cancel_se)
      # create map scene
      $scene = Scene_Map.new
    # if C is pressed
    elsif Input.trigger?(Input::C)
      # play sound
      $game_system.se_play($data_system.decision_se)
      # not active
      @active = false
      # the one that was active the last time is now active
      @skill_window.active = @last_active
      @item_window.active = (!@last_active)
    # if RIGHT is being pressed
    elsif Input.repeat?(Input::RIGHT)
      # if RIGHT is pressed or index is less than 9
      if Input.trigger?(Input::RIGHT) || @index < 9
        # play sound
        $game_system.se_play($data_system.cursor_se)
        # set new index
        @index = (@index + 1) % 10
      end
    # if LEFT is being pressed
    elsif Input.repeat?(Input::LEFT)
      # if LEFT is pressed or index is equal or greater than 1
      if Input.trigger?(Input::LEFT) || @index >= 1
        # play sound
        $game_system.se_play($data_system.cursor_se)
        # set new index
        @index = (@index + 9) % 10
      end
    end
  end
 
end

class Map_Back < Sprite
 
  def initialize(map)
    super()
    self.x ,self.y, self.z = 474, 356, 4999
    self.bitmap = RPG::Cache.picture('HUD/'+Hud_Config::MapBack)
    cw = bitmap.width
    ch = bitmap.height
    src_rect = Rect.new(0, 0, cw, ch)
    self.bitmap.blt(0, 0, bitmap, src_rect)
    @map = map
  end
 
  def update
    self.opacity = @map.opacity
    if $game_system.minimap != 1
      self.visible = false
    end
  end
 
end

class Map_Name < Sprite
 
  def initialize(map)
    super()
    self.x ,self.y, self.z = 474, 456, 5001
    self.bitmap = Bitmap.new(120,32)
    self.bitmap.font.color = Color.new(255,255,255)
    self.bitmap.font.size = 16
    draw_map_name
    @map = map
  end
 
  def draw_map_name
    self.bitmap.clear
    @map_id = $game_map.map_id
    self.bitmap.draw_text_full(0,0, 160, 20, $map_infos[@map_id],1)
  end
 
  def update
    super
    self.opacity = @map.opacity
    if $game_system.minimap != 1
      self.visible = false
    end
    draw_map_name if @map_id != $game_map.map_id
  end
 
end

class Player_Name < Sprite
 
  def initialize(hud)
    super()
    self.x ,self.y, self.z = 123, 441, 5001
    self.bitmap = Bitmap.new(120,32)
    self.bitmap.font.color = Color.new(255,255,255)
    self.bitmap.font.size = 14
    @hud = hud
    draw_text
  end
 
  def draw_text
    self.bitmap.clear
    @actor = @hud.actor
    self.bitmap.font.color = Color.new(255, 255, 255)
    self.bitmap.draw_text_full(0,0, 120, 20, @actor.name)
  end
 
  def update
    super
    self.opacity = @hud.opacity
    draw_text if @actor != @hud.actor
  end
 
end

class Player_Lvl < Sprite
 
  def initialize(hud)
    super()
    self.x ,self.y, self.z = 123, 461, 5001
    self.bitmap = Bitmap.new(120,32)
    self.bitmap.font.color = Color.new(255,255,255)
    self.bitmap.font.size = 12
    @hud = hud
    draw_text
  end
 
  def draw_text
    self.bitmap.clear
    @level = @hud.actor.level
    self.bitmap.font.color = system_color
    self.bitmap.draw_text_full(0,0, 120, 20, 'LV')
    self.bitmap.font.color = normal_color
    self.bitmap.draw_text_full(15,0, 20, 20, @level.to_s,2)
  end
 
  def update
    super
    self.opacity = @hud.opacity
    draw_text if @level != @hud.actor.level
  end
 
end

class Game_Actor < Game_Battler
 
  def cur_exp
    return (@exp - @exp_list[@level] > 0 ? @exp - @exp_list[@level] : 0)
  end
 
  def max_exp
    return (@exp_list[@level] - @exp_list[@level+1]).abs
  end
 
end

class Bitmap
 
  def picture_bar(x,y,r,image)
    empty_bar = RPG::Cache.picture('HUD/'+Hud_Config::EmptyExt+image)
    bar       = RPG::Cache.picture('HUD/'+image)
    h = bar.height
    w = bar.width
    self.blt(x,y,empty_bar,Rect.new(0,0,w,h))
    self.blt(x,y,bar,Rect.new(0,0,w*r,h))
  end

end
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Shalaren

Thank you so much nathmatt :)

Back to my request to anyone, a script to add a party hud on the side incase theres more party members,

nathmatt

i would but party alignments don't like me for some reason
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Shalaren

May 08, 2011, 09:15:07 pm #17 Last Edit: May 08, 2011, 09:18:16 pm by Shalaren
Loll :P its ok you helped more than enough, I'm really gratefully Thankful for your help :)
Edit: wait may I ask you to add a Gold display? like on the screenshot. if its not to much to ask
Edit: doesnt matter where it is, I could probably easily edit its location on the screen.

nathmatt

gold fix: ShowHide
module Hud_Config
  HP       = 'HP'
  MP       = 'MP'
  EXP      = 'EXP'
  Empty    = 'Empty'
  EmptyExp = 'Empty_Exp'
  Back     = 'Back'
  MapBack  = 'Map_Back'
  EmptyExt = 'Empty_'
end
#==============================================================================
# Hud
#------------------------------------------------------------------------------
#  This class was modified to support SR display and modify the number of
#  skills left to use.
#==============================================================================
$map_infos = load_data('Data/MapInfos.rxdata')
$map_infos.keys.each {|key| $map_infos[key] = $map_infos[key].name}

class Hud < Sprite
 
  #----------------------------------------------------------------------------
  # Initialization
  #  viewport - the viewport for the sprite
  #----------------------------------------------------------------------------
  def initialize(viewport = nil)
    # call superclass method
    super
    # create positions
    create_positions
    # get height
    h = @hud_height
    $game_system.minimap = 1
    $game_system.hotkeys = true
    @name = Player_Name.new(self)
    @lvl  = Player_Lvl.new(self)
    @gold = Party_Gold.new(self)
    # create bitmap
    self.bitmap = Bitmap.new(@hud_width, h)
    # set font
    self.bitmap.font.name = 'Arial'
    # set font size
    self.bitmap.font.size = 12
    # set font to bold
    self.bitmap.font.bold = true
    # set x, y position depending on which HUD mode
    self.y = 480 - (h)
    # set z coordinate
    self.z = 1000
    # draw basic HUD
    draw_basic
    # update
    update
  end
  #----------------------------------------------------------------------------
  # create_positions
  #  Sets drawing positions. Can be aliased and the positions modified to
  #  create a different HUD.
  #----------------------------------------------------------------------------
  def create_positions
    @original_width = @hud_width = 474
    @original_height = @hud_height = 54
    @hp_x, @hp_y, @sp_x, @sp_y = 3, 15, 3, 35
    @hot_x, @hot_y, @left_x, @left_y = 4, 49, 8, 63
    @exp_x,@exp_y,@gold_x,@gold_y = 175, 0, 0, 0
  end
  #----------------------------------------------------------------------------
  # draw_basic
  #  Draws the HUD template.
  #----------------------------------------------------------------------------
  def draw_basic
    # fill with grey rectangle
    bitmap = RPG::Cache.picture('HUD/'+Hud_Config::Back)
    cw = bitmap.width
    ch = bitmap.height
    src_rect = Rect.new(0, 0, cw, ch)
    self.bitmap.blt(0,0, bitmap, src_rect)
    # determine color depending on HUD style
    color = case BlizzABS::Config::HUD_TYPE
    when 0 then Color.new(255, 255, 255, 192)
    when 1 then Color.new(0, 0, 0, 0)
    end
    # if color exists
    if color.is_a?(Color)
      # draw outline in color
      self.bitmap.fill_rect(@hp_x, @hp_y+3, 116, 14, color)
      # draw outline in color
      self.bitmap.fill_rect(@sp_x, @sp_y+3, 116, 14, color)
    end
    # set font color
    self.bitmap.font.color = system_color
  end
  #----------------------------------------------------------------------------
  # draw_empty
  #  Draws the HP and SP display when actor doesn't exist.
  #----------------------------------------------------------------------------
  def draw_empty
    # draw empty bars
    self.bitmap.gradient_bar_hud(@hp_x, @hp_y+3, 114, 0, 'hud_red_bar', 1)
    # draw empty bars
    self.bitmap.gradient_bar_hud(@sp_x, @sp_y+3, 114, 0, 'hud_blue_bar', 2)
    # draw empty bars
    self.bitmap.gradient_bar_hud(@exp_x, @exp_y+3, 200,0, 'hud_green_bar', 3)
    # set font color
    self.bitmap.font.color = disabled_color
    # draw empty HP
    self.bitmap.draw_text_full(@hp_x + 6, @hp_y, 48, 20, '0', 2)
    self.bitmap.draw_text_full(@hp_x + 54, @hp_y, 12, 20, '/', 1)
    self.bitmap.draw_text_full(@hp_x + 66, @hp_y, 48, 20, '0')
    # draw empty SP
    self.bitmap.draw_text_full(@sp_x + 6, @sp_y, 48, 20, '0', 2)
    self.bitmap.draw_text_full(@sp_x + 54, @sp_y, 12, 20, '/', 1)
    self.bitmap.draw_text_full(@sp_x + 66, @sp_y, 48, 20, '0')
     # draw empty EXP
    self.bitmap.draw_text_full(@exp_x + 54, @exp_y, 84, 20, '0.0', 2)
    # reset all flag variables
    @name = @level = @hp = @sp = @maxhp = @maxsp = @exp = @states = @skill =
        @skills_left = @item = @items_left = @gold = @exp = nil
  end
  #----------------------------------------------------------------------------
  # draw_hp
  #  Draws the HP display.
  #----------------------------------------------------------------------------
  def draw_hp
    # set current variables
    @hp, @maxhp = actor.hp, actor.maxhp
    # set fill rate
    rate = (@maxhp > 0 ? @hp.to_f / @maxhp : 0)
    # draw gradient bar
    self.bitmap.picture_bar(@hp_x, @hp_y+3,rate,Hud_Config::HP)
    # set font color depending on how many HP left
    self.bitmap.font.color = @hp == 0 ? knockout_color :
        @hp <= @maxhp / 4 ? crisis_color : normal_color
    # draw HP
    self.bitmap.draw_text_full(@hp_x+6, @hp_y, 48, 20, @hp.to_s, 2)
    # set color
    self.bitmap.font.color = normal_color
    # draw "/"
    self.bitmap.draw_text_full(@hp_x+54, @hp_y, 12, 20, '/', 1)
    # draw max HP
    self.bitmap.draw_text_full(@hp_x+66, @hp_y, 48, 20, @maxhp.to_s)
    self.bitmap.draw_text_full(@hp_x+2, @hp_y, 32, 20, $data_system.words.hp)
  end
  #----------------------------------------------------------------------------
  # draw_sp
  #  Draws the SP display.
  #----------------------------------------------------------------------------
  def draw_sp
    # set current variables
    @sp, @maxsp = actor.sp, actor.maxsp
    # set fill rate
    rate = (@maxsp > 0 ? @sp.to_f / @maxsp : 0)
    # draw gradient bar
    self.bitmap.picture_bar(@sp_x, @sp_y+3,rate,Hud_Config::MP)
    # set font color depending on how many SP left
    self.bitmap.font.color = @sp == 0 ? knockout_color :
        @sp <= @maxsp / 4 ? crisis_color : normal_color
    # draw SP
    self.bitmap.draw_text_full(@sp_x+6, @sp_y, 48, 20, @sp.to_s, 2)
    # set font color
    self.bitmap.font.color = normal_color
    # draw "/"
    self.bitmap.draw_text_full(@sp_x+54, @sp_y, 12, 20, '/', 1)
    # draw max SP
    self.bitmap.draw_text_full(@sp_x+66, @sp_y, 48, 20, @maxsp.to_s)
    self.bitmap.draw_text_full(@sp_x+2, @sp_y, 32, 20, $data_system.words.sp)
  end
  #----------------------------------------------------------------------------
  # draw_exp
  #  Draws the EXP display.
  #----------------------------------------------------------------------------
  def draw_exp
    # set current variables
    @exp = actor.exp
    # set fill rate
    rate = (actor.next_exp != 0 ? actor.now_exp.to_f / actor.next_exp : 1)
    # draw gradient bar
    self.bitmap.picture_bar(@exp_x, @exp_y+3,rate,Hud_Config::EXP)
    self.bitmap.font.color = normal_color
    percent = (rate * 100).to_i
    self.bitmap.draw_text_full(@exp_x+60, @exp_y, 200, 18,
    "#{actor.cur_exp} / #{actor.max_exp}")
    self.bitmap.draw_text_full(@exp_x+195, @exp_y, 145, 18,percent.to_s)
    self.bitmap.draw_text_full(@exp_x+210, @exp_y, 150, 18,'%')
    self.bitmap.draw_text_full(@exp_x+2, @exp_y, 32, 18, 'EXP')
  end
 
  def draw_name
  end
 
  def draw_level
  end
   
  alias hud_update update
  def update
    draw_basic  if $game_temp.hud_refresh
    $game_temp.hud_refresh ? draw_exp : test_exp if actor != nil
    @gold.update
    @name.update
    @lvl.update
    hud_update
  end
 
  def dispose
    super
    @name.dispose
    @lvl.dispose
    @gold.dispose
  end
 
  def test_exp
    draw_exp if actor.exp != @exp
  end
 
  def test_name
    return
  end
 
  def test_level
    return
  end
 
end

class Hotkey_Assignment < Sprite
 
  def initialize(viewport = nil)
    # call superclass
    super
    # create bitmap
    self.bitmap = Bitmap.new(320, 32)
    # set font to bold
    self.bitmap.font.bold = true
    # decrease font size
    self.bitmap.font.size -= 8
    # set font color
    self.bitmap.font.color = system_color
    # set x and y position
    self.x, self.y, self.z = 174, 448, 1100
    # skill IDs on hotkeys
    @skills = BlizzABS::Cache::EmptyKeys
    # item IDs on hotkeys
    @items = BlizzABS::Cache::EmptyKeys
    # update display
    update
  end
 
  def draw(index = nil)
    # iterate through all hotkeys
    (index == nil ? BlizzABS::Cache::HotkeyRange : [index]).each {|i|
        # if hotkey is skill hotkey
        if $game_player.skill_hotkeys[i%10] != 0
          # temporary object
          object = $data_skills[$game_player.skill_hotkeys[i%10]]
        # if hotkey is item hotkey
        elsif $game_player.item_hotkeys[i%10] != 0
          # temporary object
          object = $data_items[$game_player.item_hotkeys[i%10]]
        end
        # if any change applied (10 is used for 0)
        if @items[i%10] != $game_player.item_hotkeys[i%10] ||
            @skills[i%10] != $game_player.skill_hotkeys[i%10]
          # remove this icon
          self.bitmap.fill_rect(30*(i-1), 0, 24, 24, Color.new(0, 0, 0, 0))
          # if object exists
          if object != nil
            # load bitmap
            bitmap = RPG::Cache.icon(object.icon_name)
            # draw bitmap
            self.bitmap.blt(30*(i-1), 0, bitmap, Rect.new(0, 0, 24, 24))
          end
          # draw hotkey number
          self.bitmap.draw_text_full(30*(i-1), 10, 30, 32, (i%10).to_s, 2)
        end}
    # set new items
    @items = $game_player.item_hotkeys.clone
    # set new skills
    @skills = $game_player.skill_hotkeys.clone
  end
 
  alias hud_update update
  def update
    $game_system.hotkeys = ($game_system.hud)
    hud_update
  end
 
end

class Minimap < Sprite
 
  def initialize
    # call superclass method
    super(Viewport.new(478, 359, 160, 120))
    # get autotile image from Blizz-ABS Cache
    @autotile = $BlizzABS.cache.image('minimap_autotile')
    # creates the passable floor map
    @map_back = Map_Back.new(self)
    create_passable_floor
    # set x and y position
    self.x = self.y = 0
    # set z position
    viewport.z = 5000
    # store events
    @events, @names = check_events
    # create sprites for events
    create_sevents
    @map_name = Map_Name.new(self)
    # set all sprites visible
    self.visible = true
    # update
    update
  end
 
  alias hud_update update
  def update(con=false)
    hud_update(con)
    @map_back.update
    @map_name.update
  end
 
  def dispose
    destroy_sevents
    @map_back.dispose
    @map_name.dispose
    super
  end
 
end

class Scene_Hotkeys
 
  #----------------------------------------------------------------------------
  # main
  #  The main processing method.
  #----------------------------------------------------------------------------
  def main
    # create spriteset
    @spriteset = Spriteset_Map.new
    # create viewport
    @view = Viewport.new(0, 0, 0, 0)
    # set tone to current screen tone
    @view.tone = @tone.clone
    # create HUD if HUD is turned on and HUD active
    @hud = Hud.new if BlizzABS::Config::HUD_ENABLED && $game_system.hud
    # if ASSIGNMENT is turned
    if BlizzABS::Config::HOTKEYS
      # create assignment display
      @hotkeys = Hotkey_Assignment.new
      # set z position
      @hotkeys.z = 5000
    end
    # if MINIMAP is turned on and minimap active
    if BlizzABS::Config::MINIMAP && $game_system.minimap > 0
      # create minimap
      @minimap = Minimap.new
    end
    # create sprite
    @choice = Sprite.new
    # create bitmap
    @choice.bitmap = $BlizzABS.cache.image('menu_arrow')
    @choice.angle = 180
    # set x, y and z positions
    @choice.x, @choice.y, @choice.z, @choice.opacity = 204, 448, 5001, 108
    # set x position offset
    @choice.ox = -8
    # set active flag
    @active = true
    # set index
    @index = 0
    # set up mode flag
    @up_mode = true
    # create modified skill window
    @skill_window = Window_Skill_Hotkey.new($game_player.battler)
    @skill_window.y -= 66
    @skill_window.height -= 70
    # create modified item window
    @item_window = Window_Item_Hotkey.new
    @item_window.y -= 66
    @item_window.height -= 70
    # set last active
    @last_active = true
    # transtition
    Graphics.transition
    # loop
    loop do
      # update game screen
      Graphics.update
      # update input
      Input.update
      # frame update
      update
      # stop if chosen an option
      break if $scene != self
    end
    # freeze screen
    Graphics.freeze
    # delete spriteset
    @spriteset.dispose
    # delete HUD elements that exist
    [@hud, @hotkeys, @minimap].each {|s| s.dispose if s != nil}
    # delete choice sprite
    @choice.dispose
    # delete skill window
    @skill_window.dispose
    # delete item window
    @item_window.dispose
    # delete viewport
    @view.dispose
    # while real leader is not first actor in party
    while @party_leader != $game_party.actors[0]
      # switch to next actor
      $BlizzABS.player.switch_leader
    end
  end
 
  def update_choice
    # set x position
    @choice.x = 204 + @index * 30
    # if pressed B
    if Input.trigger?(Input::B)
      # play cancel sound
      $game_system.se_play($data_system.cancel_se)
      # create map scene
      $scene = Scene_Map.new
    # if C is pressed
    elsif Input.trigger?(Input::C)
      # play sound
      $game_system.se_play($data_system.decision_se)
      # not active
      @active = false
      # the one that was active the last time is now active
      @skill_window.active = @last_active
      @item_window.active = (!@last_active)
    # if RIGHT is being pressed
    elsif Input.repeat?(Input::RIGHT)
      # if RIGHT is pressed or index is less than 9
      if Input.trigger?(Input::RIGHT) || @index < 9
        # play sound
        $game_system.se_play($data_system.cursor_se)
        # set new index
        @index = (@index + 1) % 10
      end
    # if LEFT is being pressed
    elsif Input.repeat?(Input::LEFT)
      # if LEFT is pressed or index is equal or greater than 1
      if Input.trigger?(Input::LEFT) || @index >= 1
        # play sound
        $game_system.se_play($data_system.cursor_se)
        # set new index
        @index = (@index + 9) % 10
      end
    end
  end
 
end

class Map_Back < Sprite
 
  def initialize(map)
    super()
    self.x ,self.y, self.z = 474, 356, 4999
    self.bitmap = RPG::Cache.picture('HUD/'+Hud_Config::MapBack)
    cw = bitmap.width
    ch = bitmap.height
    src_rect = Rect.new(0, 0, cw, ch)
    self.bitmap.blt(0, 0, bitmap, src_rect)
    @map = map
  end
 
  def update
    self.opacity = @map.opacity
    if $game_system.minimap != 1
      self.visible = false
    end
  end
 
end

class Map_Name < Sprite
 
  def initialize(map)
    super()
    self.x ,self.y, self.z = 474, 456, 5001
    self.bitmap = Bitmap.new(120,32)
    self.bitmap.font.color = Color.new(255,255,255)
    self.bitmap.font.size = 16
    draw_map_name
    @map = map
  end
 
  def draw_map_name
    self.bitmap.clear
    @map_id = $game_map.map_id
    self.bitmap.draw_text_full(0,0, 160, 20, $map_infos[@map_id],1)
  end
 
  def update
    super
    self.opacity = @map.opacity
    if $game_system.minimap != 1
      self.visible = false
    end
    draw_map_name if @map_id != $game_map.map_id
  end
 
end

class Player_Name < Sprite
 
  def initialize(hud)
    super()
    self.x ,self.y, self.z = 123, 441, 5001
    self.bitmap = Bitmap.new(120,32)
    self.bitmap.font.color = Color.new(255,255,255)
    self.bitmap.font.size = 14
    @hud = hud
    draw_text
  end
 
  def draw_text
    self.bitmap.clear
    @actor = @hud.actor
    self.bitmap.font.color = Color.new(255, 255, 255)
    self.bitmap.draw_text_full(0,0, 120, 20, @actor.name)
  end
 
  def update
    super
    self.opacity = @hud.opacity
    draw_text if @actor != @hud.actor
  end
 
end

class Player_Lvl < Sprite
 
  def initialize(hud)
    super()
    self.x ,self.y, self.z = 123, 461, 5001
    self.bitmap = Bitmap.new(120,32)
    self.bitmap.font.color = Color.new(255,255,255)
    self.bitmap.font.size = 12
    @hud = hud
    draw_text
  end
 
  def draw_text
    self.bitmap.clear
    @level = @hud.actor.level
    self.bitmap.font.color = system_color
    self.bitmap.draw_text_full(0,0, 20, 20, 'LV')
    self.bitmap.font.color = normal_color
    self.bitmap.draw_text_full(15,0, 20, 20, @level.to_s,2)
  end
 
  def update
    super
    self.opacity = @hud.opacity
    draw_text if @level != @hud.actor.level
  end
 
end

class Party_Gold < Sprite
 
  def initialize(hud)
    super()
    self.x ,self.y, self.z = 336, 409, 5001
    self.bitmap = Bitmap.new(140,32)
    self.bitmap.font.size = 16
    @hud = hud
    draw_text
  end
 
  def draw_text
    self.bitmap.clear
    @gold = $game_party.gold
    self.bitmap.font.color = normal_color
    self.bitmap.draw_text_full(125,0, 20, 20, $data_system.words.gold)
    self.bitmap.font.color = Color.new(193,172,81)
    self.bitmap.draw_text_full(2,0, 120, 20,@gold.to_s,2)
  end
 
  def update
    super
    self.opacity = @hud.opacity
    draw_text if @gold != $game_party.gold
  end
 
end

class Game_Actor < Game_Battler
 
  def cur_exp
    return (@exp - @exp_list[@level] > 0 ? @exp - @exp_list[@level] : 0)
  end
 
  def max_exp
    return (@exp_list[@level] - @exp_list[@level+1]).abs
  end
 
end

class Bitmap
 
  def picture_bar(x,y,r,image)
    empty_bar = RPG::Cache.picture('HUD/'+Hud_Config::EmptyExt+image)
    bar       = RPG::Cache.picture('HUD/'+image)
    h = bar.height
    w = bar.width
    self.blt(x,y,empty_bar,Rect.new(0,0,w,h))
    self.blt(x,y,bar,Rect.new(0,0,w*r,h))
  end

end
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script


Shalaren