06-06-2025, 10:29 PM 
	
	
	Autosave on Leveling
Version: 1.0
Version: 1.0
Introduction
When anyone in your party gains a level, the game creates an auto-save file within that very second. To access the auto-save file, some changes are necessary to the save/load menus.
Features
- Saves your game after leveling
- Does NOT save if losing a level˂feature two˃
- Simple script call usable to trigger autosaves
- Main page has the required code, Second page... rewrites
Screenshots
None. But if there was one, it would show a save menu with five viable savegame slots instead of four.
Script
The main code that performs the actual tests and autosave function
 PT 1: Main
  			Code:
#==============================================================================
# ** AUTOSAVE on LEVELING
#------------------------------------------------------------------------------
#    by DerVVulfman
#    version 1.0
#    06-06-2025 (mm/dd/yyyy)
#    RGSS / RPGMaker XP
#==============================================================================
#    PT 1 : Master System Save Code
#==============================================================================
#
#  The code within this page (Pt 1)  contains no overwritten methods.  It is
#  the master script that activates a flag  when any actor's level increases
#  (whether by combat or not), and runs a test in the field map every second
#  for the flag. If the flag is valid, the script will create a new autosave
#  file.
#
#  NOTE:  The autosave file cannot be overwritten  with a normal save. That
#         is deliberate.  Also, losing a level will NOT trigger autosave.
#
#  NOTE:  The write_save_data method is a 'duplicate' of that in Scene_Save.
#
#  NOTE:  Using "$game_temp.level_gain_flag = true" in a script call will
#         force a new autosave file.  Consider that a bonus.
#
#  NOTE:  The name of the autosave file IS configurable (see below)
#
#
#------------------------------------------------------------------------------
#
#  COMPATIBILITY:
#
#  Designed for use with RPGMaker XP and most RGSS1 based systems.  But PT 2
#  does contain rewrites, so take note.
#
#
#==============================================================================
#
#  TERMS OF USE:
#
#  Free for use, even in commercial games.  Only due credit is required.
#
#
#==============================================================================
module LvlAutoSave
  
  # The name of the autosave file (set here)
  FILE = "Autosave.rxdata"
end
#==============================================================================
# ** Game_Temp
#------------------------------------------------------------------------------
#  This class handles temporary data that is not included with save data.
#  Refer to "$game_temp" for the instance of this class.
#==============================================================================
class Game_Temp
  
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  alias level_autosave_game_temp_initialize initialize
  
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :level_gain_flag          # flag indicating level gain
  
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    #
    level_autosave_game_temp_initialize       # Perform the original method    
    @level_gain_flag = false                  # Default setting
    #
  end
end
#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
#  This class handles the actor. It's used within the Game_Actors class
#  ($game_actors) and refers to the Game_Party class ($game_party).
#==============================================================================
class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias level_autosave_game_actor_exp exp=
  #--------------------------------------------------------------------------
  # * Change EXP
  #     exp : new EXP
  #--------------------------------------------------------------------------
  def exp=(exp)
    #
    old_level = @level                        # Get level at exp change start
    level_autosave_game_actor_exp(exp)        # Performthe original method
    return if old_level == @level             # Exit unless level 'gain'
    $game_temp.level_gain_flag = true         # Set level gain flag
    #
  end
end
#==============================================================================
# ** Scene_Map
#------------------------------------------------------------------------------
#  This class performs map screen processing.
#==============================================================================
class Scene_Map
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias level_autosave_scene_map_update update
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    #
    level_autosave_scene_map_update           # Perform the original method  
    return unless update_timer?               # Exit unless set time passed
    return unless $game_temp.level_gain_flag  # Exit unless level gain
    $game_temp.level_gain_flag = false        # Clear level gain flag
    update_level_autosave                     # Perform autosave
    #
  end
  #--------------------------------------------------------------------------
  # * Frame Update (When timer frames have significantly changed)
  #--------------------------------------------------------------------------
  def update_timer?
    #
    return (Graphics.frame_count % 40 == 0)   # Return if time has changed
    #
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when tripping autosave)
  #--------------------------------------------------------------------------
  def update_level_autosave
    #
    filename  = LvlAutoSave::FILE             # Set filename from Config
    file      = File.open(filename, "wb")     # Create the file
    write_save_data(file)                     # Push game contents to file
    file.close                                # Close the file
    #
  end
  #--------------------------------------------------------------------------
  # * Write Save Data
  #     file : write file object (opened)
  #--------------------------------------------------------------------------
  def write_save_data(file)
    #
    #       (CONTENTS IS EXACTLY THAT WITHIN SCENE_SAVE'S METHOD)
    #       =====================================================
    #
    # Make character data for drawing save file
    characters = []
    for i in 0...$game_party.actors.size
      actor = $game_party.actors[i]
      characters.push([actor.character_name, actor.character_hue])
    end
    # Write character data for drawing save file
    Marshal.dump(characters, file)
    # Wrire frame count for measuring play time
    Marshal.dump(Graphics.frame_count, file)
    # Increase save count by 1
    $game_system.save_count += 1
    # Save magic number
    # (A random value will be written each time saving with editor)
    $game_system.magic_number = $data_system.magic_number
    # Write each type of game object
    Marshal.dump($game_system, file)
    Marshal.dump($game_switches, file)
    Marshal.dump($game_variables, file)
    Marshal.dump($game_self_switches, file)
    Marshal.dump($game_screen, file)
    Marshal.dump($game_actors, file)
    Marshal.dump($game_party, file)
    Marshal.dump($game_troop, file)
    Marshal.dump($game_map, file)
    Marshal.dump($game_player, file)
    #
  end
end
#==============================================================================
# ** Scene_Save
#------------------------------------------------------------------------------
#  This class performs save screen processing.
#==============================================================================
class Scene_Save < Scene_File
  
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    #
    # If C button was pressed
    #
    level_autosave_game_temp_initialize       # Perform the original method    
    if Input.trigger?(Input::C)               # If C button was pressed 
      if @file_index == 0                     # Play buzzer & exit on 1st save
        $game_system.se_play($data_system.buzzer_se)        
        return
      end
    end
    #
    super                                      # Perform the superclass method
    #
  end
endMenu code (choose only one) depending upon non-SDK usage or SDK usage
Both required code rewritten, even the SDK version
 PT 2: Non-SDK
  			Code:
#==============================================================================
# ** AUTOSAVE on LEVELING
#------------------------------------------------------------------------------
#    by DerVVulfman
#    version 1.0
#    06-06-2025 (mm/dd/yyyy)
#    RGSS / RPGMaker XP
#==============================================================================
#    PT 2 : Default Code Overwrites
#==============================================================================
#
#  This sample/functional code allows the autosave file to appear within the
#  save/load game file windows.  It increases the number of savefile windows
#  wile reducing them in height. Likewise, it includes content to permit the
#  cycling through of the extended number of savefile windows,  and material
#  to identify the autosave file itself.
#
#  This section required actual REWRITES of the default scripts. This is not
#  recommended, but a necessity in this instance.  All rewritten code within
#  this page has been marked. And code replaced/altered is commented out.
#
#
#==============================================================================
#==============================================================================
# ** Window_SaveFile
#------------------------------------------------------------------------------
#  This window displays save files on the save and load screens.
#==============================================================================
class Window_SaveFile < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     file_index : save file index (0-3)
  #     filename   : file name
  #--------------------------------------------------------------------------
  def initialize(file_index, filename)
    #
    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    # == Added file position value for altered superclass line ==
    file_pos = file_index + 1
    super(0, 64 + file_pos % 5 * 83, 640, 83)
    #super(0, 64 + file_index % 4 * 104, 640, 104)
    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    #
    self.contents = Bitmap.new(width - 32, height - 32)
    @file_index   = file_index
    @filename     = "Save#{@file_index + 1}.rxdata"
    #
    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    # == Added option for configured autosave filename if its file index ==
    @filename = LvlAutoSave::FILE if file_index == -1
    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    #
    @time_stamp   = Time.at(0)
    @file_exist   = FileTest.exist?(@filename)
    if @file_exist
      file            = File.open(@filename, "r")
      @time_stamp     = file.mtime
      @characters     = Marshal.load(file)
      @frame_count    = Marshal.load(file)
      @game_system    = Marshal.load(file)
      @game_switches  = Marshal.load(file)
      @game_variables = Marshal.load(file)
      @total_sec      = @frame_count / Graphics.frame_rate
      file.close
    end
    refresh
    @selected = false
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    # Draw file number
    self.contents.font.color = normal_color
    name = "File#{@file_index + 1}"
    #
    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    # == Added option for autosave filename if its file index ==
    name = LvlAutoSave::FILE if @file_index == -1
    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    #    
    self.contents.draw_text(4, 0, 600, 32, name)
    @name_width = contents.text_size(name).width
    # If save file exists
    if @file_exist
      # Draw character
      for i in 0...@characters.size
        bitmap = RPG::Cache.character(@characters[i][0], @characters[i][1])
        cw = bitmap.rect.width / 4
        ch = bitmap.rect.height / 4
        src_rect = Rect.new(0, 0, cw, ch)
        x = 300 - @characters.size * 32 + i * 64 - cw / 2
        #
        # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        # == EDIT: Characterset position to fit in window ==
        self.contents.blt(x, 58 - ch, bitmap, src_rect)
        #self.contents.blt(x, 68 - ch, bitmap, src_rect)
        # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        #
      end
      # Draw play time
      hour = @total_sec / 60 / 60
      min = @total_sec / 60 % 60
      sec = @total_sec % 60
      time_string = sprintf("%02d:%02d:%02d", hour, min, sec)
      self.contents.font.color = normal_color
      #
      # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      # == EDIT: Time string position to fit in window ==
      self.contents.draw_text(4, 0, 600, 32, time_string, 2)
      #self.contents.draw_text(4, 8, 600, 32, time_string, 2)
      # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      #
      # Draw timestamp
      self.contents.font.color = normal_color
      time_string = @time_stamp.strftime("%Y/%m/%d %H:%M")
      #
      # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      # == EDIT: Date string position to fit in window ==
      self.contents.draw_text(4, 26, 600, 32, time_string, 2)
      #self.contents.draw_text(4, 40, 600, 32, time_string, 2)
      # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      #
    end
  end
end
#==============================================================================
# ** Scene_Title
#------------------------------------------------------------------------------
#  This class performs title screen processing.
#==============================================================================
class Scene_Title
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # If battle test
    if $BTEST
      battle_test
      return
    end
    # Load database
    $data_actors        = load_data("Data/Actors.rxdata")
    $data_classes       = load_data("Data/Classes.rxdata")
    $data_skills        = load_data("Data/Skills.rxdata")
    $data_items         = load_data("Data/Items.rxdata")
    $data_weapons       = load_data("Data/Weapons.rxdata")
    $data_armors        = load_data("Data/Armors.rxdata")
    $data_enemies       = load_data("Data/Enemies.rxdata")
    $data_troops        = load_data("Data/Troops.rxdata")
    $data_states        = load_data("Data/States.rxdata")
    $data_animations    = load_data("Data/Animations.rxdata")
    $data_tilesets      = load_data("Data/Tilesets.rxdata")
    $data_common_events = load_data("Data/CommonEvents.rxdata")
    $data_system        = load_data("Data/System.rxdata")
    # Make system object
    $game_system = Game_System.new
    # Make title graphic
    @sprite = Sprite.new
    @sprite.bitmap = RPG::Cache.title($data_system.title_name)
    # Make command window
    s1 = "New Game"
    s2 = "Continue"
    s3 = "Shutdown"
    @command_window = Window_Command.new(192, [s1, s2, s3])
    @command_window.back_opacity = 160
    @command_window.x = 320 - @command_window.width / 2
    @command_window.y = 288
    # Continue enabled determinant
    # Check if at least one save file exists
    # If enabled, make @continue_enabled true; if disabled, make it false
    @continue_enabled = false
    for i in 0..3
      if FileTest.exist?("Save#{i+1}.rxdata")
        @continue_enabled = true
      end
    end
    #
    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    # == Defined autosave filename and updated continue enable flag test ==
    if FileTest.exist?(LvlAutoSave::FILE)     # Result of autosave file test
      @continue_enabled = true                # Set continue
    end
    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    #
    # If continue is enabled, move cursor to "Continue"
    # If disabled, display "Continue" text in gray
    if @continue_enabled
      @command_window.index = 1
    else
      @command_window.disable_item(1)
    end
    # Play title BGM
    $game_system.bgm_play($data_system.title_bgm)
    # Stop playing ME and BGS
    Audio.me_stop
    Audio.bgs_stop
    # 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 command window
    @command_window.dispose
    # Dispose of title graphic
    @sprite.bitmap.dispose
    @sprite.dispose
  end
end
#==============================================================================
# ** Scene_File
#------------------------------------------------------------------------------
#  This is a superclass for the save screen and load screen.
#==============================================================================
class Scene_File
  
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias level_autosave_scene_file_name make_filename
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Make help window
    @help_window = Window_Help.new
    @help_window.set_text(@help_text)
    # Make save file window
    @savefile_windows = []
    #
    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    # == EDIT:  Range now begins with -1 (for autosave file index) ==
    for i in -1..3
    #for i in 0..3
    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     #
      @savefile_windows.push(Window_SaveFile.new(i, make_filename(i)))
    end
    # Select last file to be operated
    @file_index = $game_temp.last_file_index
    @savefile_windows[@file_index].selected = true
    # 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
    @help_window.dispose
    for i in @savefile_windows
      i.dispose
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update windows
    @help_window.update
    for i in @savefile_windows
      i.update
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # Call method: on_decision (defined by the subclasses)
      #
      # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      # == EDIT:  File index must allow for (-1) if in 1st postion (autosave)
      on_decision(make_filename(@file_index-1))
      #on_decision(make_filename(@file_index))
      # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      #
      $game_temp.last_file_index = @file_index
      return
    end
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Call method: on_cancel (defined by the subclasses)
      on_cancel
      return
    end
    # If the down directional button was pressed
    if Input.repeat?(Input::DOWN)
      # If the down directional button pressed down is not a repeat,
      # or cursor position is more in front than 3
      #
      # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      # == EDIT:  Alteration accounts for 5 save file display ==
      if Input.trigger?(Input::DOWN) or @file_index < 4
      #if Input.trigger?(Input::DOWN) or @file_index < 3
      # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
       #
        # Play cursor SE
        $game_system.se_play($data_system.cursor_se)
        # Move cursor down
        @savefile_windows[@file_index].selected = false
        #
        # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        # == EDIT:  Alteration accounts for 5 save file display ==
        @file_index = (@file_index + 1) % 5
        #@file_index = (@file_index + 1) % 4
        # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        #
        @savefile_windows[@file_index].selected = true
        return
      end
    end
    # If the up directional button was pressed
    if Input.repeat?(Input::UP)
      # If the up directional button pressed down is not a repeat、
      # or cursor position is more in back than 0
      if Input.trigger?(Input::UP) or @file_index > 0
        # Play cursor SE
        $game_system.se_play($data_system.cursor_se)
        # Move cursor up
        @savefile_windows[@file_index].selected = false
        #
        # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        # == EDIT:  Alteration accounts for 5 save file display ==
        @file_index = (@file_index + 4) % 5
        #@file_index = (@file_index + 3) % 4
        # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        #
        @savefile_windows[@file_index].selected = true
        return
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Make File Name
  #     file_index : save file index (0-3)
  #--------------------------------------------------------------------------
  def make_filename(file_index)
    #
    return LvlAutoSave::FILE if file_index < 0 # Set autosave file if below 0
    return level_autosave_scene_file_name      # Perform the original method
    #
  end
end PT 2: SDK
  			Code:
#==============================================================================
# ** AUTOSAVE on LEVELING
#------------------------------------------------------------------------------
#    by DerVVulfman
#    version 1.0
#    06-06-2025 (mm/dd/yyyy)
#    RGSS / RPGMaker XP
#==============================================================================
#    PT 2 : SDK Code Overwrites
#==============================================================================
#
#  This sample/functional code allows the autosave file to appear within the
#  save/load game file windows.  It increases the number of savefile windows
#  wile reducing them in height. Likewise, it includes content to permit the
#  cycling through of the extended number of savefile windows,  and material
#  to identify the autosave file itself.
#
#  This section required actual REWRITES of code within the RMXP SDK as some
#  methods (such as Window_SaveFile>rewrite) were not separated into smaller
#  components. Yet, it is smaller code than that of the default script form.
#
#
#==============================================================================
#==============================================================================
# ** Window_SaveFile
#------------------------------------------------------------------------------
#  This window displays save files on the save and load screens.
#==============================================================================
class Window_SaveFile < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(file_index, filename)
    #
    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    @file_pos = file_index + 1
    super(0, 64 + file_pos % 5 * 83, 640, 83)
    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
    self.contents = Bitmap.new(width - 32, height - 32)
    init_filename(file_index, filename)
    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
    @filename = LvlAutoSave::FILE if file_index == -1    
    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
    init_filedata(file_index)
    init_gamedata if @file_exist
    refresh
    #
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    # Draw file number
    self.contents.font.color = normal_color
    name = "File#{@file_index + 1}"
    #
    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    # == Added option for autosave filename if its file index ==
    name = LvlAutoSave::FILE if @file_index == -1
    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    #    
    self.contents.draw_text(4, 0, 600, 32, name)
    @name_width = contents.text_size(name).width
    # If save file exists
    if @file_exist
      # Draw character
      for i in 0...@characters.size
        bitmap = RPG::Cache.character(@characters[i][0], @characters[i][1])
        cw = bitmap.rect.width / 4
        ch = bitmap.rect.height / 4
        src_rect = Rect.new(0, 0, cw, ch)
        x = 300 - @characters.size * 32 + i * 64 - cw / 2
        #
        # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        # == EDIT: Characterset position to fit in window ==
        self.contents.blt(x, 58 - ch, bitmap, src_rect)
        #self.contents.blt(x, 68 - ch, bitmap, src_rect)
        # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        #
      end
      # Draw play time
      hour = @total_sec / 60 / 60
      min = @total_sec / 60 % 60
      sec = @total_sec % 60
      time_string = sprintf("%02d:%02d:%02d", hour, min, sec)
      self.contents.font.color = normal_color
      #
      # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      # == EDIT: Time string position to fit in window ==
      self.contents.draw_text(4, 0, 600, 32, time_string, 2)
      #self.contents.draw_text(4, 8, 600, 32, time_string, 2)
      # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      #
      # Draw timestamp
      self.contents.font.color = normal_color
      time_string = @time_stamp.strftime("%Y/%m/%d %H:%M")
      #
      # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      # == EDIT: Date string position to fit in window ==
      self.contents.draw_text(4, 26, 600, 32, time_string, 2)
      #self.contents.draw_text(4, 40, 600, 32, time_string, 2)
      # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      #
    end
  end
end
#==============================================================================
# ** Scene_Title
#------------------------------------------------------------------------------
#  This class performs title screen processing.
#==============================================================================
class Scene_Title < SDK::Scene_Base
  
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias level_autosave_scene_title_mtc main_test_continue
  #--------------------------------------------------------------------------
  # * Main Test Initialization
  #--------------------------------------------------------------------------
  def main_test_continue
    #
    level_autosave_scene_title_mtc            # Perform the original method
    if FileTest.exist?(LvlAutoSave::FILE)     # Result of autosave file test
      @continue_enabled = true                # Set continue
    end
    #
  end
end
#==============================================================================
# ** Scene_File
#------------------------------------------------------------------------------
#  This is a superclass for the save screen and load screen.
#==============================================================================
class Scene_File < SDK::Scene_Base
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias level_autosave_scene_file_name make_filename
  #--------------------------------------------------------------------------
  # * Main Processing : Window Initialization
  #--------------------------------------------------------------------------
  def main_window
    super
    # Make help window
    @help_window = Window_Help.new
    @help_window.set_text(@help_text)
    # Make save file window
    @savefile_windows = []
    for i in -1..3
      @savefile_windows.push(Window_SaveFile.new(i, make_filename(i)))
    end
    @savefile_windows[@file_index].selected = true
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    # If C button was pressed
    if Input.trigger?(Input::C)
      # Call method: on_decision (defined by the subclasses)
      # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      # == EDIT:  File index must allow for (-1) if in 1st postion (autosave)
      on_decision(make_filename(@file_index-1))
      #on_decision(make_filename(@file_index))
      # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      #
      $game_temp.last_file_index = @file_index
      return
    end
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Call method: on_cancel (defined by the subclasses)
      on_cancel
      return
    end
    # If the down directional button was pressed
    if Input.repeat?(Input::DOWN)
      # If the down directional button pressed down is not a repeat,
      # or cursor position is more in front than 3
      #
      # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      # == EDIT:  Alteration accounts for 5 save file display ==
      if Input.trigger?(Input::DOWN) or @file_index < 4
      #if Input.trigger?(Input::DOWN) or @file_index < 3
      # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
       #
        # Play cursor SE
        $game_system.se_play($data_system.cursor_se)
        # Move cursor down
        @savefile_windows[@file_index].selected = false
        #
        # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        # == EDIT:  Alteration accounts for 5 save file display ==
        @file_index = (@file_index + 1) % 5
        #@file_index = (@file_index + 1) % 4
        # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        #
        @savefile_windows[@file_index].selected = true
        return
      end
    end
    # If the up directional button was pressed
    if Input.repeat?(Input::UP)
      # If the up directional button pressed down is not a repeat?
      # or cursor position is more in back than 0
      if Input.trigger?(Input::UP) or @file_index > 0
        # Play cursor SE
        $game_system.se_play($data_system.cursor_se)
        # Move cursor up
        @savefile_windows[@file_index].selected = false
        #
        # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        # == EDIT:  Alteration accounts for 5 save file display ==
        @file_index = (@file_index + 4) % 5
        #@file_index = (@file_index + 3) % 4
        # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        #
        @savefile_windows[@file_index].selected = true
        return
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Make File Name
  #     file_index : save file index (0-3)
  #--------------------------------------------------------------------------
  def make_filename(file_index)
    #
    return LvlAutoSave::FILE if file_index < 0 # Set autosave file if below 0
    return level_autosave_scene_file_name      # Perform the original method
    #
  end
endInstructions
Paste below Scene_Debug and above Main. Must use Pt1, and then ONE version of Pt2. There is only one configurable, and that is to set the name of the Autosave file... big whoop.
Compatibility
Designed for use with RPGMaker XP and most RGSS1 based systems. But PT 2 does contain rewrites, so take note.
Terms and Conditions
Free for use, even in commercial games. Only due credit is required.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
	  Above are clickable links

 
 
 Autosave on Leveling
 Autosave on Leveling
 
 
![[Image: QrnbKlx.jpg]](https://i.imgur.com/QrnbKlx.jpg)
![[Image: sGz1ErF.png]](https://i.imgur.com/sGz1ErF.png)
![[Image: liM4ikn.png]](https://i.imgur.com/liM4ikn.png)
![[Image: fdzKgZA.png]](https://i.imgur.com/fdzKgZA.png)
![[Image: sj0H81z.png]](https://i.imgur.com/sj0H81z.png)
![[Image: QL7oRau.png]](https://i.imgur.com/QL7oRau.png)
![[Image: uSqjY09.png]](https://i.imgur.com/uSqjY09.png)
![[Image: GAA3qE9.png]](https://i.imgur.com/GAA3qE9.png)
![[Image: 2Hmnx1G.png]](https://i.imgur.com/2Hmnx1G.png)
![[Image: BwtNdKw.png%5B]](https://i.imgur.com/BwtNdKw.png%5B)