################################################################################ #↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓# #↓ ↓# #↓ Chapter Style Title Menu: Version 0.1 ↓# #↓ ↓# #↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕↕# #↑ ↑# #↑ Written By: Joe Pro ↑# #↑ Last Edited: January 25, 2016 ↑# #↑ ↑# #↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑# ################################################################################ #◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙# #◙ ** Disclaimer ◙# #◙••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••◙# #◙ ◙# #◙ This script is not for commercial, if you wish to use this script in a ◙# #◙ game please PM me. All credit is to be given to me as the author of this ◙# #◙ script. ◙# #◙ ◙# #◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙# #◙ ** How To Use ◙# #◙••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••◙# #◙ ◙# #◙ * Customizable area below. ◙# #◙ ◙# #◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙# #◙ ** Updates / Version Notes ◙# #◙••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••◙# #◙ ◙# #◙ v0.1 ◙# #◙ ~◄◙◙◙◙►~ ◙# #◙ * This script sets up a chapter style main menu each with independent save ◙# #◙ files. it requires my Pro Presistant Data script to work. Also I edited ◙# #◙ the in-game menu's save command to save according to the chapter the player◙# #◙ is currently playing. ◙# #◙ ◙# #◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙# ################################################################################ #↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓# #↓ ↓# #↕ Chapter Style Title Menu: Version 0.1 ↕# #↑ ↑# #↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑# ################################################################################ #============================================================================== # ** Customization: Chapter Style Title #------------------------------------------------------------------------------ # This module manages the customizable and function modules. #============================================================================== module Customization_ChapterStyleTitle #◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙# #◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙# #◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙Customizeable Area◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙# #◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙# #◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙# #============================================================================= # * Currency Info #============================================================================= Chapter_vocab = "Chapter" Locked_Chapters_Visable = true #◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙# #◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙# #◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙End Customizeable Area◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙# #◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙# #◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙◙# end #============================================================================== # ** DataManager #------------------------------------------------------------------------------ # This module manages the database and game objects. Almost all of the # global variables used by the game are initialized by this module. #============================================================================== module DataManager #-------------------------------------------------------------------------- # * Determine Existence of Save File #-------------------------------------------------------------------------- def self.save_file_by_index_exists?(index) file_name = sprintf("Save%02d.rvdata2", index + 1) !Dir.glob(file_name).empty? end end #============================================================================== # ** Scene_Title #------------------------------------------------------------------------------ # This class performs the title screen processing. #============================================================================== class Scene_Title < Scene_Base #-------------------------------------------------------------------------- # * Aliasing Method: Start Processing #-------------------------------------------------------------------------- alias :sts04543131 :start #-------------------------------------------------------------------------- # * Start Processing #-------------------------------------------------------------------------- def start sts04543131() create_confirmcommand_window end #-------------------------------------------------------------------------- # * Create Command Window #-------------------------------------------------------------------------- def create_command_window @command_window = Window_TitleCommand.new @command_window.set_handler(:chapter_select, method(:select_chapter)) @command_window.set_handler(:shutdown, method(:command_shutdown)) end #-------------------------------------------------------------------------- # * Create Command Window #-------------------------------------------------------------------------- def create_confirmcommand_window @confirmcommand_window = Window_TitleConfirmCommand.new @confirmcommand_window.set_handler(:new_game, method(:command_new_game)) @confirmcommand_window.set_handler(:continue, method(:command_continue)) end #-------------------------------------------------------------------------- # * Create Command Window #-------------------------------------------------------------------------- def select_chapter @index = @command_window.index + 1 Persistant_DataManager.set(:current_chapter, @index) if DataManager.save_file_by_index_exists?(@index) @command_window.deactivate @confirmcommand_window.show @confirmcommand_window.activate else command_new_game end end #-------------------------------------------------------------------------- # * [Continue] Command #-------------------------------------------------------------------------- def command_continue DataManager.load_game(@index) Sound.play_load fadeout_all $game_system.on_after_load SceneManager.goto(Scene_Map) end end #============================================================================== # ** Window_TitleCommand #------------------------------------------------------------------------------ # This window is for selecting New Game/Continue on the title screen. #============================================================================== class Window_TitleCommand < Window_Command #-------------------------------------------------------------------------- # * Create Command List #-------------------------------------------------------------------------- def alignment return 1 end #-------------------------------------------------------------------------- # * Create Command List #-------------------------------------------------------------------------- def make_command_list if Customization_ChapterStyleTitle::Locked_Chapters_Visable 5.times { |i| add_command(Customization_ChapterStyleTitle::Chapter_vocab + " " + (i + 1).to_s, :chapter_select, chapters_show(i + 1)) } else chapters_unlocked.times { |i| add_command(Customization_ChapterStyleTitle::Chapter_vocab + " " + (i + 1).to_s, :chapter_select) } end add_command(Vocab::shutdown, :shutdown) end #-------------------------------------------------------------------------- # * Get Activation State of Continue #-------------------------------------------------------------------------- def chapters_unlocked if Persistant_DataManager.exsists?(:chapter) return Persistant_DataManager.get(:chapter) else return 1 end end #-------------------------------------------------------------------------- # * Get Activation State of Continue #-------------------------------------------------------------------------- def chapters_show(chapter) chapter <= chapters_unlocked end end #============================================================================== # ** Window_TitleCommand #------------------------------------------------------------------------------ # This window is for selecting New Game/Continue on the title screen. #============================================================================== class Window_TitleConfirmCommand < Window_TitleCommand #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- attr_accessor :chapter_index # Chapter Index #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super update_placement select_symbol(:continue) self.openness = 0 self.hide self.deactivate end #-------------------------------------------------------------------------- # * Update Window Position #-------------------------------------------------------------------------- def update_placement self.x = (Graphics.width - width) / 2 self.y = (Graphics.height * 1.6 - height) / 4 end #-------------------------------------------------------------------------- # * Create Command List #-------------------------------------------------------------------------- def make_command_list add_command(Vocab::new_game, :new_game) add_command(Vocab::continue, :continue) end end #============================================================================== # ** Scene_Menu #------------------------------------------------------------------------------ # This class performs the menu screen processing. #============================================================================== class Scene_Menu < Scene_MenuBase #-------------------------------------------------------------------------- # * [Save] Command #-------------------------------------------------------------------------- def command_save DataManager.save_game(Persistant_DataManager.get(:current_chapter)) Sound.play_save @command_window.activate end end