[RPGVXAce] HUD Angelo v2.1
Página 1 de 1
[RPGVXAce] HUD Angelo v2.1
HUD Angelo v2.1
Estou começando no mundo do RGSS com essa HUD simples mas bonita. Essa versão 2 é uma otimização da versão anterior, mas é meu primeiro script então não espere muito. Ele é Plug N' Play, ou seja, não precisa de nenhuma imagem ou outra coisa pra funcionar, é só copiar, colar e customizar a gosto
Existem 7 (ou 12, depende do seu ponto de vista) opções de customização, como ligar HUD ou elementos dela por switch, mudar a cor do fundo, mudar fonte.
A explicação de como customizá-lo está no próprio script, mas como eu estou fazendo isso voltado pra comunidade RPGMaker VX Ace, então ele ainda está em inglês, mas se houver uma alma caridosa que quiser traduzir, é só pedir via PM.
Screen v1
Screen v2
Script v1
- Spoiler:
- Código:
#==============================================================================
# ■ Angelo HUD v1
#------------------------------------------------------------------------------
# Created by Brandon *** No customization options *** Plug N' Play!
#==============================================================================
class AngeloHUD < Window_Base
def initialize
super(-16, -16, 576, 448)
self.opacity = 0
self.visible = false
refresh
end
def refresh
self.contents.clear
actor = $game_party.members[0]
colorback = Color.new(0, 0, 0, 150)
colorback2 = Color.new(0, 0, 0, 190)
self.contents.fill_rect(3, 352, 238, 32, colorback)
self.contents.fill_rect(3, 387, 238, 32, colorback)
self.contents.fill_rect(3, 360, 238, 16, colorback2)
self.contents.fill_rect(3, 395, 238, 16, colorback2)
draw_text(40, 352, 100, 32, "HP")
draw_text(40, 387, 100, 32, "MP")
draw_gauge(70, 349, 116, actor.hp_rate, hp_gauge_color1, hp_gauge_color2)
draw_gauge(70, 384, 116, actor.mp_rate, mp_gauge_color1, mp_gauge_color2)
draw_current_and_max_values(90, 356, 116, actor.hp, actor.mhp, hp_color(actor), normal_color)
draw_current_and_max_values(90, 391, 116, actor.mp, actor.mmp, mp_color(actor), normal_color)
end
def update
self.visible = true
refresh
end
end
class Scene_Map
alias hud_start start
alias hud_main main
alias hud_update update
alias hud_terminate terminate
def main
@hud = AngeloHUD.new
hud_main
end
def update
@hud.update
hud_update
end
def terminate
@hud.dispose
end
end
Script v2.1
- Spoiler:
- Código:
#==============================================================================
# ■ Angelo HUD v2.1
#------------------------------------------------------------------------------
# Created by Brandon *** 7(12) customization options *** Plug N' Play!
#==============================================================================
#------------------------------------------------------------------------------
# ▼ Customization Options
#----------------------------#-------------------------------------------------
# ● HUDVISIBLESWITCH #
#- - - - - - - - - - - - - #
# Define the switch that you want to use to turn the HUD 'ON' or 'OFF', by de-
# fault it's 1. When the switch is turned 'ON' the HUD will be turned 'ON' too,
# and when the switch is turned 'OFF' the HUD is turned 'OFF' too.
#------------------------------#-----------------------------------------------
# ● FONTNAME & FONTSIZE #
#- - - - - - - - - - - - - - #
# In FONTNAME you define the font that you want to use with the HUD information.
# In FONTSIZE you define the size of the font you've decided in FONTNAME.
#-------------------#----------------------------------------------------------
# ● HPSWITCH #
#- - - - - - - - -#
# Define the switch that you want to use to turn the HP Display 'ON' or 'OFF',
# by default it's 2. When the switch is turned 'ON' the HP Display will be
# turned 'ON' too, and when the switch is turned 'OFF' the HP Display is turned
# 'OFF' too.
#-------------------#----------------------------------------------------------
# ● MPSWITCH #
#- - - - - - - - -#
# Define the switch that you want to use to turn the MP Display 'ON' or 'OFF',
# by default it's 3. When the switch is turned 'ON' the MP Display will be
# turned 'ON' too, and when the switch is turned 'OFF' the MP Display is turned
# 'OFF' too.
#-----------------------#------------------------------------------------------
# ● WEAPONSWITCH #
#- - - - - - - - - - -#
# Define the switch that you want to use to turn the Currently Equipped Weapon
# Display 'ON' or 'OFF', by default it's 4. When the switch is turned 'ON' the
# Currently Equipped Weapon will be turned 'ON' too, and when the switch is turned
# 'OFF' the Currently Equipped Display is turned 'OFF' too.
#---------------------#--------------------------------------------------------
# ● R, G, B _BLA #
#- - - - - - - - - -#
# Define the amount of each color(Red, Green, Blue) presented in the lighter a-
# rea of the Back of the HUD. By default it's black which means that R, G and B
# are setted to '0'.
#---------------------#--------------------------------------------------------
# ● R, G, B _BDA #
#- - - - - - - - - -#
# Define the amount of each color(Red, Green, Blue) presented in the darker a-
# rea of the Back of the HUD. By default it's black which means that R, G and B
# are setted to '0'.
#------------------------------------------------------------------------------
# ▼ Post Scriptum
#------------------------------------------------------------------------------
# ● "I want to turn all the HUD or only some part of her at the same time with
# the same switch, it's possible?"
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Yes, just set the parts you wanted in the same
# switch as the HUDVISIBLESWITCH.
#------------------------------------------------------------------------------
# ● "Which values you recommend to use in FONTSIZE?"
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Use between 8 and 18, or the text will be too
# small or too bigger. But some times it depends
# on your FONTNAME.
#------------------------------------------------------------------------------
# ● "Which values you recommend to use in R, G, B _BLA and BDA?"
#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# You MUST use ONLY values between 0 and 255.
#------------------------------------------------------------------------------
module ANGELO
HUDVISIBLESWITCH = 1
FONTNAME = "Times New Roman"
FONTSIZE = 16
HPSWITCH = 2
MPSWITCH = 3
WEAPONSWITCH = 4
R_BLA = 0
G_BLA = 0
B_BLA = 0
R_BDA = 0
G_BDA = 0
B_BDA = 0
end
#------------------------------------------------------------------------------
# !!!!DO NOT EDIT PAST HERE UNLESS YOU KNOW WHAT YOU'RE DOING!!!!
#------------------------------------------------------------------------------
include ANGELO
class AngeloHUD < Window_Base
def initialize
super(-16, -16, 576, 448)
self.opacity = 0
refresh
actor = $game_party.members[0]
@hp = actor.hp
@mp = actor.mp
@mhp = actor.mhp
@mmp = actor.mmp
end
def refresh
self.contents.clear
self.contents.font = Font.new(FONTNAME, FONTSIZE)
if $game_switches[HUDVISIBLESWITCH] == true
actor = $game_party.members[0]
index = 0
colorback = Color.new(R_BLA, G_BLA, B_BLA, 150)
colorback2 = Color.new(R_BDA, G_BDA, B_BDA, 190)
unless $game_switches[HPSWITCH] == false
self.contents.fill_rect(3, 364, 238, 16, colorback)
self.contents.fill_rect(3, 368, 238, 8, colorback2)
draw_gauge(19, 353, 200, actor.hp_rate, hp_gauge_color1, hp_gauge_color2)
draw_text(40, 354, 100, 32, Vocab::hp_a)
draw_current_and_max_values(90, 358, 116, actor.hp, actor.mhp, hp_color(actor), normal_color)
end
unless $game_switches[MPSWITCH] == false
self.contents.fill_rect(3, 395, 238, 16, colorback)
self.contents.fill_rect(3, 399, 238, 8, colorback2)
draw_gauge(19, 384, 200, actor.mp_rate, mp_gauge_color1, mp_gauge_color2)
draw_text(40, 385, 100, 32, Vocab::mp_a)
draw_current_and_max_values(90, 389, 116, actor.mp, actor.mmp, mp_color(actor), normal_color)
end
unless $game_switches[WEAPONSWITCH] == false
draw_item_name(actor.equips[index], -64 + 92, 376, true)
end
end
end
def update
super
refresh if Graphics.frame_count % 20 == 0
end
end
class Scene_Map
alias hud_start create_all_windows
alias hud_update update_all_windows
alias hud_terminate dispose_all_windows
def create_all_windows
@hud = AngeloHUD.new
end
end
Créditos
Autor: Brandon(Eu^^)
NÃO COPIE SEM MINHA PERMISSÃO
The Sequel of ANGELO Systems by Brandon Ferraz e Sousa is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
Based on a work at www.rpgmakervxace.net.
Permissions beyond the scope of this license may be available at www.mundorpgmaker.com.
The Sequel of ANGELO Systems by Brandon Ferraz e Sousa is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
Based on a work at www.rpgmakervxace.net.
Permissions beyond the scope of this license may be available at www.mundorpgmaker.com.
burandon- Mensagens : 20
Data de inscrição : 15/12/2011
Idade : 29
Localização : Teresina
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos