RPG Maker Forums

Save File Output Control v.1.1

by Metatron


Introduction

This is a little script that allows you to change several settings related to your save files. It's my first real script!

Features

- Change the filename of your save files.

- Change the maximum number of save files available to your player.

- Gives you the ability to have more save files in Test Mode.

- Removes redundant numbers if you only allow for one save file.

- Allows easy edits to the save prompts.

Screenshots



How to Use

Just paste it in the Materials section above main and edit the module to your liking. Be warned that if you set SaveNum or TestNum too high, it will take a long time to create the save file window and may possibly crash your RGSS player. Also be warned that if you only have one file available to your player but more available in test mode, a save from test mode will not be read when $TEST is not on and vice-versa. I will fix this shortly.

Demo

Not nessecary.

Script

Code:
#===============================================================================
# RGSS3: Save File Output Control v.1.1
#===============================================================================
# by Cryranos
#===============================================================================
# Instructions:  Paste In the Materials section.  Edit Module as desired.
#===============================================================================
# Compatability:  Completely rewrites DataManager#self.save_file_exists?,
# self.savefile_max, self.make_filename(index), dself.load_game(index), and
# Window_SaveFile#refresh. Aliases Scene_File < Scene_MenuBase#visible_max.
#===============================================================================

module CrySave
  SaveNum = 16		# Absolute maximum number of save files. Default: 16
  SaveNom = "Save"	# First part of savefile name. Default: "Save"
  SaveExt = ".rvdata2"# Extension of the savefile name. Default: ".rvdata2"
  SaveVis = 4		 # Number of savefiles visible on one screen. Default: 4
  TestNum = 99		# Maximum number of save files available in test mode.
  # If this number is too high, it will take a long time to load Window_SaveFile.
end

module Vocab
  SaveMessage	 = "Save to which file?"
  LoadMessage	 = "Load from which file?"
  File			= "Save"
end

class Save_File_Control_Output_Control
  def DataManager.save_file_exists?
	if CrySave::SaveNum == 1
	  !Dir.glob(CrySave::SaveNom + CrySave::SaveExt).empty?
	elsif $TEST
	  !Dir.glob(CrySave::SaveNom + '*' + CrySave::SaveExt).empty?
	else
	  !Dir.glob(CrySave::SaveNom + '*' + CrySave::SaveExt).empty?
	end
  end

  def DataManager.savefile_max
	if $TEST
	  return CrySave::TestNum
	else
	  return CrySave::SaveNum
	end
  end

  def DataManager.make_filename(index)
	if CrySave::SaveNum == 1
	  sprintf(CrySave::SaveNom + CrySave::SaveExt, index + 1)
	elsif $TEST
	  sprintf(CrySave::SaveNom + "%02d" + CrySave::SaveExt, index + 1)	  
	else
	  sprintf(CrySave::SaveNom + "%02d" + CrySave::SaveExt, index + 1)
	end
  end

  def DataManager.load_game(index)
	load_game_without_rescue(index) rescue false
  end
end

class Window_SaveFile
  def refresh
	contents.clear
	change_color(normal_color)
	if $TEST
	  name = Vocab::File + " #{@file_index + 1}"
	elsif CrySave::SaveNum == 1
	  name = Vocab::File
	else
	  name = Vocab::File + " #{@file_index + 1}"
	end
	draw_text(4, 0, 200, line_height, name)
	@name_width = text_size(name).width
	draw_party_characters(152, 58)
	draw_playtime(0, contents.height - line_height, contents.width - 4, 2)
  end
end

class Scene_File < Scene_MenuBase
  alias visible_max_new visible_max
  def visible_max
	visible_max_new
	return CrySave::SaveVis
  end
end
FAQ

None so far.

Credit and Thanks

- Cryranos/Metatron, author

- CaptainJet and Fomar0153

Latest Threads

Latest Posts

Latest Profile Posts

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.
time for a new avatar :)

Forum statistics

Threads
106,017
Messages
1,018,354
Members
137,801
Latest member
topsan
Top