Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #-----=====-----=====-----=====-----=====-----=====-----=====-----=====-----====
- # Save or Load?
- # Author: DP3
- # Update: HungrySnake
- #-----=====-----=====-----=====-----=====-----=====-----=====-----=====-----====
- # Description:
- #
- # This script will allow you to both save and load in-game.
- # No longer will you have to return to the title screen to
- # load up another save file.
- #
- # Update: Made compatible with most of the other saving systems
- #-----=====-----=====-----=====-----=====-----=====-----=====-----=====-----====
- # Instructions:
- #
- # - This script is plug and play, all you have to do is go into
- # your database and change the vocab for save to something like
- # "Save/Load"
- #
- #
- # - Paste this script BELOW any other script which modifies the save system
- # (ie. Neo Save System or anything else)
- #
- #
- # - The script will give a command prompt when the save/load option
- # on the menu is selected.
- #
- #-----=====-----=====-----=====-----=====-----=====-----=====-----=====-----====
- #==============================================================================
- # ** Scene_File
- #------------------------------------------------------------------------------
- # This class performs the save and load screen processing.
- #==============================================================================
- class Scene_SaveLoad < Scene_Base
- def start
- super
- create_menu_background
- create_command_window
- end
- def update
- super
- update_menu_background
- update_command_window
- end
- def terminate
- super
- dispose_menu_background
- dispose_command_window
- end
- def create_command_window
- s1 = "Save"
- s2 = "Load"
- @command_window = Window_Command.new(142, [s1, s2])
- @command_window.x = (544 - @command_window.width) * 0.5
- @command_window.y = (414 - @command_window.height) * 0.5
- end
- def update_command_window
- @command_window.update
- if Input.trigger?(Input::B)
- Sound.play_cancel
- $scene = Scene_Menu.new(4)
- elsif Input.trigger?(Input::C)
- case @command_window.index
- when 0
- Sound.play_decision
- $scene = Scene_File.new(true,false,false,false)
- when 1
- Sound.play_decision
- $scene = Scene_File.new(false,false,false,false)
- end
- end
- end
- def dispose_command_window
- @command_window.dispose
- end
- end
- class Scene_File < Scene_Base
- #--------------------------------------------------------------------------
- # * Object Initialization
- # saving : save flag (if false, load screen)
- # from_title : flag: it was called from "Continue" on the title screen
- # from_event : flag: it was called from the "Call Save Screen" event
- #--------------------------------------------------------------------------
- alias dp3_saveload_initialize initialize
- def initialize(saving, from_title, from_event,pre_saveload=true)
- @pre_saveload = pre_saveload
- dp3_saveload_initialize(saving, from_title, from_event)
- end
- #--------------------------------------------------------------------------
- # * Start processing
- #--------------------------------------------------------------------------
- alias dp3_saveload_start start
- def start
- if !@pre_saveload
- dp3_saveload_start
- else
- $scene = Scene_SaveLoad.new
- end
- end
- #--------------------------------------------------------------------------
- # * Termination Processing
- #--------------------------------------------------------------------------
- alias dp3_saveload_terminate terminate
- def terminate
- dp3_saveload_terminate if !@pre_saveload
- end
- #--------------------------------------------------------------------------
- # * Frame Update
- #--------------------------------------------------------------------------
- alias dp3_saveload_update update
- def update
- dp3_saveload_update if !@pre_saveload
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement