#==============================================================================
# ** Kazama - Fast NewGame+ Title Option
# Commissioned for MuyHiram
# Version 1.0
#------------------------------------------------------------------------------
# Placement:
# Place this script under YEA's NewGame+ Script.
#------------------------------------------------------------------------------
# How to use:
# In order for this script to function properly you must save the new game
# plus switch in the CARRY_OVER_SWITCHES array. Failure to do so, will not
# allow the option to show up on the title screen.
# If you'd like to change the Command Text, you may do so by changing the
# NGP_TEXT constant in the original YEA NG+ module.
#------------------------------------------------------------------------------
# License:
# Both Non-Commercial & Commercial allowed.
# Retain the original script header.
# Simple Credit required.
#==============================================================================
#==============================================================================
# ** DataManager
#------------------------------------------------------------------------------
# This module manages the database and game objects. Almost all of the
# global variables used by the game are initialized by this module.
#==============================================================================
class << DataManager
#--------------------------------------------------------------------------
# * Module Class Variables
#--------------------------------------------------------------------------
@@recently_saved_file = 0
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias :kazama_yanfly_ngp_data_manager_init :init
#--------------------------------------------------------------------------
# * Initialize Module
#--------------------------------------------------------------------------
def init
kazama_yanfly_ngp_data_manager_init
@@recently_saved_file = 0
end
#--------------------------------------------------------------------------
# * Set Recently Saved File Index
#--------------------------------------------------------------------------
def set_recent_saved_file_index=(index)
@@recently_saved_file = index
end
#--------------------------------------------------------------------------
# * Get Recently Saved File Index
#--------------------------------------------------------------------------
def get_recent_saved_file_index
@@recently_saved_file
end
end
#==============================================================================
# ** Scene_Save
#------------------------------------------------------------------------------
# This class performs save screen processing.
#==============================================================================
class Scene_Save < Scene_File
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias :kazama_yanfly_ngp_menu_on_savefile_ok

n_savefile_ok
#--------------------------------------------------------------------------
# * Confirm Save File
#--------------------------------------------------------------------------
def on_savefile_ok
kazama_yanfly_ngp_menu_on_savefile_ok
DataManager.set_recently_saved_file_index = @index
end
end
#==============================================================================
# ** Window_TitleCommand
#------------------------------------------------------------------------------
# This window is for selecting New Game/Continue on the title screen.
#==============================================================================
class Window_TitleCommand < Window_Command
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
include YEA
include NEW_GAME_PLUS
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias :kazama_yanfly_ngp_menu_initialize :initialize
alias :kazama_yanfly_ngp_menu_make_command_list :make_command_list
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
@header = DataManager.load_header(DataManager.get_recent_saved_file_index)
kazama_yanfly_ngp_menu_initialize
end
#--------------------------------------------------------------------------
# * Create Command List
#--------------------------------------------------------------------------
def make_command_list
add_command(NGP_TEXT, :new_game_plus) if new_game_plus_allowed?
kazama_yanfly_ngp_menu_make_command_list
end
#--------------------------------------------------------------------------
# * Determine if New Game Plus Is Allowed?
#--------------------------------------------------------------------------
def new_game_plus_allowed?
return false if @header.nil?
return @header[:switches][YEA::NEW_GAME_PLUS::NGP_SWITCH]
end
end
#==============================================================================
# ** Scene_Title
#------------------------------------------------------------------------------
# This class performs the title screen processing.
#==============================================================================
class Scene_Title < Scene_Base
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias :kazama_yanfly_ngp_title_create_command_window :create_command_window
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
def create_command_window
kazama_yanfly_ngp_title_create_command_window
@command_window.set_handler

new_game_plus, method

on_action_ngp))
end
#--------------------------------------------------------------------------
# * On NewGame+
#--------------------------------------------------------------------------
def on_action_ngp
Sound.play_load
DataManager.setup_new_game_plus(DataManager.get_recent_saved_file_index)
fadeout_all
$game_system.on_after_load
SceneManager.goto(Scene_Map)
end
end