Versione: 1.0
Autore/i: Melosx
Informazioni:
Aggiunge la possibilità di scegliere se Salvare o caricare la partita sostituendo il comando salva del menu.
Istruzioni:
Mettetelo sopra main.
Script:
#==============================================================================
# ** Salva/Carica - Versione XP
#=============================================================================
# Autore: Melosx
# Versione: 1.0
# Data di creazione: 4-6-2011 => v1.0
#
#
# Quando si va sul comando Salva/Carica del menù questo script fa apparire una
# finestra di selezione dove si sceglie se salvare o caricare una partita.
# E' possibile cambiare il nome al comando modificando il valore a NOMECOMANDO.
# Se l'opzione di salvataggio viene disabilitata sarà possibile solo caricare.
#
#=============================================================================
module SC
NOMECOMANDO = "Salva/Carica"
end
class Scene_Salva_Carica
def main
s1 = "Salva"
s2 = "Carica"
@command_window = Window_Command.new(192, [s1, s2])
@command_window.x = 320 - @command_window.width / 2
@command_window.y = 240 - @command_window.height / 2
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@command_window.dispose
end
def update
@command_window.update
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Menu.new(5)
return
end
if $game_system.save_disabled
@command_window.disable_item(0)
end
if Input.trigger?(Input::C)
case @command_window.index
when 0
if $game_system.save_disabled
$game_system.se_play($data_system.buzzer_se)
else
comando_salva
end
when 1
comando_carica
end
return
end
end
def comando_salva
$game_system.se_play($data_system.decision_se)
$scene = Scene_Save.new
end
def comando_carica
$game_system.se_play($data_system.decision_se)
$scene = Scene_Carica.new
end
end
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# * alias
#==============================================================================
class Scene_Menu
include SC
alias melosx_main main
alias melosx_update_command update_command
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
s1 = $data_system.words.item
s2 = $data_system.words.skill
s3 = $data_system.words.equip
s4 = "Status"
s5 = SC::NOMECOMANDO
s6 = "End Game"
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
@command_window.index = @menu_index
if $game_party.actors.size == 0
@command_window.disable_item(0)
@command_window.disable_item(1)
@command_window.disable_item(2)
@command_window.disable_item(3)
end
@playtime_window = Window_PlayTime.new
@playtime_window.x = 0
@playtime_window.y = 224
@steps_window = Window_Steps.new
@steps_window.x = 0
@steps_window.y = 320
@gold_window = Window_Gold.new
@gold_window.x = 0
@gold_window.y = 416
@status_window = Window_MenuStatus.new
@status_window.x = 160
@status_window.y = 0
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@command_window.dispose
@playtime_window.dispose
@steps_window.dispose
@gold_window.dispose
@status_window.dispose
end
def update_command
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
return
end
if Input.trigger?(Input::C)
if $game_party.actors.size == 0 and @command_window.index < 4
$game_system.se_play($data_system.buzzer_se)
return
end
case @command_window.index
when 0
$game_system.se_play($data_system.decision_se)
$scene = Scene_Item.new
when 1
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 2
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 3
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@status_window.active = true
@status_window.index = 0
when 4
$game_system.se_play($data_system.decision_se)
$scene = Scene_Salva_Carica.new
when 5
$game_system.se_play($data_system.decision_se)
$scene = Scene_End.new
end
return
end
end
end
class Scene_Carica < Scene_Load
def on_cancel
# Play cancel SE
$game_system.se_play($data_system.cancel_se)
# If called from event
if $game_temp.save_calling
# Clear save call flag
$game_temp.save_calling = false
# Switch to map screen
$scene = Scene_Map.new
return
end
# Switch to menu screen
$scene = Scene_Menu.new(4)
end
end
Demo:N/D


































