Save File Output Control

Cryranos

Veteran
Veteran
Joined
Jun 24, 2012
Messages
64
Reaction score
32
First Language
English
Primarily Uses
RMMV
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
 
Last edited by a moderator:

ShadowFox

Adventurer
Member
Joined
Mar 13, 2012
Messages
255
Reaction score
10
First Language
English
Primarily Uses
I like this script but I am not a scripter and am wondering how I could do this with your script, if it is possible at all.

I want the character's busts to show as well as their names, and the map name.

And I am hoping that the name of the saved game within the save and load scene to be placed in the center of the screen

The physical save file to be saved within a specific folder within the default directory?

Are those few things possible with your script, as it is almost perfect for what I want.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,004
First Language
Tagalog
Primarily Uses
RMVXA
you can add the path to the file name...

something like: \Saves\Save

will make it save into a Saves folder inside your game folder
 

ShadowFox

Adventurer
Member
Joined
Mar 13, 2012
Messages
255
Reaction score
10
First Language
English
Primarily Uses
Ok. I'll try that then. But what about the name of the player character and the and the character's bust and the location or map name?

Is that possible to do with this script?

I'd experiment but I'm no scripter.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,004
First Language
Tagalog
Primarily Uses
RMVXA
Well, actually, Yanfly's script shows more info, though it uses sprite instead of bust...
 

ShadowFox

Adventurer
Member
Joined
Mar 13, 2012
Messages
255
Reaction score
10
First Language
English
Primarily Uses
After just looking at Yanfly's script I see that it does show some of what I wanted, but that script shows more info then what I want and it also does not allow custom save names and save extensions that this script allows. I could have the game save looking like this "Game.sav" or even "Shadow.Fox" or whatever.

And I tested out the "\Saves\Save" But it didn't work.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,004
First Language
Tagalog
Primarily Uses
RMVXA
what happened? it saved as Saves\Save?
 

ShadowFox

Adventurer
Member
Joined
Mar 13, 2012
Messages
255
Reaction score
10
First Language
English
Primarily Uses
Yup. It saved as savesgame.sav

I had this in the script:

  SaveNom = "\Save\Game"    # First part of savefile name. Default: "Save"
  SaveExt = ".sav"# Extension of the savefile name. Default: ".rvdata2"

And unfortunately like I said the save file was "SaveGame.sav" and it was in the default folder
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,851
First Language
English
You either need to write it as

Code:
Save/Game
or

Code:
Save\\Game
Unfortunately the script doesn't support custom folders, but I believe this is a bug.
 
Last edited by a moderator:

ShadowFox

Adventurer
Member
Joined
Mar 13, 2012
Messages
255
Reaction score
10
First Language
English
Primarily Uses
I got it to work with the first one "Save/Game". Though the music playing is the main menu music and not the map music. But it is working.

The second one "Save\\Game" seems to only create a temporary file that is removed when the game is shut down.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,851
First Language
English
Sorry, to be specific, it doesn't work if you don't already have a folder called "Save", or whichever folders you want to put it in. The save folder needs to be created before the files can be created
 
Last edited by a moderator:

Cryranos

Veteran
Veteran
Joined
Jun 24, 2012
Messages
64
Reaction score
32
First Language
English
Primarily Uses
RMMV
I'm sooooooooooooo sorry for the late response, but I've been kind of AWOL lately.

Due to my limited scripting ability, I don't know how to force the script to create the folders necessary (as I usually use the System folder), but it should work if you create the folder yourself.

I'm also a noob when it comes to anything window-related, so I'm not sure how to do the other things ShadowFox wants. >.<  If you still have a need, I could try looking into it, but I'm quite strapped for time so I can't make any promises.

Again, I'm sorry for the late (and kind of redundant) response.
 

Latest Threads

Latest Posts

Latest Profile Posts

Holy cow... work is demanding and I'm back in college. I'm kind of scared of my dad right now after the incident, but at least I don't live with him all the time. Anyway, working on Fandom Scouts and my FNAF character set. The FNAF sprites are actually going to be used in the game... unfortunately the enemy sprites are FNAF World traces, so no sharing those.
The honeymoon period is over with Cyberpunk 2077, It sadly doesnt live up to the hype, pretty graphics arent everything (especially when I cant even do something as simple as changing the radio station over!). Replaying Breath of the wild has reminded me what a good game really looks like, plus that one has good glitches!....
Ami


Maybe...a Drinkable Water Plant or something?

Forum statistics

Threads
107,682
Messages
1,031,418
Members
139,802
Latest member
Harmit
Top