Variable untouched by "New Game"

MuyHiram

MuyHiram
Member
Joined
Oct 30, 2015
Messages
20
Reaction score
1
First Language
Engllish
Primarily Uses
RMMV
I'm making a Storage Box that can hold one item thoughout New Games, and a character that has different dialogues depending on the ending you got last game.


I'm looking for a script that would allow me to keep a couple of variables unchanged after starting a new game.


If not a script, a way around it. Like reseting the entire game exept for those couple of varaibles in the same "Save File".


I will credit properly. Thanks.
 

MuyHiram

MuyHiram
Member
Joined
Oct 30, 2015
Messages
20
Reaction score
1
First Language
Engllish
Primarily Uses
RMMV
I'd create one for you but, Yanfly already has an excellent NewGame+ script for Ace that already allows carrying variables over to a new game from a save.


https://yanflychannel.wordpress.com/rmvxa/menu-scripts/ace-save-engine/new-game
Thanks for the response. Not quite what I was looking for.


I wan't the player to press "new game" on the menu screen. If maybe I could move the "NG+" to the menu screen, but then there's no switch to turn NG+ ON from the menu screen.
 

Anomaly

coffee.empty? ? refill_coffee : drink_coffee
Veteran
Joined
Jan 19, 2016
Messages
61
Reaction score
302
First Language
[US] English
Primarily Uses
RMVXA
Ah, give me a couple of minutes to write the option for you. I'll edit this in a few minutes with the snip-it.


Finished, see recent reply.
 
Last edited by a moderator:

MuyHiram

MuyHiram
Member
Joined
Oct 30, 2015
Messages
20
Reaction score
1
First Language
Engllish
Primarily Uses
RMMV
Ah, give me a couple of minutes to write the option for you. I'll edit this in a few minutes with the snip-it.
Thank you very much. :)
 

Anomaly

coffee.empty? ? refill_coffee : drink_coffee
Veteran
Joined
Jan 19, 2016
Messages
61
Reaction score
302
First Language
[US] English
Primarily Uses
RMVXA
Ah I do have one question, did you mean Title Screen Menu or the actual In-Game Main Menu?
 

MuyHiram

MuyHiram
Member
Joined
Oct 30, 2015
Messages
20
Reaction score
1
First Language
Engllish
Primarily Uses
RMMV
Ah I do have one question, did you mean Title Screen Menu or the actual In-Game Main Menu?
Oh yes, Title Screen. where the New Game and Continue options are.
 

Anomaly

coffee.empty? ? refill_coffee : drink_coffee
Veteran
Joined
Jan 19, 2016
Messages
61
Reaction score
302
First Language
[US] English
Primarily Uses
RMVXA
Here you go, @MuyHiram!

#==============================================================================
# ** 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                :on_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
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,047
Messages
1,018,539
Members
137,834
Latest member
EverNoir
Top