HUD estilo Castlevania Symphony of the Night
+5
Eddye44
thiago_d_d
PaiN*-*
allzero
Alucard_2
9 participantes
HUD estilo Castlevania Symphony of the Night
Seg Abr 05, 2010 9:27 pm
Introdução
Este script cria uma HUD ao estilo Castlevania Symphony of the Night (PSX).
Para saber mais, olhe as screenshots.
ATENÇÃO! ESTE script É UMA MODIFICAÇÃO DA HUD DO script "REQUIEM SBABS",
PORTANTO, VOCÊ:
* AO UTILIZAR O script, OS CRÉDITOS TAMBÉM DEVEM SER DADOS AO CRIADOR DO
"REQUIEM SBABS".
* ESTÁ PROIBIDO DE UTILIZAR O script PARA POSTAR EM ALGUM OUTRO FÓRUM.
ScreenShots
Screenshot retirada do meu projeto: Castlevania - A Origem do Mal, no qual fiz o script.
script e como usar
1º passo: Cole o script na seção "scripts Adicionais".2º passo: Nas linhas 21 a 31, você encontrará o seguinte:
- Código:
# Fundo da HUD em si
Background = "hpbar"
# Imagem da barra de MP
MP_Bar = "mpbar"
# Imagem de fundo da barra de MP/número do HP
Base = "hpbar"
# Switch que irá ativar/desativar a HUD
OnOff_Hud_Switch = 20
A explicação está logo aqui:
Background - Imagem de fundo da HUD
MP_Bar - Imagem da barra de MP
Base - Fundo da barra de MP e do HP
Mude o nome das imagens (o nome está entre os "") para o nome da imagem desejada.
Ah, é claro, tem também o OnOff_Hud_Switch, que é a ID da switch que liga/desliga a HUD.
script
- Código:
################################################################################
# Castlevania SOTN HUD #
################################################################################
# script original por: Vlad #
# Tradução do script original por: Henrik #
# Modificação por :Alucard_2 #
# #
# ATENÇÃO! ESTE script É UMA MODIFICAÇÃO DA HUD DO script "REQUIEM SBABS", #
# PORTANTO, VOCÊ: #
# #
# * AO UTILIZAR O script, OS CRÉDITOS TAMBÉM DEVEM SER DADOS AO CRIADOR DO #
# "REQUIEM SBABS". #
# #
# * ESTÁ PROIBIDO DE UTILIZAR O script PARA POSTAR EM ALGUM OUTRO FÓRUM. #
# #
################################################################################
#==============================================================================
# Crissaegrim HUD (Modificada)
#==============================================================================
# HUD Background Image
Background = "hpbar"
# MP Bar Image
MP_Bar = "mpbar"
# HP and MP Bars Background Image
Base = "hpbar"
# Switch that show or hide the HUD
OnOff_Hud_Switch = 20
##################################
class Requiem_HUD1 < Window_Base
def initialize
super(-32,-32,224,140)
self.opacity = 0
update
end
def update
return if $game_party.members.size <= 0
@actor = $game_party.members[0]
self.contents.clear
draw_mpbar(@actor, 25, 25)
draw_actor_hp_number(@actor, 0, 40)
for actor in $game_party.members
next if actor == @actor
xx = (actor.index-1)*64
draw_ally_life(actor,16+xx,64)
draw_actor_head(actor,16+xx,72)
end
end
def draw_ally_life(actor,x,y)
self.contents.font.size = 16
self.contents.font.color = text_color(15)
self.contents.draw_text(x+33,y+1,contents.width,24,"#{actor.hp}")
self.contents.draw_text(x+33,y+19,contents.width,24,"#{actor.mp}")
if actor.hp <= (actor.maxhp * 25) / 100
self.contents.font.color = text_color(2)
elsif actor.hp <= actor.maxhp / 2
self.contents.font.color = text_color(6)
else
self.contents.font.color = text_color(3)
end
self.contents.draw_text(x+32,y,contents.width,24,"#{actor.hp}")
self.contents.font.color = text_color(1)
self.contents.draw_text(x+32,y+18,contents.width,24,"#{actor.mp}")
end
def draw_hpbar(actor, x, y)
back = Cache.system(Base)
cw = back.width
ch = back.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x, y, back, src_rect)
return if actor.hp <= 0
meter = Cache.system(HP_Bar)
cw = meter.width * actor.hp / actor.maxhp
ch = meter.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x, y, meter, src_rect)
end
def draw_mpbar(actor, x, y)
back = Cache.system(Base)
cw = back.width
ch = back.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x, y, back, src_rect)
return if actor.mp <= 0
meter = Cache.system(MP_Bar)
cw = meter.width * actor.mp / actor.maxmp
ch = meter.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 57, y + 12, meter, src_rect)
end
end
class Scene_Map < Scene_Base
alias crissaegrim_hud_start start
alias crissaegrim_hud_update update
alias crissaegrim_hud_terminate terminate
def start
crissaegrim_hud_start
@hud_window1 = Requiem_HUD1.new
@hud_window1.visible = false
showing_hud
end
def update
crissaegrim_hud_update
@hud_window1.update
showing_hud
end
def terminate
crissaegrim_hud_terminate
@hud_window1.dispose
end
def showing_hud
if OnOff_Hud_Switch <= 0 or $game_switches[OnOff_Hud_Switch] == true
@hud_window1.visible = true
else
@hud_window1.visible = false
end
end
end
###############
# Window_Base #
###############
class Window_Base < Window
#--------------------------------------------------------------------------
# Exibição do HP
# actor : herói
# x : exibe na coordenada X
# y : exibe na coordenada Y
# width : largura
#--------------------------------------------------------------------------
def draw_actor_hp_number(actor, x, y, width = 120)
if actor.hp == actor.maxhp
self.contents.font.color = Color.new(255,255,255,255)
else
if actor.hp / actor.maxhp <= 30#self.contents.font.color = hp_color(actor)
self.contents.font.color = Color.new(235,235,235,255)
end
end
self.contents.font.size = 30
xr = x + width
if width < 120
self.contents.draw_text(xr - 40, y, 40, WLH, actor.hp, 2)
else
self.contents.draw_text(xr - 90, y, 40, WLH, actor.hp, 2)
end
end
end
#==============================================================================
# Window_StatusMap
#------------------------------------------------------------------------------
# Janela que exibe o HP e MP do personagem principal.
#==============================================================================
class Window_StatusMap < Window_Base
#--------------------------------------------------------------------------
# Inicialização do objeto
# actor : herói
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 0, 544, 416)
@actor = actor
refresh
end
#--------------------------------------------------------------------------
# Atualização
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_actor_hp(@actor, 50, 0)
end
end
Créditos
Vlad - Criação do script original.
Henrik - Tradução do script original.
Alucard_2 - Modificação para HUD de Castlevania.
Imagens Necessárias
- allzeroNovo Membro
- Mensagens : 198
Reputação : 16
Re: HUD estilo Castlevania Symphony of the Night
Ter Abr 06, 2010 1:53 pm
mais um topico de alucard :joker:
continue assim!
continue assim!
Re: HUD estilo Castlevania Symphony of the Night
Ter Abr 06, 2010 2:31 pm
@allzero
Ainda tem muito mais de onde vem^^
Ainda tem muito mais de onde vem^^
- PaiN*-*Novo Membro
- Mensagens : 105
Reputação : 28
Re: HUD estilo Castlevania Symphony of the Night
Qui Abr 08, 2010 1:07 pm
Mais um *-*, que bom... muito bem explicado cara... continue assim. +1rep
- thiago_d_dNovato
- Mensagens : 81
Reputação : 16
Re: HUD estilo Castlevania Symphony of the Night
Dom Abr 18, 2010 9:24 am
muito bom vlw por disponibilizar
- Eddye44Membro
- Mensagens : 392
Reputação : 94
Re: HUD estilo Castlevania Symphony of the Night
Dom Abr 18, 2010 9:41 am
interessante, cara!
gostei pacas
baxei e talvez use em um projeto
gostei pacas
baxei e talvez use em um projeto
- SteveTheCreeperMembro
- Mensagens : 476
Reputação : 24
Re: HUD estilo Castlevania Symphony of the Night
Qui maio 13, 2010 5:36 pm
Eddye,bem que vc podia começar um agente ta presisando.
@topic
muito bom,combina com o jogo
parebens
@topic
muito bom,combina com o jogo
parebens
- Eddye44Membro
- Mensagens : 392
Reputação : 94
Re: HUD estilo Castlevania Symphony of the Night
Qui maio 13, 2010 6:02 pm
axo q vc tem razao, rs
mas como a partir de semana q vem soh terei acesso à net as terças e quintas, fika difícil, mas se conseguir burlar isso com certeza postarei um projeto convocando uma equipe
jah ateh tenho algo em mente
vlw
mas como a partir de semana q vem soh terei acesso à net as terças e quintas, fika difícil, mas se conseguir burlar isso com certeza postarei um projeto convocando uma equipe
jah ateh tenho algo em mente
vlw
Re: HUD estilo Castlevania Symphony of the Night
Sáb maio 15, 2010 8:17 pm
Obrigado pelos comentários, pessoal^^
@Eddye
Opa, um projeto do Eddye! QUERO VER! XD
@Eddye
Opa, um projeto do Eddye! QUERO VER! XD
- HugooLealNovato
- Mensagens : 94
Reputação : 14
Re: HUD estilo Castlevania Symphony of the Night
Sáb maio 15, 2010 10:19 pm
Alucard_2 escreveu:Obrigado pelos comentários, pessoal^^
@Eddye
Opa, um projeto do Eddye! QUERO VER! XD
tbm quero xD~, mas alucard mto bom msm kra continue assim (Y)
Re: HUD estilo Castlevania Symphony of the Night
Dom maio 16, 2010 1:29 pm
@HugooLeal
Que bom que gostou^^
Daqui a uma semana ou menos irei lançar um novo menu^^
Que bom que gostou^^
Daqui a uma semana ou menos irei lançar um novo menu^^
- HugooLealNovato
- Mensagens : 94
Reputação : 14
Re: HUD estilo Castlevania Symphony of the Night
Dom maio 16, 2010 4:43 pm
blzinha to esperandu xD~
- allzeroNovo Membro
- Mensagens : 198
Reputação : 16
Re: HUD estilo Castlevania Symphony of the Night
Ter Jul 13, 2010 5:00 pm
massa, mas esta sem screen shot
Re: HUD estilo Castlevania Symphony of the Night
Qua Jul 21, 2010 8:53 pm
Consertei o link das imagens, agora está tudo certinho.
Re: HUD estilo Castlevania Symphony of the Night
Qua Jul 21, 2010 9:18 pm
Realmente muito bom /quandoeubaixareufalomais xD
- RafaelSOPAMembro
- Mensagens : 339
Reputação : 53
Re: HUD estilo Castlevania Symphony of the Night
Qui Jul 22, 2010 11:40 am
fico otimo ;D
Pena que não vai ser muito util no meu projeto mas parabens ;D
Pena que não vai ser muito util no meu projeto mas parabens ;D
Permissões neste sub-fórum
Não podes responder a tópicos
|
|