Automatic save-slot selection
#1
Zelda style automatic save-slot selection
by Jimmie
May 1 2009

This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given. If you are the owner of the thread, please contact administration.


Description
This script makes the game automatically choose a save-slot for the player when saving. Upon starting a new game (or loading an old one), the player selects a slot to save to (or load from, naturally). Every future time the save scene is accessed it will automatically choose that one and save. I'm not providing any screenshots since this does not modify the interface in any way, nor any demo because it works out of the box.

Installation
Copy/paste this into a new script slot. That's it.
Code:
** Zelda style automatic save-slot selection
# * Version 1 by Nitt @ May 1st 2009
# * Requested by takneo
# ** Please keep this header intact when copying

class Scene_Save
  
  # Perform auto-save if possible
  def main
    if $save_slot != nil
      auto_decision($save_slot)
    else
      super
    end
  end
  
  # This does virtually the same thing as #on_decision
  # but is better suited to the automatic saving.
  def auto_decision(filename)
    file = File.open(filename, "wb")
    write_save_data(file)
    file.close
    if $game_temp.save_calling
      $game_temp.save_calling = false
      $scene = Scene_Map.new
      return
    end
    $scene = Scene_Menu.new(4)
  end
  
  # Makes the game remember which slot was saved to
  alias nitt_zs_on_decision on_decision
  def on_decision(filename)
    $save_slot = filename
    nitt_zs_on_decision(filename)
  end
end

class Scene_Load  
  # Makes the game remember which slot was loaded
  alias nitt_zs_on_decision on_decision
  def on_decision(filename)
    $save_slot = filename
    nitt_zs_on_decision(filename)
  end
end

class Scene_Title
  # If the game goes to title screen it would normally remember the
  # save slot, which could be bad. This removes that behavior.
  alias nitt_zs_main main
  def main
    $save_slot = nil
    nitt_zs_main
  end
  
  # Makes the game go directly to choosing a save slot instead of
  # the first map when a new game is started.
  alias nitt_zs_command_new_game command_new_game
  def command_new_game
    nitt_zs_command_new_game
    $scene = Scene_Save.new
  end
end


Known issues
Usability
The script has one major fault, and it is a usability one. Your menu will only make the normal "decision" sound when selecting save from the menu, rather than the "save" sound. Since there are so many custom menu systems out there, I have not bothered to fix this, even for the default. If you need help changing this for a particular system, post here to let me know and I'll hopefully respond with a solution rather promptly. Just make sure to provide a link to the script in case it's not the default.
You could probably also persuade me into making something more advanced such as a confirmation box or similar.

Good luck! And as always, let me know of any problems or awesome ideas you're having.

//Nitt
}


Possibly Related Threads…
Thread Author Replies Views Last Post
  Zelda Style Save winter-chaos 0 2,682 03-21-2009, 01:00 PM
Last Post: winter-chaos
  Personal Save Files XP polraudio 0 2,643 11-05-2008, 01:00 PM
Last Post: polraudio
  Personal Save Files polraudio 0 2,501 07-08-2008, 01:00 PM
Last Post: polraudio
  Many Many Save Files!! stupidstormy36 0 2,578 04-10-2008, 01:00 PM
Last Post: stupidstormy36
  More Save Slots HonorBlade 0 2,672 07-29-2005, 01:00 PM
Last Post: HonorBlade



Users browsing this thread: 1 Guest(s)