ciao a tutti,ho un problema con la personalizzazione del menu.
il problema è nella riga 276 nello script editor di rpg maker(nella 533 se lo guardate da questo messaggio),dovrebbe farmi vedere il nome delle classe,ma da "Nillclass",perchè?
Nella schermata "stato" fa vedere la classe senza problemi....
questo è il codice:
Spoiler
#Questo script personalizza il menu
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# This class performs the menu screen processing.
#==============================================================================
class Scene_Menu < Scene_Base
#--------------------------------------------------------------------------
# * Object Initialization
# menu_index : command cursor's initial position
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
inizializza_pictures
end
#--------------------------------------------------------------------------
# * Start processing
#--------------------------------------------------------------------------
def start
super
create_menu_background
create_command_window
@gold_window = Window_Gold.new(250, 300)
@gold_window.opacity = 0
@status_window = Window_MenuStatus.new(252, 25)
@status_window.opacity = 0
@command_window.opacity = 0
@command_window.x = 70
@command_window.y = 40
end
#--------------------------------------------------------------------------
# * Termination Processing
#--------------------------------------------------------------------------
def terminate
super
dispose_menu_background
@gold_window.dispose
@command_window.dispose
@status_window.dispose
@diario.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
update_menu_background
@gold_window.update
@command_window.update
@status_window.update
if @command_window.active
update_command_selection
elsif @status_window.active
update_actor_selection
end
end
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
def create_command_window
s1 = "Files"
s2 = "Programmi"
s3 = "Hardwere"
s4 = "Stato"
s5 = Vocab::save
s6 = Vocab::game_end
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
@command_window.index = @menu_index
if $game_party.members.size == 0 # If number of party members is 0
@command_window.draw_item(0, false) # Disable item
@command_window.draw_item(1, false) # Disable equipment
@command_window.draw_item(2, false) # Disable status
end
if $game_system.save_disabled # If save is forbidden
@command_window.draw_item(3, false) # Disable save
end
end
#--------------------------------------------------------------------------
# * Update Command Selection
#--------------------------------------------------------------------------
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 < 3
Sound.play_buzzer
return
elsif $game_system.save_disabled and @command_window.index == 3
Sound.play_buzzer
return
end
Sound.play_decision
case @command_window.index
when 0 # Item
$scene = Scene_Item.new
when 1 # Skill, equipment, status
$scene = Scene_Skill.new(0)
when 2
$scene = Scene_Equip.new(0)
when 3
$scene = Scene_Status.new(0)
when 4 # Save
$scene = Scene_File.new(true, false, false)
when 5 # End Game
$scene = Scene_End.new
end
end
end
#--------------------------------------------------------------------------
# * Start Actor Selection
#--------------------------------------------------------------------------
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
#--------------------------------------------------------------------------
# * End Actor Selection
#--------------------------------------------------------------------------
def end_actor_selection
@command_window.active = true
@status_window.active = false
@status_window.index = -1
end
#--------------------------------------------------------------------------
# * Update Actor Selection
#--------------------------------------------------------------------------
def inizializza_pictures
@diario = Sprite.new
@diario.bitmap = Cache.picture("")
@diario.x = 22
@diario.y = 22
end
def draw_parameters(x, y)
draw_actor_parameter(@actor, x, y + WLH * 0, 0)
draw_actor_parameter(@actor, x, y + WLH * 1, 1)
draw_actor_parameter(@actor, x, y + WLH * 2, 2)
draw_actor_parameter(@actor, x, y + WLH * 3, 3)
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 # skill
$scene = Scene_Equip.new(0)#(@status_window.index)
when 2 # equipment
$scene = Scene_Status.new(0)#(@status_window.index)
end
end
end
end
class Scene_Item < Scene_Base
alias beffe_start start
def start
beffe_start
@diario = Sprite.new
@diario.bitmap = Cache.picture("")
@diario.viewport = @viewport
@diario.z = 99
end
alias beffe_terminate terminate
def terminate
beffe_terminate
@diario.dispose
end
end
class Scene_Skill < Scene_Base
alias beffe_start start
def start
beffe_start
@diario = Sprite.new
@diario.bitmap = Cache.picture("")
@diario.viewport = @viewport
@diario.z = 99
end
alias beffe_terminate terminate
def terminate
beffe_terminate
@diario.dispose
end
end
class Scene_Equip < Scene_Base
alias beffe_start start
def start
beffe_start
@diario = Sprite.new
@diario.bitmap = Cache.picture("")
@diario.viewport = @viewport
@diario.z = 99
end
alias beffe_terminate terminate
def terminate
beffe_terminate
@diario.dispose
end
end
class Window_EquipStatus < Window_Base
#--------------------------------------------------------------------------
# ● Riscrive il metodo Equip
#--------------------------------------------------------------------------
def draw_parameter(x, y, type)
case type
when 0
name = Vocab::atk
value = @actor.atk
new_value = @new_atk
when 1
name = Vocab::def
value = @actor.def
new_value = @new_def
when 2
name = Vocab::spi
value = @actor.spi
new_value = @new_spi
when 3
name = Vocab::agi
value = @actor.agi
new_value = @new_agi
end
self.contents.font.color = system_color
self.contents.draw_text(x + 4, y, 80, WLH, name)
self.contents.font.color = normal_color
self.contents.draw_text(x + 90, y, 30, WLH, value, 2)
self.contents.font.color = system_color
self.contents.draw_text(x + 122, y, 20, WLH, ">>", 1)
if new_value != nil
self.contents.font.color = new_parameter_color(value, new_value)
self.contents.draw_text(x + 142, y, 30, WLH, new_value, 2)
end
end
end
class Scene_End < Scene_Base
def return_scene
$scene = Scene_Menu.new(4)
end
end
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# ● Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@item_max = $game_party.members.size
for actor in $game_party.members
draw_actor_face(actor, 130, actor.index * 96 + 2, 92)
x = 2
y = actor.index * 96 + WLH / 2
draw_actor_name(actor, x+2, y)
draw_actor_class(@actor, x+2, y+20)
#draw_actor_hp(actor, x+2, y+40 + WLH * 1)
#draw_actor_mp(actor, x+2, y+40 + WLH * 2)
draw_parameters(actor, x+2, y+120)
draw_exp_info(actor, x+2, y+WLH*1+15)
end
end
def draw_parameters(actor,x, y)
draw_actor_parameter(actor, x, y + WLH * 0, 0)
draw_actor_parameter(actor, x, y + WLH * 1, 1)
draw_actor_parameter(actor, x, y + WLH * 2, 2)
draw_actor_parameter(actor, x, y + WLH * 3, 3)
end
def draw_exp_info(actor, x, y)
@actor = actor
s1 = @actor.exp_s
s2 = @actor.next_rest_exp_s
s_next = sprintf(Vocab::ExpNext, Vocab::level)
self.contents.font.size = 15
self.contents.font.name = "Arial"
self.contents.font.color = system_color
#self.contents.draw_text(x, y, 50, WLH,"PP:", 0)
#self.contents.font.color = system_color
self.contents.draw_text(x, y + WLH * 0, 180, WLH, Vocab::ExpTotal)
self.contents.draw_text(x, y + WLH * 2, 180, WLH, s_next)
self.contents.font.color = knockout_color
self.contents.draw_text(x+25, y + WLH * 0, 80, WLH, s1,0)
self.contents.font.color = normal_color
self.contents.draw_text(x+25, y, 80, WLH,"/", 1)
self.contents.font.color = knockout_color
self.contents.draw_text(x+25, y + WLH * 0, 80, WLH, s2,2)
end
end
class Scene_File < Scene_Base
def return_scene
if @from_title
$scene = Scene_Title.new
elsif @from_event
$scene = Scene_Map.new
else
$scene = Scene_Menu.new(3)
end
end
end
E questa un'immagine per farvi capire.
http://imageshack.us...95/miomenu.png/
Modificato da mew47, 10 June 2013 - 11:11 AM.