Jump to content
Rpg²S Forum

Salva - Carica


Melosx
 Share

Recommended Posts

Salva - Carica

Descrizione

Aggiunge la possibilità di scegliere se Salvare o caricare la partita sostituendo il comando salva del menu.

 

Autore

Melosx

 

Istruzioni per l'uso

Mettetelo sopra main e sotto Materials.

 

 

	#==============================================================================	# ** Salva/Carica	#=============================================================================	# Autore:   Melosx	# Versione: 1.1	# Data di creazione: 23-5-2011 => v1.0	#					23-5-2011 => v1.1	#	#	# 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.	#	# v1.1 - Feature:	# - Possibilità di cambiare con facilità il nome al comando.	# - Se salvataggio disabilitato si può solo caricare.	# - Corretti un paio di bug.	#============================================================================= 	module SC 	  NOMECOMANDO = "Salva/Carica" 	end  	class Scene_Salva_Carica < Scene_Base 	  def start		super		create_menu_background		create_command_window	  end 	  def post_start		super		open_command_window	  end 	  def pre_terminate		super		close_command_window	  end 	  def terminate		super		dispose_menu_background		dispose_command_window	  end 	  def update		super		update_menu_background		@command_window.update		if Input.trigger?(Input::C)		  if $game_system.save_disabled and @command_window.index == 0			  Sound.play_buzzer			return		  end		case @command_window.index		  when 0	#Salva			comando_salva		  when 1	# Carica			comando_carica		  end		elsif Input.trigger?(Input::B)		  Sound.play_cancel		  $scene = Scene_Menu.new		end 	  end 	  def create_command_window		s1 = "Salva"		s2 = "Carica"		@command_window = Window_Command.new(172, [s1, s2])		@command_window.x = (544 - @command_window.width) / 2		@command_window.y = 208		@command_window.openness = 0		@command_window.open		if $game_system.save_disabled		  @command_window.draw_item(0, false)		end	  end 	  def dispose_command_window		@command_window.dispose	  end 	  def open_command_window		@command_window.open		begin		  @command_window.update		  Graphics.update		end until @command_window.openness == 255	  end 	  def close_command_window		@command_window.close		begin		  @command_window.update		  Graphics.update		end until @command_window.openness == 0	  end	  #--------------------------------------------------------------------------	  # * Salva	  #--------------------------------------------------------------------------	  def comando_salva		Sound.play_decision		$scene = Scene_File.new(true, false, false)	  end	  #--------------------------------------------------------------------------	  # * Carica	  #--------------------------------------------------------------------------	  def comando_carica		  Sound.play_decision		  $scene = Scene_File.new(false, false, false)	  end	end  	#==============================================================================	# ** Scene_Menu	#------------------------------------------------------------------------------	#  * alias	#============================================================================== 	class Scene_Menu < Scene_Base	  include SC	  alias melosx_update_command_selection update_command_selection	  alias melosx_create_command_window create_command_window 	  def create_command_window		s1 = Vocab::item		s2 = Vocab::skill		s3 = Vocab::equip		s4 = Vocab::status		s5 = SC::NOMECOMANDO		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		  # se non ci sono giocatori in party		  @command_window.draw_item(0, false)	 # Disabilita oggetti		  @command_window.draw_item(1, false)	 # Disabilita poteri		  @command_window.draw_item(2, false)	 # Disabilita equipaggiamenti		  @command_window.draw_item(3, false)	 # Disabilita stato		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		  end		  Sound.play_decision		  case @command_window.index		  when 0			$scene = Scene_Item.new		  when 1,2,3			start_actor_selection		  when 4			$scene = Scene_Salva_Carica.new		  when 5			$scene = Scene_End.new		  end		end	  end	end

 

 

Bugs e Conflitti Noti

N/A

http://i.imgur.com/ROhv4te.png



287x66-white.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...