Necro_100000
Member
Sorry for the double post but 2 scripts for some reason wouldn't fit and it would cut off. This is yet ANOTHER one of my scripts and is complet plug and play! It draws the normal MP and HP bars also including numbers. see picture below.
http://i281.photobucket.com/albums/kk22 ... eofHUD.jpg[/img]
It is also compatable with COGS custom bars.
Here's the script... Simply replace your normal HUD script with this one!
Necro_100000's Classic Number Display Addon
-Necro_100000
Satasfying your ABS Needs.
http://i281.photobucket.com/albums/kk22 ... eofHUD.jpg[/img]
It is also compatable with COGS custom bars.
Here's the script... Simply replace your normal HUD script with this one!
Necro_100000's Classic Number Display Addon
#==============================================================================
# Necro_100000's Classic Number Display Script
#
# Version 1.0
#==============================================================================
module Crissaegrim_Hud
Background = "HUD-Background" # Imagem de fundo da hud
# This part dosn't even matter any more... Just simply make sure you have the
# Pictures in your think to avoid glitches.
HP_Bar = "HP-Bar" # Imagem da barra de HP
MP_Bar = "MP-Bar" # Imagem da barra de MP
Base = "Bars-Base" # Imagm do fundo das barras
OnOff_Hud_Switch = 1 # Switch que ativa / desativa a HUD
Show_Hide_Button = Input::Tab # Tecla que mostra / esconde a HUD
end
#------------------------------------------------------------------------------
class Window_CrissaegrimHud < Window_Base
def initialize
super(0,0,544,416)
self.opacity = 0
end
def update
@actor = $game_party.members[0]
self.contents.font.size = 16
self.contents.clear
skill_count = 0
if Crissaegrim_ABS::Skill_Button[@actor.id] != nil
for button in Crissaegrim_ABS::Skill_Button[@actor.id].keys
next if button == nil
x = 432
skill = $data_skills[Crissaegrim_ABS::Skill_Button[@actor.id][button]]
next if skill == nil
show_icon(skill, (29 * skill_count) + x, 0)
skill_count += 1
end
end
item_count = 0
for btn in Crissaegrim_ABS::Item_Button.keys
next if btn == nil
item = $data_items[Crissaegrim_ABS::Item_Button[btn]]
next if item == nil
x = 432
show_icon(item, (29 * item_count) + x, 356)
item_count += 1
self.contents.font.size = 18
self.contents.font.color = text_color(15)
self.contents.draw_text((29 * item_count) + x-32, 364, 32, 28, $game_party.item_number(item),1)
self.contents.font.size = 16
self.contents.font.color = text_color(0)
self.contents.draw_text((29 * item_count) + x-32, 365, 32, 28, $game_party.item_number(item),1)
end
refresh
end
def refresh
actor = $game_party.members[0]
draw_actor_hp(@actor, 0, 0)
draw_actor_mp(@actor, 0, 24)
show_state(@actor, 130, 0)
if Crissaegrim_ABS::Distance_Weapons.has_key?(@actor.weapon_id)
if Crissaegrim_ABS::Distance_Weapons[@actor.weapon_id][5] > 0
show_icon($data_items[Crissaegrim_ABS::Distance_Weapons[@actor.weapon_id][5]], 0, 356)
self.contents.font.size = 18
self.contents.font.color = text_color(15)
self.contents.draw_text(-3, 364, 24, 28, $game_party.item_number($data_items[Crissaegrim_ABS::Distance_Weapons[@actor.weapon_id][5]]),1)
self.contents.font.size = 16
self.contents.font.color = text_color(0)
self.contents.draw_text(-2, 365, 24, 28, $game_party.item_number($data_items[Crissaegrim_ABS::Distance_Weapons[@actor.weapon_id][5]]),1)
end
if Crissaegrim_ABS::Distance_Weapons[@actor.weapon_id][6] > 0
show_icon($data_items[Crissaegrim_ABS::Distance_Weapons[@actor.weapon_id][6]], 44, 356)
self.contents.font.size = 18
self.contents.font.color = text_color(15)
self.contents.draw_text(43, 364, 24, 28, $game_party.item_number($data_items[Crissaegrim_ABS::Distance_Weapons[@actor.weapon_id][6]]),1)
self.contents.font.size = 16
self.contents.font.color = text_color(0)
self.contents.draw_text(44, 365, 24, 28, $game_party.item_number($data_items[Crissaegrim_ABS::Distance_Weapons[@actor.weapon_id][6]]),1)
end
end
end
def show_state(actor, x, y)
count = 0
for state in actor.states
draw_icon(state.icon_index, x, y + 24 * count)
count += 1
break if (24 * count > 76)
end
end
def show_icon(item, x, y)
if item != nil
draw_icon(item.icon_index, x, y)
end
end
def draw_hp(actor, x, y)
back = Cache.system(Crissaegrim_Hud::Base)
cw = back.width
ch = back.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x, y-ch+24, back, src_rect)
meter = Cache.system(Crissaegrim_Hud::HP_Bar)
cw = meter.width * actor.hp / actor.maxhp
ch = meter.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x+5, y-ch+17, meter, src_rect)
end
def draw_mp(actor, x, y)
back = Cache.system(Crissaegrim_Hud::Base)
cw = back.width
ch = back.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x, y-ch+24, back, src_rect)
meter = Cache.system(Crissaegrim_Hud::MP_Bar)
cw = meter.width * actor.mp / actor.maxmp
ch = meter.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x+5, y-ch+17, meter, src_rect)
end
end
#------------------------------------------------------------------------------
class Scene_Map
alias crissaegrim_abs_hud_start start
alias crissaegrim_abs_hud_update update
alias crissaegrim_abs_hud_terminate terminate
def start
crissaegrim_abs_hud_start
if Crissaegrim_Hud::Background != ""
@bg = Sprite.new
@bg.bitmap = Cache.system(Crissaegrim_Hud::Background)
end
@hud = Window_CrissaegrimHud.new
showing_hud
@show = true
end
def update
crissaegrim_abs_hud_update
@bg.update if Crissaegrim_Hud::Background != ""
@hud.update
showing_hud
end
def terminate
crissaegrim_abs_hud_terminate
@bg.dispose if Crissaegrim_Hud::Background != ""
@hud.dispose
end
def showing_hud
if Input.trigger?(Crissaegrim_Hud::Show_Hide_Button)
if @show == true
@show = false
else
@show = true
end
end
if Crissaegrim_Hud::OnOff_Hud_Switch == 0 or $game_switches[Crissaegrim_Hud::OnOff_Hud_Switch] == true
if @show == true
@hud.visible = true
@bg.visible = true if Crissaegrim_Hud::Background != ""
elsif @show == false
@hud.visible = false
@bg.visible = false if Crissaegrim_Hud::Background != ""
end
else
@hud.visible = false
@bg.visible = false if Crissaegrim_Hud::Background != ""
end
end
end
# Necro_100000's Classic Number Display Script
#
# Version 1.0
#==============================================================================
module Crissaegrim_Hud
Background = "HUD-Background" # Imagem de fundo da hud
# This part dosn't even matter any more... Just simply make sure you have the
# Pictures in your think to avoid glitches.
HP_Bar = "HP-Bar" # Imagem da barra de HP
MP_Bar = "MP-Bar" # Imagem da barra de MP
Base = "Bars-Base" # Imagm do fundo das barras
OnOff_Hud_Switch = 1 # Switch que ativa / desativa a HUD
Show_Hide_Button = Input::Tab # Tecla que mostra / esconde a HUD
end
#------------------------------------------------------------------------------
class Window_CrissaegrimHud < Window_Base
def initialize
super(0,0,544,416)
self.opacity = 0
end
def update
@actor = $game_party.members[0]
self.contents.font.size = 16
self.contents.clear
skill_count = 0
if Crissaegrim_ABS::Skill_Button[@actor.id] != nil
for button in Crissaegrim_ABS::Skill_Button[@actor.id].keys
next if button == nil
x = 432
skill = $data_skills[Crissaegrim_ABS::Skill_Button[@actor.id][button]]
next if skill == nil
show_icon(skill, (29 * skill_count) + x, 0)
skill_count += 1
end
end
item_count = 0
for btn in Crissaegrim_ABS::Item_Button.keys
next if btn == nil
item = $data_items[Crissaegrim_ABS::Item_Button[btn]]
next if item == nil
x = 432
show_icon(item, (29 * item_count) + x, 356)
item_count += 1
self.contents.font.size = 18
self.contents.font.color = text_color(15)
self.contents.draw_text((29 * item_count) + x-32, 364, 32, 28, $game_party.item_number(item),1)
self.contents.font.size = 16
self.contents.font.color = text_color(0)
self.contents.draw_text((29 * item_count) + x-32, 365, 32, 28, $game_party.item_number(item),1)
end
refresh
end
def refresh
actor = $game_party.members[0]
draw_actor_hp(@actor, 0, 0)
draw_actor_mp(@actor, 0, 24)
show_state(@actor, 130, 0)
if Crissaegrim_ABS::Distance_Weapons.has_key?(@actor.weapon_id)
if Crissaegrim_ABS::Distance_Weapons[@actor.weapon_id][5] > 0
show_icon($data_items[Crissaegrim_ABS::Distance_Weapons[@actor.weapon_id][5]], 0, 356)
self.contents.font.size = 18
self.contents.font.color = text_color(15)
self.contents.draw_text(-3, 364, 24, 28, $game_party.item_number($data_items[Crissaegrim_ABS::Distance_Weapons[@actor.weapon_id][5]]),1)
self.contents.font.size = 16
self.contents.font.color = text_color(0)
self.contents.draw_text(-2, 365, 24, 28, $game_party.item_number($data_items[Crissaegrim_ABS::Distance_Weapons[@actor.weapon_id][5]]),1)
end
if Crissaegrim_ABS::Distance_Weapons[@actor.weapon_id][6] > 0
show_icon($data_items[Crissaegrim_ABS::Distance_Weapons[@actor.weapon_id][6]], 44, 356)
self.contents.font.size = 18
self.contents.font.color = text_color(15)
self.contents.draw_text(43, 364, 24, 28, $game_party.item_number($data_items[Crissaegrim_ABS::Distance_Weapons[@actor.weapon_id][6]]),1)
self.contents.font.size = 16
self.contents.font.color = text_color(0)
self.contents.draw_text(44, 365, 24, 28, $game_party.item_number($data_items[Crissaegrim_ABS::Distance_Weapons[@actor.weapon_id][6]]),1)
end
end
end
def show_state(actor, x, y)
count = 0
for state in actor.states
draw_icon(state.icon_index, x, y + 24 * count)
count += 1
break if (24 * count > 76)
end
end
def show_icon(item, x, y)
if item != nil
draw_icon(item.icon_index, x, y)
end
end
def draw_hp(actor, x, y)
back = Cache.system(Crissaegrim_Hud::Base)
cw = back.width
ch = back.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x, y-ch+24, back, src_rect)
meter = Cache.system(Crissaegrim_Hud::HP_Bar)
cw = meter.width * actor.hp / actor.maxhp
ch = meter.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x+5, y-ch+17, meter, src_rect)
end
def draw_mp(actor, x, y)
back = Cache.system(Crissaegrim_Hud::Base)
cw = back.width
ch = back.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x, y-ch+24, back, src_rect)
meter = Cache.system(Crissaegrim_Hud::MP_Bar)
cw = meter.width * actor.mp / actor.maxmp
ch = meter.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x+5, y-ch+17, meter, src_rect)
end
end
#------------------------------------------------------------------------------
class Scene_Map
alias crissaegrim_abs_hud_start start
alias crissaegrim_abs_hud_update update
alias crissaegrim_abs_hud_terminate terminate
def start
crissaegrim_abs_hud_start
if Crissaegrim_Hud::Background != ""
@bg = Sprite.new
@bg.bitmap = Cache.system(Crissaegrim_Hud::Background)
end
@hud = Window_CrissaegrimHud.new
showing_hud
@show = true
end
def update
crissaegrim_abs_hud_update
@bg.update if Crissaegrim_Hud::Background != ""
@hud.update
showing_hud
end
def terminate
crissaegrim_abs_hud_terminate
@bg.dispose if Crissaegrim_Hud::Background != ""
@hud.dispose
end
def showing_hud
if Input.trigger?(Crissaegrim_Hud::Show_Hide_Button)
if @show == true
@show = false
else
@show = true
end
end
if Crissaegrim_Hud::OnOff_Hud_Switch == 0 or $game_switches[Crissaegrim_Hud::OnOff_Hud_Switch] == true
if @show == true
@hud.visible = true
@bg.visible = true if Crissaegrim_Hud::Background != ""
elsif @show == false
@hud.visible = false
@bg.visible = false if Crissaegrim_Hud::Background != ""
end
else
@hud.visible = false
@bg.visible = false if Crissaegrim_Hud::Background != ""
end
end
end
-Necro_100000
Satasfying your ABS Needs.