Unlimited save slots

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Looking for a script that simply takes the default Scene_File and Window_SaveFile and changes it so that you can specify how many slots you want, and it will scroll properly.

I looked at Scene_File but unlike Ace they hardcode the number of windows. I'm not really sure how to best "scroll" the windows.
 
Last edited by a moderator:

Nightgazer Starlight

Cute Lil' Pegasus
Member
Joined
Mar 19, 2012
Messages
11
Reaction score
0
First Language
English
Primarily Uses
RMVXA
Looking for a script that simply takes the default Scene_File and Window_SaveFile and changes it so that you can specify how many slots you want, and it will scroll properly.

I looked at Scene_File but unlike Ace they hardcode the number of windows. I'm not really sure how to best "scroll" the windows.
Here.

It's a script by ERZENGEL.



Code:
#==============================================================================
# ** More savefiles 1.10 (http://erzvx.de.ms/scripts/moresavefiles.txt)
#------------------------------------------------------------------------------
# written by ERZENGEL
#==============================================================================
module ERZSAVE
# Max amount of savefiles
MAXSAVEFILES = 64
# Max amount the player is able to save (-1 = infinite)
MAXSAVEAMOUNT = -1
end
#==============================================================================
# ** 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 to the value of MAXSAVEFILES)
#	 filename : filename
#--------------------------------------------------------------------------
def initialize(file_index, filename)
super(0, 56 + file_index % ERZSAVE::MAXSAVEFILES * 90, 544, 90)
@file_index = file_index
@filename = filename
load_gamedata
refresh
@selected = false
end
end
#==============================================================================
# ** Scene_File
#------------------------------------------------------------------------------
# This class performs the save and load screen processing.
#==============================================================================
class Scene_File
#--------------------------------------------------------------------------
# * Start processing
#--------------------------------------------------------------------------
def start
super
@file_max = ERZSAVE::MAXSAVEFILES
create_menu_background
@help_window = Window_Help.new
create_savefile_windows
if @saving
	 @index = $game_temp.last_file_index
	 @help_window.set_text(Vocab::SaveMessage)
else
	 @index = self.latest_file_index
	 @help_window.set_text(Vocab::LoadMessage)
end
@savefile_windows[@index].selected = true
@page_file_max = ((416 - @help_window.height) / 90).truncate
for i in 0...@file_max
	 window = @savefile_windows[i]
	 if @index > @page_file_max - 1
	 if @index < @file_max - @page_file_max - 1
		 @top_row = @index
		 window.y -= @index * window.height
	 elsif @index >= @file_max - @page_file_max
		 @top_row = @file_max - @page_file_max
		 window.y -= (@file_max - @page_file_max) * window.height
	 else
		 @top_row = @index
		 window.y -= @index * window.height
	 end
	 end
	 window.visible = (window.y >= @help_window.height and
	 window.y < @help_window.height + @page_file_max * window.height)
end
end
#--------------------------------------------------------------------------
# * Create Save File Window
#--------------------------------------------------------------------------
def create_savefile_windows
@top_row = 0
@savefile_windows = []
for i in 0...@file_max
	 @savefile_windows.push(Window_SaveFile.new(i, make_filename(i)))
end
end
#--------------------------------------------------------------------------
# * Move cursor down
#	 wrap : Wraparound allowed
#--------------------------------------------------------------------------
def cursor_down(wrap)
if @index < @file_max - 1 or wrap
	 @index = (@index + 1) % @file_max
	 for i in 0...@file_max
	 window = @savefile_windows[i]
	 if @index == 0
		 @top_row = 0
		 window.y = @help_window.height + i % @file_max * window.height
	 elsif @index - @top_row > @page_file_max - 1
		 window.y -= window.height
	 end
	 window.visible = (window.y >= @help_window.height and
		 window.y < @help_window.height + @page_file_max * window.height)
	 end
	 if @index - @top_row > @page_file_max - 1
	 @top_row += 1
	 end
end
end
#--------------------------------------------------------------------------
# * Move cursor up
#	 wrap : Wraparound allowed
#--------------------------------------------------------------------------
def cursor_up(wrap)
if @index > 0 or wrap
	 @index = (@index - 1 + @file_max) % @file_max
	 for i in 0...@file_max
	 window = @savefile_windows[i]
	 if @index == @file_max - 1
		 @top_row = @file_max - @page_file_max
		 window.y = @help_window.height + i % @file_max * window.height
		 window.y -= (@file_max - @page_file_max) * window.height
	 elsif @index - @top_row < 0
		 window.y += window.height
	 end
	 window.visible = (window.y >= @help_window.height and
		 window.y < @help_window.height + @page_file_max * window.height)
	 end
	 if @index - @top_row < 0
	 @top_row -= 1
	 end
end
end
end
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# This class performs the menu screen processing.
#==============================================================================
class Scene_Menu
#--------------------------------------------------------------------------
# * Start processing
#--------------------------------------------------------------------------
alias erz_saveslots_start start
def start
if $game_system.save_count >= ERZSAVE::MAXSAVEAMOUNT and ERZSAVE::MAXSAVEAMOUNT >= 0
	 $game_system.save_disabled = true
end
erz_saveslots_start
end
end
It's currently set to 64 saves now.

Hope you have good luck with that. ^_^
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Works nicely. Thanks. It looks like it just shifts the window positions, which makes sense. I wasn't sure how to do it properly for all windows.
 
Last edited by a moderator:

Nightgazer Starlight

Cute Lil' Pegasus
Member
Joined
Mar 19, 2012
Messages
11
Reaction score
0
First Language
English
Primarily Uses
RMVXA
Works nicely. Thanks. It looks like it just shifts the window positions, which makes sense. I wasn't sure how to do it properly for all windows.
You're welcome now. ^_^

Glad I could be of help here. ^_^

I hope that you enjoy the extra save slots available. ^_^
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,049
Members
137,570
Latest member
fgfhdfg
Top