XPセーブ数増加

ツクール2000のように、15個のセーブファイルを実現するスクリプトです。
画面上に3個表示し、画面スクロールで計15個のセーブファイルを扱えるようになります。
 ※セーブ関連に何も手を加えていないことを前提とします。



■ Scene_Title 48行目
for i in 0..3

for i in 0..14
に書き換え
----------------------------------------------------------------
■ Window_SaveFile 19行目
super(0, 64 + file_index % 4 * 104, 640, 104)

super(0, 64 + file_index % 15 * 138, 640, 138)
に書き換え
----------------------------------------------------------------
■ Scene_Load 17行目
for i in 0..3

for i in 0..14
に書き換え


上記全てが完了したら、以下のスクリプトを■ Scene_File に丸ごとコピーして下さい。
これだけで使えるようになります。
※一応元のバックアップは取っておいて下さい。



#==============================================================================
# ■ Scene_File
#------------------------------------------------------------------------------
#  セーブ画面およびロード画面のスーパークラスです。
#  2000式15個表示に対応しています。
#==============================================================================

class Scene_File
#--------------------------------------------------------------------------
# ● オブジェクト初期化
# help_text : ヘルプウィンドウに表示する文字列
#--------------------------------------------------------------------------
def initialize(help_text)
@help_text = help_text
@index_y = 0
end
#--------------------------------------------------------------------------
# ● メイン処理
#--------------------------------------------------------------------------
def main
# ヘルプウィンドウを作成
@help_window = Window_Help.new
@help_window.set_text(@help_text)
# セーブファイルウィンドウを作成
@savefile_windows = []
for i in 0..14
@savefile_windows.push(Window_SaveFile.new(i, make_filename(i)))
@savefile_windows[i].visible = false
end
# 最後に操作したファイルを選択
@file_index = $game_temp.last_file_index
@savefile_windows[@file_index].selected = true
i = 0
if @file_index <= 12
while i <= 2
@savefile_windows[@file_index + i].y = 138 * i + 64
@savefile_windows[@file_index + i].visible = true
i += 1
@index_y = 0
end
else
while i <= 2
@savefile_windows[@file_index - 2 + i].y = 138 * i + 64
@savefile_windows[@file_index - 2 + i].visible = true
i += 1
@index_y = 2
end
end
# トランジション実行
Graphics.transition
# メインループ
loop do
# ゲーム画面を更新
Graphics.update
# 入力情報を更新
Input.update
# フレーム更新
update
# 画面が切り替わったらループを中断
if $scene != self
break
end
end
# トランジション準備
Graphics.freeze
# ウィンドウを解放
@help_window.dispose
for i in @savefile_windows
i.dispose
end
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
# ウィンドウを更新
@help_window.update
for i in @savefile_windows
i.update
end
# C ボタンが押された場合
if Input.trigger?(Input::C)
# メソッド on_decision (継承先で定義) を呼ぶ
on_decision(make_filename(@file_index))
$game_temp.last_file_index = @file_index
return
end
# B ボタンが押された場合
if Input.trigger?(Input::B)
# メソッド on_cancel (継承先で定義) を呼ぶ
on_cancel
return
end
# 方向ボタンの下が押された場合
if Input.repeat?(Input::DOWN)
# 方向ボタンの下の押下状態がリピートでない場合か、
# またはカーソル位置が 14 より前の場合
if Input.trigger?(Input::DOWN) or @file_index < 14
# カーソル SE を演奏
$game_system.se_play($data_system.cursor_se)
# カーソルを下に移動
@savefile_windows[@file_index].selected = false
@file_index = (@file_index + 1) % 15
@savefile_windows[@file_index].selected = true
@index_y += 1
# ウィンドウ移動
self.move_window
return
end
end
# 方向ボタンの上が押された場合
if Input.repeat?(Input::UP)
# 方向ボタンの上の押下状態がリピートでない場合か、
# またはカーソル位置が 0 より後ろの場合
if Input.trigger?(Input::UP) or @file_index > 0
# カーソル SE を演奏
$game_system.se_play($data_system.cursor_se)
# カーソルを上に移動
@savefile_windows[@file_index].selected = false
@file_index = (@file_index + 14) % 15
@savefile_windows[@file_index].selected = true
@index_y -= 1
# ウィンドウ移動
self.move_window
return
end
end
end
#--------------------------------------------------------------------------
# ● ファイル名の作成
# file_index : セーブファイルのインデックス (0〜14)
#--------------------------------------------------------------------------
def make_filename(file_index)
return "Save#{file_index + 1}.rxdata"
end
#--------------------------------------------------------------------------
# ● セーブウィンドウの移動
#--------------------------------------------------------------------------
def move_window
if @index_y >= 0 && @index_y <= 2
return
end
for i in 0..14
@savefile_windows[i].visible = false
end
i = 0
if @index_y == 3
if @file_index == 0
while i <= 2
@savefile_windows[@file_index + i].y = 138 * i + 64
@savefile_windows[@file_index + i].visible = true
i += 1
end
@index_y = 0
else
while i <= 2
@savefile_windows[@file_index - 2 + i].y = 138 * i + 64
@savefile_windows[@file_index - 2 + i].visible = true
i += 1
end
@index_y = 2
end
elsif @index_y == -1
if @file_index == 14
while i <= 2
@savefile_windows[@file_index - 2 + i].y = 138 * i + 64
@savefile_windows[@file_index - 2 + i].visible = true
i += 1
end
@index_y = 2
else
while i <= 2
@savefile_windows[@file_index + i].y = 138 * i + 64
@savefile_windows[@file_index + i].visible = true
i += 1
end
@index_y = 0
end
end
end
end



これで、ちゃんと動くはずです。