Guest Access
Go to page : 1, 2, 3
Administrator
Administrator
Administrator
profile
G@MeF@Ce
profile
With the support of Hackel, mr_wiggles, and LiTTleDRAgo we now have a stable version of the new "XAS Hero Mini HUD!"
thought I'd share with our guests too!
*I'll continue to add more features to the script if it makes sense.
HERO MINI HUD 3.1
+ XP/VX (cross engined)
+ no graphics required
+ disable switch
+ configure two buttons to toggle display
+ Red HP heart containers
+ Blue Special bar
+ Green Experience bar
+ White Hero Name
+ Yellow Stamina bar (requires XAS)
+ Purple Charge bar (requires XAS)
+ reduced lag (or no lag at all)
*enjoy!
thought I'd share with our guests too!
*I'll continue to add more features to the script if it makes sense.
HERO MINI HUD 3.1
+ XP/VX (cross engined)
+ no graphics required
+ disable switch
+ configure two buttons to toggle display
+ Red HP heart containers
+ Blue Special bar
+ Green Experience bar
+ White Hero Name
+ Yellow Stamina bar (requires XAS)
+ Purple Charge bar (requires XAS)
+ reduced lag (or no lag at all)
- Code:
################################################################################
# ============= XAS Hero Mini HUD v3.1 by gameface101 4/11/2011 ================
# special thanks to: Hackel, mr_wiggles, and LiTTleDRAgo for RGSS support
################################################################################
module Hero_Mini_HUD
#[display options]==============================================================
HMINI_DISABLE = 2
PRESS_HOLD = Input::A # (Shift)
TRIGGER_HUD = Input::C # (Space/Enter)
VISIBLE_DEF = false
HMINI_HUD_SKIN = 0
HMINI_HUD_OPACITY = 255
#[health bar settings]==========================================================
HP_HEARTS = true
HP_QUANTITY = 3
HP_X = 37
HP_Y = 85
#[special bar settings]=========================================================
SP_ON = true
SP_X = 2
SP_Y = 14
SP_WID = 36
SP_HET = 4
#[experience bar settings]======================================================
EXP_ON = true
EXP_X = 2
EXP_Y = 72
EXP_WID = 36
EXP_HET = 4
#[name settings]================================================================
HERO_NAME = true
NAME_SIZE = 14
N_X = 10
N_Y = 67
#[stamina bar settings](requires XAS)===========================================
ST_ON = true
ST_X = 2
ST_Y = 68
ST_WID = 36
ST_HET = 2
#[charge bar settings](requires XAS)============================================
CHARGE_ON = true
CH_X = 2
CH_Y = 20
CH_WID = 36
CH_HET = 2
XAS_39 = true
end
#===============================================================================
class HMini_Hud < Window_Base
def initialize
super($game_player.screen_x-38,$game_player.screen_y-48,160,160)
self.visible = (Hero_Mini_HUD::VISIBLE_DEF)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Impact"
self.contents.font.size = 24
self.z = 3000
self.opacity = Hero_Mini_HUD::HMINI_HUD_SKIN
@hearts = Hero_Mini_HUD::HP_QUANTITY
@opacity = Hero_Mini_HUD::HMINI_HUD_OPACITY
@old_name = ''
@old_hp = @old_sp = @old_exp = @hr = 0
@name_sprite = Sprite.new
@name_sprite.bitmap = Bitmap.new(132, 132)
@name_sprite.z = self.z
@name_sprite.bitmap.font.name = self.contents.font.name
@name_sprite.bitmap.font.size = self.contents.font.size
@name_sprite.visible = self.visible
refresh
end
def refresh
actor = !rpgvx? ? $game_party.actors[0] : $game_party.members[0]
return if @old_hp == actor.hp
self.contents.clear
self.opacity = Hero_Mini_HUD::HMINI_HUD_SKIN
self.contents_opacity = Hero_Mini_HUD::HMINI_HUD_OPACITY
if Hero_Mini_HUD::HERO_NAME && @old_name != actor.name
@old_name = actor.name
@name_sprite.bitmap.clear
@name_sprite.bitmap.font.size = Hero_Mini_HUD::NAME_SIZE
@name_sprite.bitmap.font.color.set(0, 0, 0)#black
@name_sprite.bitmap.draw_text(N_X - 1, N_Y - 1, 160, 32, actor.name, 0)
@name_sprite.bitmap.draw_text(N_X - 1, N_Y + 1, 160, 32, actor.name, 0)
@name_sprite.bitmap.draw_text(N_X + 1, N_Y - 1, 160, 32, actor.name, 0)
@name_sprite.bitmap.draw_text(N_X + 1, N_Y + 1, 160, 32, actor.name, 0)
@name_sprite.bitmap.font.color = normal_color #white
@name_sprite.bitmap.draw_text(N_X, N_Y, 160, 32, actor.name, 0)
end
if Hero_Mini_HUD::HP_HEARTS
@old_hp = actor.hp
@n = actor.hp
@mn = actor.maxhp
@hr = 0
@lh = 0
@hearts = Hero_Mini_HUD::HP_QUANTITY
@c = 255
@l = @n*100/@mn
@ho = @l*@hearts
for i in 0..@hearts-1
x = self.contents
#-------------------------------------------------------------[heart containers]
c = Color.new(0, 0, 0, @opacity)
x.fill_rect(i*14, 4, 1, 3, c)
x.fill_rect(i*14+1, 3, 1, 5, c)
x.fill_rect(i*14+2, 2, 1, 7, c)
x.fill_rect(i*14+3, 1, 1, 9, c)
x.fill_rect(i*14+4, 0, 1, 11, c)
x.fill_rect(i*14+5, 1, 1, 11, c)
x.fill_rect(i*14+6, 2, 1, 11, c)
x.fill_rect(i*14+7, 1, 1, 11, c)
x.fill_rect(i*14+8, 0, 1, 11, c)
x.fill_rect(i*14+9, 1, 1, 9, c)
x.fill_rect(i*14+10, 2, 1, 7, c)
x.fill_rect(i*14+11, 3, 1, 5, c)
x.fill_rect(i*14+12, 4, 1, 3, c)
#----------------------------------------------------------------[heart outline]
c = Color.new(255, 255, 255, @opacity)
x.fill_rect(i*14+1, 4, 1, 2, c)
x.fill_rect(i*14+2, 3, 1, 4, c)
x.fill_rect(i*14+3, 2, 1, 6, c)
x.fill_rect(i*14+4, 1, 1, 8, c)
x.fill_rect(i*14+5, 2, 1, 8, c)
x.fill_rect(i*14+6, 3, 1, 8, c)
x.fill_rect(i*14+7, 2, 1, 8, c)
x.fill_rect(i*14+8, 1, 1, 8, c)
x.fill_rect(i*14+9, 2, 1, 6, c)
x.fill_rect(i*14+10, 3, 1, 4, c)
x.fill_rect(i*14+11, 4, 1, 2, c)
#-------------------------------------------------------------------[heart fill]
c_color(1)
x.fill_rect(i*14+2, 4, 1, 2, Color.new(@c, 0, 0, @opacity))
c_color(2)
x.fill_rect(i*14+3, 3, 1, 4, Color.new(@c, 0, 0, @opacity))
c_color(3)
x.fill_rect(i*14+4, 2, 1, 6, Color.new(@c, 0, 0, @opacity))
c_color(4)
x.fill_rect(i*14+5, 3, 1, 6, Color.new(@c, 0, 0, @opacity))
c_color(5)
x.fill_rect(i*14+6, 4, 1, 6, Color.new(@c, 0, 0, @opacity))
c_color(6)
x.fill_rect(i*14+7, 3, 1, 6, Color.new(@c, 0, 0, @opacity))
c_color(7)
x.fill_rect(i*14+8, 2, 1, 6, Color.new(@c, 0, 0, @opacity))
c_color(8)
x.fill_rect(i*14+9, 3, 1, 4, Color.new(@c, 0, 0, @opacity))
c_color(9)
x.fill_rect(i*14+10, 4, 1, 2, Color.new(@c, 0, 0, @opacity))
@hr += 1
end
end
end
def c_color(a)
@c = (@hr <= (@ho/100)-1) ? 255 :
(@ho/10-@hr*10 >= a and @ho/10-@hr*10 <= 9) ? 255 : 0
end
def update
super
@name_sprite.x = self.x + N_X
@name_sprite.y = self.y + N_Y - 50
end
def dispose
super
@name_sprite.dispose
end
def vis=(val)
self.visible = val
@name_sprite.visible = self.visible
end
N_X = Hero_Mini_HUD::N_X
N_Y = Hero_Mini_HUD::N_Y
end
module Kernel
if !defined? rpgvx?
def rpgvx?
return true if defined? Graphics.resize_screen
return false
end
end
end
#-------------------------------------------------------------------------------
#===============================================================================
class Scene_Map
PRESS_HOLD = Hero_Mini_HUD::PRESS_HOLD
TRIGGER_HUD = Hero_Mini_HUD::TRIGGER_HUD
if rpgvx?
alias hud_terminate terminate
def terminate
delete_hud
hud_terminate
end
alias hmini_hud_main main
def main
seting_hud
hmini_hud_main
delete_hud
end
else
alias hmini_hud_main main
def main
seting_hud
hmini_hud_main
delete_hud
end
end
alias hmini_hud_update update
def seting_hud
@HMini_hud = HMini_Hud.new
@SMini_Hud = SMini_Hud.new
@XPMini_Hud = XPMini_Hud.new
@STMini_Hud = STMini_Hud.new
@CHMini_Hud = CHMini_Hud.new
end
def delete_hud
[@HMini_hud, @SMini_Hud, @XPMini_Hud, @STMini_Hud,
@CHMini_Hud].each {|i| i.dispose if i != nil && !i.disposed?}
end
def update
if !$game_switches[Hero_Mini_HUD::HMINI_DISABLE]
if @HMini_hud.visible and Input.press?(PRESS_HOLD) and
Input.trigger?(TRIGGER_HUD)
@HMini_hud.vis = @HMini_hud.visible = false
elsif !@HMini_hud.visible and Input.press?(PRESS_HOLD) and
Input.trigger?(TRIGGER_HUD)
@HMini_hud.vis = @HMini_hud.visible = true
end
else
@HMini_hud.vis = @HMini_hud.visible = false
end
hmini_hud_update
@HMini_hud.x = $game_player.screen_x - Hero_Mini_HUD::HP_X #--------location
@HMini_hud.y = $game_player.screen_y - Hero_Mini_HUD::HP_Y #--------location
[@SMini_Hud, @XPMini_Hud, @STMini_Hud,
@CHMini_Hud].each {|i| i.visible = @HMini_hud.visible
i.x = @HMini_hud.x
i.y = @HMini_hud.y}
if @HMini_hud.visible == true
[@HMini_hud, @SMini_Hud, @XPMini_Hud, @STMini_Hud,
@CHMini_Hud].each {|i| i.update
i.refresh}
end
end
end
#===============================================================================
class Window_Base < Window
def draw_hmini_hud_bar(x, y, min, max, width = 152, height = 6,
bar_color = Color.new(150, 0, 0, 255),
end_color = Color.new(255, 255, 60, 255))
for i in 0..height
self.contents.fill_rect(x, y + height - i, width + 1, 1,
Color.new(50, 50, 50, 255))
end
#-------------------------------------------------------------------------------
for i in 1..(height - 1)
r = 100 * (height - i) / height + 0 * i / height
g = 100 * (height - i) / height + 0 * i / height
b = 100 * (height - i) / height + 0 * i / height
a = 255 * (height - i) / height + 255 * i / height
self.contents.fill_rect(x, y + height, width, 1, Color.new(r, b, g, a))
end
#-------------------------------------------------------------------------------
for i in 1..( (min / max.to_f) * width - 1)
for j in 1..(height -1)
r = bar_color.red * (width - i) / width + end_color.red * i / width
g = bar_color.green * (width - i) / width + end_color.green * i / width
b = bar_color.blue * (width - i) / width + end_color.blue * i / width
a = bar_color.alpha * (width - i) / width + end_color.alpha * i / width
self.contents.fill_rect(x + i, y + height - j, 1, 1, Color.new(r, g, b, a))
end
end
end
end
class SMini_Hud < Window_Base
include Hero_Mini_HUD
def initialize
super($game_player.screen_x-38,$game_player.screen_y-48,160,160)
self.visible = (VISIBLE_DEF)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Impact"
self.contents.font.size = 24
self.z = 3000
self.opacity = HMINI_HUD_SKIN
@old_hp = @old_sp = @old_exp = @hr = 0
refresh
end
def refresh
sp = !rpgvx? ? $game_party.actors[0].sp : $game_party.members[0].mp
maxsp = !rpgvx? ? $game_party.actors[0].maxsp : $game_party.members[0].maxmp
return if @old_sp == sp
self.contents.clear
self.opacity = HMINI_HUD_SKIN
self.contents_opacity = HMINI_HUD_OPACITY
if SP_ON == true
@old_sp = sp
draw_hmini_hud_bar(SP_X, SP_Y, sp,
maxsp, SP_WID, SP_HET, Color.new(0,50,250,255),
Color.new(50,100,255,255))
end
end
end
class XPMini_Hud < Window_Base
include Hero_Mini_HUD
def initialize
super($game_player.screen_x-38,$game_player.screen_y-48,160,160)
self.visible = (VISIBLE_DEF)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Impact"
self.contents.font.size = 24
self.z = 3000
self.opacity = HMINI_HUD_SKIN
@old_hp = @old_sp = @old_exp = @hr = 1234567890000
refresh
end
def refresh
if EXP_ON == true
actor = !rpgvx? ? $game_party.actors[0] : $game_party.members[0]
return if @old_exp == actor.now_exp
self.contents.clear
self.opacity = HMINI_HUD_SKIN
self.contents_opacity = HMINI_HUD_OPACITY
@old_exp = actor.now_exp
draw_hmini_hud_bar(EXP_X,EXP_Y,actor.now_exp,
actor.next_exp,EXP_WID,EXP_HET,Color.new(0,255,0,255),
Color.new(100,255,100,255))
end
end
end
class STMini_Hud < Window_Base
include Hero_Mini_HUD #
def initialize
super($game_player.screen_x-38,$game_player.screen_y-48,160,160)
self.visible = (VISIBLE_DEF)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Impact"
self.contents.font.size = 24
self.z = 3000
self.opacity = HMINI_HUD_SKIN
@old_hp = @old_sp = @old_st = @hr = 0
refresh
end
def refresh
if $xrxs_xas
if ST_ON
meter_now = XAS_39 ? $game_system.action_meter : $game_system.move_meter
return if @old_st == meter_now
self.contents.clear
self.opacity = HMINI_HUD_SKIN
self.contents_opacity = HMINI_HUD_OPACITY
@old_st = meter_now
draw_hmini_hud_bar(ST_X,ST_Y,meter_now ,
100,ST_WID,ST_HET,Color.new(255,255,25,255),
Color.new(255,255,25,255))
end
end
end
end
class CHMini_Hud < Window_Base
include Hero_Mini_HUD #
def initialize
super($game_player.screen_x-38,$game_player.screen_y-48,160,160)
self.visible = (VISIBLE_DEF)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = "Impact"
self.contents.font.size = 24
self.z = 3000
self.opacity = HMINI_HUD_SKIN
@old_hp = @old_sp = @old_charge = @hr = 1
refresh
end
def refresh
if $xrxs_xas
if CHARGE_ON
charge = $game_temp.xas_charge_time
return if @old_charge == charge
self.contents.clear
self.opacity = HMINI_HUD_SKIN
self.contents_opacity = HMINI_HUD_OPACITY
@old_charge = $game_temp.xas_charge_time
draw_hmini_hud_bar(CH_X,CH_Y,charge,
100,CH_WID,CH_HET, Color.new(255,100,225,255),
Color.new(255,150,255,255))
end
end
end
end
#===============================================================================
class Game_Actor < Game_Battler
def now_exp
return @exp - @exp_list[@level]
end
def next_exp
return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
end
end
*enjoy!
Administrator
Show Signature
||||||||||
||||||||||
||||||||||
profile
supercow
profile
Was looking for this amazing kindda script long ago
the simple looking of the hp bar (and especialy near the char) make's it more action feel , and no graphics needed? , im out of words.....
this could be one of script ppl would be looking for, and the addition of turning it on and off is like bonus on christmas present
i know its work in progress , but my hp bar doesnt decrease like in your pict, is there script in XAS that has to be deleted first for it to work? thx for another awesome script
i'm using MOG - S Hud 1.0 for the most part but i might change my mind
the simple looking of the hp bar (and especialy near the char) make's it more action feel , and no graphics needed? , im out of words.....
this could be one of script ppl would be looking for, and the addition of turning it on and off is like bonus on christmas present
i know its work in progress , but my hp bar doesnt decrease like in your pict, is there script in XAS that has to be deleted first for it to work? thx for another awesome script
i'm using MOG - S Hud 1.0 for the most part but i might change my mind
||||||||||
Show Signature
||||||||||
Administrator
Administrator
Administrator
profile
G@MeF@Ce
profile
@supercow - hey I'm glad that you enjoy it!
I'm going to continue to add more features such as SP, EXP, NAME, etc...
this should have no conflicts with any other scripts.
but if you run into any errors let me know.
works great with XAS mini Map
I'm going to continue to add more features such as SP, EXP, NAME, etc...
this should have no conflicts with any other scripts.
but if you run into any errors let me know.
works great with XAS mini Map
Administrator
Show Signature
C.O.R.N.
Administrator
Administrator
Administrator
profile
G@MeF@Ce
profile
*updated! added blue SP and green EXP bars to go with the red HP hearts!
edit: added Hero's Name Feature!
edit: added Hero's Name Feature!
Administrator
Show Signature
||||||||||
||||||||||
||||||||||
profile
supercow
profile
what a cute little name...totally using this
very clean and user friendly to configure
very clean and user friendly to configure
||||||||||
Show Signature
||||||||||
C.O.R.N.
C.O.R.N.
C.O.R.N.
profile
BluE
profile
dude this is completely bull epic. Just looking at this makes me instantly top my "drooling" class. gonna try this out. Is it still WIP?
C.O.R.N.
Show Signature
Administrator
Administrator
Administrator
profile
G@MeF@Ce
profile
^ nah, I think I'm done? ~ as long as it works like a charm...
EDIT: actually I'm going to finish the user friendly module THEN I'm done.
^,^
EDIT: actually I'm going to finish the user friendly module THEN I'm done.
^,^
Administrator
Show Signature
||||||||||
||||||||||
||||||||||
profile
supercow
profile
Perfect script & A very well done job
this is just an idea, theres one more feature in the future that you can put there, its stamina bar
this is just an idea, theres one more feature in the future that you can put there, its stamina bar
||||||||||
Show Signature
||||||||||
Administrator
Administrator
Administrator
profile
G@MeF@Ce
profile
^@supercow ~ (stamina) you mean the CT meter?
so make this exclusive to XAS!?
ok brilliant!
so make this exclusive to XAS!?
ok brilliant!
Administrator
Show Signature
Go to page : 1, 2, 3