Premetto che non so se esiste una cosa del genere, ma visto che per un periodo sono stato senza Internet mi sono messo d'impegno e ho fatto qualche esperimento col Ruby.
In pratica questo script visualizza una finestra in basso a sinistra nella schermata di Game Over che fa scegliere se caricare una partita salvata, tornare al titolo o chiudere il gioco.
Per farlo funzionare, andate in Scene_Gameover e rimpiazzatene il contenuto con questo codice:
#============================================================================== # ** Scene_Gameover by Kanta #============================================================================== # www.rpgart.org #------------------------------------------------------------------------------ # Questa classe gestisce la schermata di Game Over #============================================================================== class Scene_Gameover #-------------------------------------------------------------------------- # * Processo principale #-------------------------------------------------------------------------- def main # Visualizza l'immagine del Game Over @sprite = Sprite.new @sprite.bitmap = RPG::Cache.gameover($data_system.gameover_name) # Ferma i BGM e i BGS $game_system.bgm_play(nil) $game_system.bgs_play(nil) # Riproduce il ME del Game Over $game_system.me_play($data_system.gameover_me) # Creiamo la finestra con le opzioni Carica, Torna al Titolo e Chiudi Programma s1 = "CARICA" s2 = "TITOLO" s3 = "CHIUDI" @command_window = Window_Command.new(192, [s1, s2, s3]) @command_window.back_opacity = 160 @command_window.x = 0 @command_window.y = 480 - @command_window.height # Se almeno un file di salvataggio esiste, allora il caricamento č abilitato for i in 0..3 if FileTest.exist?("Salvataggio #{i+1}.ksf") @continue_enabled = true else @command_window.disable_item(0) end end # Esegue la transizione Graphics.transition(120) # Loop principale (esegue all'infinito) loop do # Aggiorna lo schermo Graphics.update # Aggiorna l'input da tastiera Input.update # Aggiorna la finestra update # Se cambia la classe, termina il processo di questa classe if $scene != self break end end # Prepara per la transizione Graphics.freeze # Dispone l'immagine e la finestra @sprite.bitmap.dispose @sprite.dispose @command_window.dispose # Esegue la transizione Graphics.transition(40) # Prepara la transizione Graphics.freeze # If battle test if $BTEST $scene = nil end end #-------------------------------------------------------------------------- # * Aggiornamento #-------------------------------------------------------------------------- def update @command_window.update if Input.trigger?(Input::C) case @command_window.index when 0 carica when 1 titolo when 2 chiudi end end end #------------------------------------------------------------------------- # * Comandi aggiuntivi #------------------------------------------------------------------------- def carica # Se č possibile continuare unless @continue_enabled # Riproduce il SE Buzzer $game_system.se_play($data_system.buzzer_se) return end # Altrimenti esegue il decision $game_system.se_play($data_system.decision_se) # Apre la schermata di caricamento $scene = Scene_LoadGameover.new end def titolo # Esegui SE $game_system.se_play($data_system.decision_se) # Vai al titolo+ $scene = Scene_Title.new end def chiudi # Esegui SE $game_system.se_play($data_system.decision_se) # Dissolvenza sonoro Audio.bgm_fade(800) Audio.bgs_fade(800) Audio.me_fade(800) # Chiusura applicazione $scene = nil end end
Adesso, sopra Scene_Load, creiamo una nuova classe chiamata Scene_LoadGameover e incolliamoci questo codice:
#============================================================================== # ** Scene_Load #------------------------------------------------------------------------------ # This class performs load screen processing. #============================================================================== class Scene_LoadGameover < Scene_File #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize # Remake temporary object $game_temp = Game_Temp.new # Timestamp selects new file $game_temp.last_file_index = 0 latest_time = Time.at(0) for i in 0..3 filename = make_filename(i) if FileTest.exist?(filename) file = File.open(filename, "r") if file.mtime > latest_time latest_time = file.mtime $game_temp.last_file_index = i end file.close end end super("Quale file vuoi caricare?") end #-------------------------------------------------------------------------- # * Decision Processing #-------------------------------------------------------------------------- def on_decision(filename) # If file doesn't exist unless FileTest.exist?(filename) # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Play load SE $game_system.se_play($data_system.load_se) # Read save data file = File.open(filename, "rb") read_save_data(file) file.close # Restore BGM and BGS $game_system.bgm_play($game_system.playing_bgm) $game_system.bgs_play($game_system.playing_bgs) # Update map (run parallel process event) $game_map.update # Switch to map screen $scene = Scene_Map.new end #-------------------------------------------------------------------------- # * Cancel Processing #-------------------------------------------------------------------------- def on_cancel # Play cancel SE $game_system.se_play($data_system.cancel_se) # Switch to title screen $scene = Scene_Gameover.new end #-------------------------------------------------------------------------- # * Read Save Data # file : file object for reading (opened) #-------------------------------------------------------------------------- def read_save_data(file) # Read character data for drawing save file characters = Marshal.load(file) # Read frame count for measuring play time Graphics.frame_count = Marshal.load(file) # Read each type of game object $game_system = Marshal.load(file) $game_switches = Marshal.load(file) $game_variables = Marshal.load(file) $game_self_switches = Marshal.load(file) $game_screen = Marshal.load(file) $game_actors = Marshal.load(file) $game_party = Marshal.load(file) $game_troop = Marshal.load(file) $game_map = Marshal.load(file) $game_player = Marshal.load(file) # If magic number is different from when saving # (if editing was added with editor) if $game_system.magic_number != $data_system.magic_number # Load map $game_map.setup($game_map.map_id) $game_player.center($game_player.x, $game_player.y) end # Refresh party members $game_party.refresh end end
Non servirā fare nient'altro per far funzionare lo script.
Per la gioia (?) degli occhi, ecco uno screen (purtroppo l'ho dovuto uppare su mediafire):
Screen
Modificato da Flame, 12 August 2013 - 07:39 AM.