[CloudTheWolf] DoctorTodd's Auto Save Addon: Enhanced Auto-Save

This script is an Addon for DoctorTodd's Autosave.

It improves on DoctorTodd's Autosave by making it use the last slot and not updating the Save index. If using MOG - Monogatari, this also hides the auto-save slot from the Save screen.

Compatibility with other systems may differ.

Script: https://cloudthewolf.com/view-file/-vx-ace-doctortodd-s-auto-save-addon

Or just copy from below:

Ruby:
#
# CloudTheWolf: DoctorTodd's Auto Save Addon - Enhanced Auto-Save
# Author: CloudTheWolf
# Date (19/06/2023)
# Version: (1.0.0) (VXA)
# Level: N/A
#
# Website: https://cloudthewolf.com/
#
#===============================================================================
#
# Description: Improves on DoctorTodd's Autosave by making it use the last slot
#              and not updating the Save index.
#
# Credits: Me (CloudTheWolf), DoctorTodd
#
#===============================================================================
#
# Instructions
# Paste above Below both DT's Autosave and Khas Ultra Lighting
#
#     
#===============================================================================
#
# Free for any use as long as I'm credited, and you legitimately obtained Khas Ultra Lighting.
#
#===============================================================================

module DataManager

  #--------------------------------------------------------------------------
  # * Execute Save (No Exception Processing)
  #-------------------------------------------------------------------------- 
  def self.save_game_without_rescue(index, auto = false)
    File.open(make_filename(index), "wb") do |file|
      $game_system.on_before_save
      Marshal.dump(make_save_header, file)
      Marshal.dump(make_save_contents, file)
    end
    if !auto then
        @last_savefile_index = index
    end
    return true
  end
 
  #--------------------------------------------------------------------------
  # * Execute Load (No Exception Processing)
  #--------------------------------------------------------------------------
  def self.load_game_without_rescue(index)
    File.open(make_filename(index), "rb") do |file|
      Marshal.load(file)
      extract_save_contents(Marshal.load(file))
      reload_map_if_updated
      
      @last_savefile_index = index == ToddAutoSaveAce::MAXFILES - 1 ?  0 : index
    end
    return true
  end
 
end

module Autosave
  #--------------------------------------------------------------------------
  # Use last save slot as "Auto Save" and don't update save index
  #--------------------------------------------------------------------------
  def self.call
    DataManager.save_game_without_rescue(ToddAutoSaveAce::MAXFILES - 1,true)
  end
end

#==============================================================================
# ■ Scene_File
#==============================================================================
class Scene_File
 
  #--------------------------------------------------------------------------
  # ● Fix For MOG Monogatari
  #--------------------------------------------------------------------------
  def create_sprites
    return if !$imported[:mog_monogatari]
    @saving = $game_temp.scene_save
    @file_max = @saving ? FILES_MAX - 1 : FILES_MAX
    @file_max = 1 if FILES_MAX < 1
    create_background
    create_layout
    create_savefile_windows
    create_particles
    @index = DataManager.last_savefile_index
    @check_prev_index = true
    @savefile_windows[0].selected = true     
  end
end

Note

If using with my Khas Ultra Lighting Compatibility Script for DoctorTodd's Auto-Save, please create a new script below them both with the following to re-enable compatibility:

Ruby:
module Autosave
  def self.call
    SceneManager.kul_dispose
    DataManager.save_game_without_rescue(ToddAutoSaveAce::MAXFILES - 1,true)
    SceneManager.kul_restore
  end
end
Did you ever consider that the game dev or the player might not like the idea of autosaving their progress in the last or more recent save file? Especially if they made a terrible mistake. :S
Did you ever consider that the game dev or the player might not like the idea of autosaving their progress in the last or more recent save file? Especially if they made a terrible mistake. :S
Yes... yes I did (this is actually why I made this xD)

By last I mean the very last save slot (In my case slot 10)
I go a step further for those who use MOG Monogatari (I tried getting other scripts to work with it as well but wasn't happy with the results) and actually hide the last slot from the save screen so that players don't accidently save over the auto save.

The reason I made this was because I saw play testers just button mash through the save screen, not realizing it was the Auto-Save slot and then if they realise they missed something not being able to go back to their manual save (As Auto-Save overwrote it)

The default behaviour of DT's Autosave, will update the save index when auto-saving, allowing players to accidently save to the auto-save slot, so this is a QOL tweak using what I see in modern games where auto-save is not a slot to save in, only load from.
Well, the easiest way to do it is to use a totally different filename to make sure it won't be overwritten. Just some food for thought.
Well, the easiest way to do it is to use a totally different filename to make sure it won't be overwritten. Just some food for thought.

True, but that felt like too much work at the time. Maybe I'll come back to that idea at some point though (Still kinda new to RGSS3 from a scripting perspective) 🙂

Original thread: https://forums.rpgmakerweb.com/threads/cloudthewolf-doctortodds-auto-save-addon-enhanced-auto-save.158478/