[RMXP] "Load Game" Button in In-Game Menu - Script Request

Tornado Samurai

A Samurai of the Storms
Veteran
Joined
Jan 11, 2015
Messages
577
Reaction score
57
First Language
English
Primarily Uses
Hello everyone.

I'm currently working on a short horror game project and there was a particular script I had envisioned that would be great for the game, but I have yet to find it, or rather, it does not exist. The script in question is having a "Load Game/Continue" button in the in-game menu.

Going in further description, I would like a script where it makes the "Load Game/Continue" button from the Title Screen...



Also available in the in-game menu alongside other buttons like "Item", "Save" and "End Game" to allow loading past saves during gameplay seamlessly instead of having to go back to the title screen.



---

Also, I am currently using a script that allows all other buttons like "Status", "Equipment" and etc. to be excluded, leaving only "Items", "Save", and "End Game." I would like the "Load Game Button in In-Game Menu" script to be compatible with this, if possible.

Thanks for taking the time to view this message,

- Tornado Samurai
 

MobiusXVI

Game Maker
Veteran
Joined
Mar 20, 2013
Messages
383
Reaction score
91
First Language
English
Primarily Uses
I edited what Shaz did, so you can use this in its place.

Code:
# Script Edit by MobiusXVI for Tornado Samurai# Allows for loading from main menu and title screen#==============================================================================# ** Scene_Menu#------------------------------------------------------------------------------#  This class performs menu screen processing.#==============================================================================class Scene_Menu  #--------------------------------------------------------------------------  # * Main Processing  #--------------------------------------------------------------------------  def main    # Make command window    s1 = $data_system.words.item    s2 = "Save"    s3 = "Load"	s4 = "End Game"    @command_window = Window_Command.new(160, [s1, s2, s3, s4])    @command_window.index = @menu_index    # If number of party members is 0    if $game_party.actors.size == 0      # Disable items, skills, equipment, and status      @command_window.disable_item(0)    end    # If save is forbidden    if $game_system.save_disabled      # Disable save      @command_window.disable_item(1)    end    # Make play time window    @playtime_window = Window_PlayTime.new    @playtime_window.x = 0    @playtime_window.y = 224    # Make steps window    @steps_window = Window_Steps.new    @steps_window.x = 0    @steps_window.y = 320    # Make gold window    @gold_window = Window_Gold.new    @gold_window.x = 0    @gold_window.y = 416    # Make status window    @status_window = Window_MenuStatus.new    @status_window.x = 160    @status_window.y = 0    # Execute transition    Graphics.transition    # Main loop    loop do      # Update game screen      Graphics.update      # Update input information      Input.update      # Frame update      update      # Abort loop if screen is changed      if $scene != self        break      end    end    # Prepare for transition    Graphics.freeze    # Dispose of windows    @command_window.dispose    @playtime_window.dispose    @steps_window.dispose    @gold_window.dispose    @status_window.dispose  end  #--------------------------------------------------------------------------  # * Frame Update (when command window is active)  #--------------------------------------------------------------------------  def update_command    # If B button was pressed    if Input.trigger?(Input::      # Play cancel SE      $game_system.se_play($data_system.cancel_se)      # Switch to map screen      $scene = Scene_Map.new      return    end    # If C button was pressed    if Input.trigger?(Input::C)      # If command other than save or end game, and party members = 0      if $game_party.actors.size == 0 and @command_window.index < 1        # Play buzzer SE        $game_system.se_play($data_system.buzzer_se)        return      end      # Branch by command window cursor position      case @command_window.index      when 0  # item        # Play decision SE        $game_system.se_play($data_system.decision_se)        # Switch to item screen        $scene = Scene_Item.new      when 1  # save        # If saving is forbidden        if $game_system.save_disabled          # Play buzzer SE          $game_system.se_play($data_system.buzzer_se)          return        end        # Play decision SE        $game_system.se_play($data_system.decision_se)        # Switch to save screen        $scene = Scene_Save.new      when 2  # load game        # Play decision SE        $game_system.se_play($data_system.decision_se)        # Switch to end game screen        $scene = Scene_Load.new(false)	  when 3  # end game        # Play decision SE        $game_system.se_play($data_system.decision_se)        # Switch to end game screen        $scene = Scene_End.new      end      return    end  endend#==============================================================================# ** Scene_Save#------------------------------------------------------------------------------#  This class performs save screen processing.#==============================================================================class Scene_Save < Scene_File  #--------------------------------------------------------------------------  # * Decision Processing  #--------------------------------------------------------------------------  alias mobius_on_decision on_decision    def on_decision(filename)    mobius_on_decision(filename)    # Switch to menu screen    $scene = Scene_Menu.new(1)  end  #--------------------------------------------------------------------------  # * Cancel Processing  #--------------------------------------------------------------------------  alias mobius_on_cancel on_cancel    def on_cancel    # Switch to menu screen    $scene = Scene_Menu.new(1)  endend#==============================================================================# ** Scene_Load#------------------------------------------------------------------------------#  This class performs load screen processing.#==============================================================================class Scene_Load < Scene_File  #--------------------------------------------------------------------------  # * Object Initialization  #--------------------------------------------------------------------------  alias mobius_initialize initialize  def initialize(return_to_title = true)	mobius_initialize	@return_to_title = return_to_title  end  #--------------------------------------------------------------------------  # * Cancel Processing  #--------------------------------------------------------------------------  def on_cancel    # Play cancel SE    $game_system.se_play($data_system.cancel_se)	if @return_to_title		# Switch to title screen		$scene = Scene_Title.new	else		$scene = Scene_Menu.new(2)	end  endend#==============================================================================# ** Scene_End#------------------------------------------------------------------------------#  This class performs game end screen processing.#==============================================================================class Scene_End  #--------------------------------------------------------------------------  # * Frame Update  #--------------------------------------------------------------------------  def update    # Update command window    @command_window.update    # If B button was pressed    if Input.trigger?(Input::      # Play cancel SE      $game_system.se_play($data_system.cancel_se)      # Switch to menu screen      $scene = Scene_Menu.new(3)      return    end    # If C button was pressed    if Input.trigger?(Input::C)      # Branch by command window cursor position      case @command_window.index      when 0  # to title        command_to_title      when 1  # shutdown        command_shutdown      when 2  # quit        command_cancel      end      return    end  end  #--------------------------------------------------------------------------  # *  Process When Choosing [Cancel] Command  #--------------------------------------------------------------------------  def command_cancel    # Play decision SE    $game_system.se_play($data_system.decision_se)    # Switch to menu screen    $scene = Scene_Menu.new(3)  endend 
 

Tornado Samurai

A Samurai of the Storms
Veteran
Joined
Jan 11, 2015
Messages
577
Reaction score
57
First Language
English
Primarily Uses
Thank you so much for the script, MobiusXVI! It works amazingly! :D Thanks for taking the time to help me! I really appreciate it! :D

- Tornado Samurai
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,050
Members
137,571
Latest member
grr
Top