Ok, so for my Zelda game, I'm using XAS 3, and I was wondering if I could get some help moving the HUD components to where I want them. I'll post the actual script, and also a screenshot of how it is now, and an edited screen of how I would want it (approx)
(Thats all the stuff that I think might have to do with that kinda stuff. There's most likely going to be some stuff that doesn't have to do with that at all...)
Sorry I'm a tad horrible at scripting and pixel numbers and all that. That's kinda why I need your help :wink:
so this is how it looks now:
and this is the edited image of where I want things moved, and what text I want gone (most of it):
Here's the HUD pieces I've made, btw:
Some of the pieces I just deleted because I didn't want them in there.
If you could help me out, that'd be very fantastic! I don't really have too much time to do this, so if you ARE interested, you have until next monday night at the LATEST you can finish. I'm not asking you to do busy work for me. I'm asking you to help me do something I really don't know how to do. If you want to explain to me how to move everything myself, that'd be equally as excelent ^_^
thanks again!
Code:
module XAS_HUD
#Posição das janelas
WINDOW_STATUS_X = 0Â Â
WINDOW_STATUS_Y = 370
#ID da switch que desativa a janela do Status.
DISABLE_STATUS_HUD_SWITCH = 5
end
$mogscript["mpstelen"] = true
###############
# Window_Base #
###############
class Window_Base < Window Â
def draw_maphp2(actor, x, y)
actor = $game_party.actors[0]Â Â
self.contents.font.size = 20Â
back = RPG::Cache.picture("BAR_Meter")Â Â
cw = back.widthÂ
ch = back.height
src_rect = Rect.new(0, 0, cw, ch)Â Â
self.contents.blt(x + 65, y - ch + 30, back, src_rect)Â
meter = RPG::Cache.picture("HP_Meter")Â Â
cw = meter.width * actor.hp / actor.maxhp
ch = meter.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 65, y - ch + 30, meter, src_rect)
text = RPG::Cache.picture("HP_Tx")Â Â
cw = text.widthÂ
ch = text.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 35, y - ch + 30, text, src_rect)
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(x + 111, y - 1, 48, 32, actor.hp.to_s, 2)
lowhp = actor.maxhp * 20 / 100
avhp = actor.maxhp * 50 / 100
if actor.hp <= lowhp
self.contents.font.color = Color.new(255,55,55,255)
elsif actor.hp <= avhp
self.contents.font.color = Color.new(255,255,55,255)
else
self.contents.font.color = Color.new(255,255,255,255)
end
self.contents.draw_text(x + 110, y - 2, 48, 32, actor.hp.to_s, 2)Â Â
endÂ
def draw_mapsp2(actor, x, y)Â Â
self.contents.font.size = 20Â
back = RPG::Cache.picture("BAR_Meter")Â Â
cw = back.widthÂ
ch = back.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 65, y - ch + 30, back, src_rect)Â
meter = RPG::Cache.picture("SP_Meter")Â Â
cw = meter.width * actor.sp / actor.maxsp
ch = meter.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 65, y - ch + 30, meter, src_rect)
text = RPG::Cache.picture("SP_Tx")Â Â
cw = text.widthÂ
ch = text.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 40, y - ch + 30, text, src_rect)
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(x + 111, y - 1, 48, 32, actor.sp.to_s, 2)Â Â
self.contents.font.color = Color.new(250,255,255,255)
self.contents.draw_text(x + 110, y - 2, 48, 32, actor.sp.to_s, 2)Â Â
end
def draw_mexp(actor, x, y)
self.contents.font.size = 16Â
actor = $game_party.actors[0]
if actor.next_exp != 0
rate = actor.now_exp.to_f / actor.next_exp
else
rate = 1
end
bitmap = RPG::Cache.picture("Exp_Meter")
if actor.level < 99
cw = bitmap.width * rate
else
cw = bitmap.width
end Â
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 40 , y - ch + 30, bitmap, src_rect)
bitmap2 = RPG::Cache.picture("Exp_Back")
cw = bitmap2.width
ch = bitmap2.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 40 , y - ch + 30, bitmap2, src_rect)
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(x + 55, y + 1, 84, 32, "Exp",0)
self.contents.font.color = Color.new(255,255,255,255)
self.contents.draw_text(x + 54, y, 84, 32, "Exp",0)
end
def nada
face = RPG::Cache.picture("")
endÂ
def draw_heroface(actor,x,y)
face = RPG::Cache.picture(actor.name + "_face") rescue nada
cw = face.width
ch = face.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x , y - ch, face, src_rect)Â Â
endÂ
def draw_actor_statemap(actor, x, y, width = 100)
self.contents.font.size = 16Â Â
text = make_battler_state_text(actor, width, true)
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(x + 1, y + 1, width, 32, text)
self.contents.font.color = Color.new(250,255,255,255)
self.contents.draw_text(x, y, width, 32, text)
end
def draw_actor_levelmap(actor, x, y)
self.contents.font.size = 20Â Â
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(x, y, 32, 32, "Lv")
self.contents.font.color = Color.new(50,255,250,255)Â Â
self.contents.draw_text(x + 1, y + 1, 32, 32, "Lv")
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(x + 30, y, 24, 32, actor.level.to_s, 1)
self.contents.font.color = Color.new(255,255,255,255)Â Â
self.contents.draw_text(x + 31, y + 1, 24, 32, actor.level.to_s, 1)Â Â
end
end
##############
# Game_Actor #
##############
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
#####################
# Window_Status_Map #
#####################
class Window_Sthero < Window_Base
def initialize
super(0, 0, 240, 120)
self.contents = Bitmap.new(width - 32, height - 32)
self.windowskin = RPG::Cache.windowskin("")Â Â
self.contents.font.bold = true
self.contents.font.name = "Georgia"
self.opacity = 0
refresh
endÂ
def refresh
self.contents.clear
actor = $game_party.actors[0]
draw_maphp2(actor, 35, 35)
draw_mapsp2(actor, - 40, 60)
draw_heroface(actor, 0, 70)
draw_actor_statemap(actor, 130, 60, 70)
draw_actor_levelmap(actor, 80, 10)Â Â
draw_mexp(actor, 90, 10)
end
end
(Thats all the stuff that I think might have to do with that kinda stuff. There's most likely going to be some stuff that doesn't have to do with that at all...)
Sorry I'm a tad horrible at scripting and pixel numbers and all that. That's kinda why I need your help :wink:
so this is how it looks now:
http://i248.photobucket.com/albums/gg188/kirbylore/hudscreen1.jpg[/img]
and this is the edited image of where I want things moved, and what text I want gone (most of it):
http://i248.photobucket.com/albums/gg188/kirbylore/hudscreen2.jpg[/img]
Here's the HUD pieces I've made, btw:
http://i248.photobucket.com/albums/gg188/kirbylore/HP_Meter.png[/img]
http://i248.photobucket.com/albums/gg18 ... e/Gold.png[/img]
http://i248.photobucket.com/albums/gg18 ... W_Item.png[/img]http://i248.photobucket.com/albums/gg188/kirbylore/Mequip.png[/img]
http://i248.photobucket.com/albums/gg18 ... _Meter.png[/img]
http://i248.photobucket.com/albums/gg18 ... e/Gold.png[/img]
http://i248.photobucket.com/albums/gg18 ... W_Item.png[/img]http://i248.photobucket.com/albums/gg188/kirbylore/Mequip.png[/img]
http://i248.photobucket.com/albums/gg18 ... _Meter.png[/img]
Some of the pieces I just deleted because I didn't want them in there.
If you could help me out, that'd be very fantastic! I don't really have too much time to do this, so if you ARE interested, you have until next monday night at the LATEST you can finish. I'm not asking you to do busy work for me. I'm asking you to help me do something I really don't know how to do. If you want to explain to me how to move everything myself, that'd be equally as excelent ^_^
thanks again!