# Adjust Max Savefiles for RMVX v1.0 # RPG 만들기 VX에서 세이브 파일 개수를 조정할 수 있습니다. # # 만든이: 家和萬事成 # http://parkjuwan.tistory.com # # 기본 스크립트를 약간 수정하였습니다. class Scene_File < Scene_Base #최대 세이브 파일 개수 MAX_SAVE_FILES = 16 #default: 4 #[주의!] 최대 세이브 파일 개수는 반드시 4의 배수로 설정해 주세요. #4의 배수가 아닐 경우 오류가 발생합니다. #-------------------------------------------------------------------------- # Start processing #-------------------------------------------------------------------------- def start super 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 j = MAX_SAVE_FILES - 1 for i in 0..j if (@index / 4).floor != (i / 4).floor @savefile_windows[i].visible = false end end end #-------------------------------------------------------------------------- # Create Save File Window #-------------------------------------------------------------------------- def create_savefile_windows @savefile_windows = [] j = MAX_SAVE_FILES - 1 for i in 0..j @savefile_windows.push(Window_SaveFile.new(i, make_filename(i))) end @item_max = MAX_SAVE_FILES end #-------------------------------------------------------------------------- # Update Save File Window #-------------------------------------------------------------------------- def update_savefile_selection if Input.trigger?(Input::C) determine_savefile elsif Input.trigger?(Input::B) Sound.play_cancel return_scene else last_index = @index if Input.repeat?(Input::DOWN) cursor_down(Input.trigger?(Input::DOWN)) end if Input.repeat?(Input::UP) cursor_up(Input.trigger?(Input::UP)) end if Input.repeat?(Input::R) cursor_down(Input.trigger?(Input::DOWN)) cursor_down(Input.trigger?(Input::DOWN)) cursor_down(Input.trigger?(Input::DOWN)) cursor_down(Input.trigger?(Input::DOWN)) end if Input.repeat?(Input::L) cursor_up(Input.trigger?(Input::UP)) cursor_up(Input.trigger?(Input::UP)) cursor_up(Input.trigger?(Input::UP)) cursor_up(Input.trigger?(Input::UP)) end if @index != last_index Sound.play_cursor @savefile_windows[last_index].selected = false @savefile_windows[@index].selected = true if (@index / 4).floor != (last_index / 4).floor ii = (@index / 4).floor * 4 jj = (last_index / 4).floor * 4 for i in 0..3 @savefile_windows[ii+i].visible = true @savefile_windows[jj+i].visible = false end end end end end #-------------------------------------------------------------------------- # Create Filename # file_index : save file index (0-15) #-------------------------------------------------------------------------- def make_filename(file_index) return "Save" + sprintf("%02d", file_index + 1) + ".rvdata" end end