Menu de Personagem Único
Brasil G4mes :: Scripts :: Scripts RGSS2
Página 1 de 1
Menu de Personagem Único
MENU DE PERSONAGEM ÚNICO
Um script que torna o menu apropriado para um personagem só
Screen:
- Spoiler:
- #==============================================================================
# Menu Personagem Único
#==============================================================================
# Por: Matheus2
# Menu apenas para um personagem
# Alguns elementos, como a janela do nome do mapa, o tempo e a posição
# da janela das opções retirados do Menu Personalizavel do Shepher
#==============================================================================
# Todas as outras alterações foram feitas por mim
#==============================================================================
# Creditos:
# Matheus2 - DuploMaker por: Fazer o menu e reuinir todos os itens
# Shepher por: Fazer o Menu Personalizavel daonde eu pude tirar as coisas que eu não sabia fazer
#==============================================================================
#------------------------------------------------------------------------------#
# Game_Party #
#------------------------------------------------------------------------------#
class Game_Party < Game_Unit
MAX_MEMBERS = 1
end
#------------------------------------------------------------------------------#
# Game_Map #
#------------------------------------------------------------------------------#
class Game_Map
attr_reader :map_id
def namemap
$name_map = load_data("Data/MapInfos.rvdata")
$name_map[@map_id].name
end
end
#------------------------------------------------------------------------------#
# Window_Stats #
#------------------------------------------------------------------------------#
class Window_Stats < Window_Base
def initialize(actor)
super(250, 240, 294, 176)
@actor = actor
refresh
end
def refresh
self.contents.clear
draw_actor_parameter(@actor, 0, 0 + WLH * 0, 0)
draw_actor_parameter(@actor, 0, 0 + WLH * 1, 1)
draw_actor_parameter(@actor, 0, 0 + WLH * 2, 2)
draw_actor_parameter(@actor, 0, 0 + WLH * 3, 3)
end
end
#------------------------------------------------------------------------------#
# Window_Time #
#------------------------------------------------------------------------------#
class Window_Time < Window_Base
def initialize(x,y)
super(x, y, 144, 56)
self.x = x # Cordenada X
self.y = y # Cordenada Y
refresh
end
def refresh
self.contents.clear
self.contents.font.color = system_color
@total_sec = Graphics.frame_count / Graphics.frame_rate
hour = @total_sec / 60 / 60
min = @total_sec / 60 % 60
sec = @total_sec % 60
text = sprintf("%02d:%02d:%02d", hour, min, sec)
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, 120, 24, text)
end
def update
super
if Graphics.frame_count / Graphics.frame_rate != @total_sec
refresh
end
end
end
#------------------------------------------------------------------------------#
# Window_Map #
#------------------------------------------------------------------------------#
class Window_Map < Window_Base
def initialize(x,y)
super(x, y, 240, 56)
refresh
end
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.font.color = normal_color
self.contents.draw_text(0, -8, 200, 32, $game_map.namemap.to_s)
end
end
#------------------------------------------------------------------------------#
# Window_Equips #
#------------------------------------------------------------------------------#
class Window_Equips < Window_Base
def initialize(actor)
super(0, 240, 250, 176)
@actor = actor
refresh
end
def refresh
self.contents.clear
@data = []
for item in @actor.equips do @data.push(item) end
@item_max = @data.size
self.contents.font.color = system_color
draw_item_name(@data[0], 0, WLH * 0)
draw_item_name(@data[1], 0, WLH * 1)
draw_item_name(@data[2], 0, WLH * 2)
draw_item_name(@data[3], 0, WLH * 3)
draw_item_name(@data[4], 0, WLH * 4)
end
end
#------------------------------------------------------------------------------#
# Window_MenuStatus #
#------------------------------------------------------------------------------#
class Window_MenuStatus < Window_Selectable
def initialize(x, y)
super(0, 57, 544, 128)
refresh
self.active = false
self.index = -1
end
def refresh
self.contents.clear
@item_max = $game_party.members.size
for actor in $game_party.members
draw_actor_face(actor, 2, actor.index * 96 + 2, 92)
x = 104
y = actor.index * 96 + WLH / 2
draw_actor_name(actor, x, y)
draw_actor_class(actor, x + 120, y)
draw_actor_level(actor, x, y + WLH * 1)
draw_actor_state(actor, x, y + WLH * 2)
draw_actor_hp(actor, x + 120, y + WLH * 1)
draw_actor_mp(actor, x + 120, y + WLH * 2)
end
end
def update_cursor
if @index < 0 # Sem cursor
self.cursor_rect.empty
elsif @index < @item_max # Padrão
self.cursor_rect.set(0, @index * 96, contents.width, 96)
elsif @index >= 100 # Si
self.cursor_rect.set(0, (@index - 100) * 96, contents.width, 96)
else # O todo
self.cursor_rect.set(0, 0, contents.width, @item_max * 96)
end
end
end
#------------------------------------------------------------------------------#
# Scene_Menu #
#------------------------------------------------------------------------------#
class Scene_Menu < Scene_Base
def initialize(menu_index = 0)
@menu_index = menu_index
end
def start
super
create_menu_background
create_command_window
@gold_window = Window_Gold.new(0, 184)
@status_window = Window_MenuStatus.new(160, 0)
@map_window = Window_Map.new(160, 184)
@equips_window = Window_Equips.new($game_party.members[0])
@time_window = Window_Time.new(400, 184)
@stats_window = Window_Stats.new($game_party.members[0])
end
def terminate
super
dispose_menu_background
@command_window.dispose
@gold_window.dispose
@status_window.dispose
@map_window.dispose
@equips_window.dispose
@time_window.dispose
@stats_window.dispose
end
def update
super
update_menu_background
@command_window.update
@gold_window.update
@status_window.update
@time_window.update
if @command_window.active
update_command_selection
elsif @status_window.active
update_actor_selection
end
end
def create_command_window
s1 = Vocab::item
s2 = Vocab::skill
s3 = Vocab::equip
s4 = Vocab::status
s5 = Vocab::save
s6 = Vocab::game_end
@command_window = Window_Command.new(544,[s1, s2, s3, s4, s5, s6],6,0,10)
@command_window.index = @menu_index
if $game_party.members.size == 0 # Se não houver membros na equipe
@command_window.draw_item(0, false) # Desabilita "Items"
@command_window.draw_item(1, false) # Desabilita "Habilidades"
@command_window.draw_item(2, false) # Desabilita "Equipamentos"
@command_window.draw_item(3, false) # Desabilita "Status"
end
if $game_system.save_disabled # Se salvar for proibido
@command_window.draw_item(4, false) # Desabilita "Salvar"
end
end
def update_command_selection
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Map.new
elsif Input.trigger?(Input::C)
if $game_party.members.size == 0 and @command_window.index < 4
Sound.play_buzzer
return
elsif $game_system.save_disabled and @command_window.index == 4
Sound.play_buzzer
return
end
Sound.play_decision
case @command_window.index
when 0 # Item
$scene = Scene_Item.new
when 1,2,3 # Habilidades, equipamento, status
start_actor_selection
when 4 # Salvar
$scene = Scene_File.new(true, false, false)
when 5 # Fim de jogo
$scene = Scene_End.new
end
end
end
def start_actor_selection
@command_window.active = false
@status_window.active = true
if $game_party.last_actor_index < @status_window.item_max
@status_window.index = $game_party.last_actor_index
else
@status_window.index = 0
end
end
def end_actor_selection
@command_window.active = true
@status_window.active = false
@status_window.index = -1
end
def update_actor_selection
if Input.trigger?(Input::B)
Sound.play_cancel
end_actor_selection
elsif Input.trigger?(Input::C)
$game_party.last_actor_index = @status_window.index
Sound.play_decision
case @command_window.index
when 1 # Habilidades
$scene = Scene_Skill.new(@status_window.index)
when 2 # Equipamento
$scene = Scene_Equip.new(@status_window.index)
when 3 # Status
$scene = Scene_Status.new(@status_window.index)
end
end
end
end
Créditos:DuploMaker/Matheus2
Silver- Membro
- Mensagens : 923
Fama : 36
Tópicos semelhantes
» Menu de um personagem
» Gold Menu Mod Mog Menu Yui
» De Pinish para mundo - Charset Cassius Saint Seiya - o 1º e único que vi!!!
» Falco Menu 4.7
» [RMVX] Fazer o jogador escolher seu personagem
» Gold Menu Mod Mog Menu Yui
» De Pinish para mundo - Charset Cassius Saint Seiya - o 1º e único que vi!!!
» Falco Menu 4.7
» [RMVX] Fazer o jogador escolher seu personagem
Brasil G4mes :: Scripts :: Scripts RGSS2
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos