How to add bonus content to menu after condition is met?

Wavelength

MSD Strong
Global Mod
Joined
Jul 22, 2014
Messages
5,624
Reaction score
5,104
First Language
English
Primarily Uses
RMVXA
Nice job with this, Milena.

I'm curious about the approach you took, because I use a much different approach in my own game where I store a global text file for this kind of thing because when I tried to simply create a new object like $new_game_plus, I found that it did not persist after closing the application and restarting (unless I programmed a loop to check every saved file, which did actually work, but was relatively clumsy).

Does your approach allow the option to be available on the menu screen even after you start a new game (and then return to the menu) or close and re-open the program?
 

Milena

The woman of many questions
Veteran
Joined
Jan 26, 2014
Messages
1,281
Reaction score
106
First Language
Irish
Primarily Uses
N/A
My script is clumsy there, the developer has to let the player return to the title screen after activating the object then there they can access the bonus stage. My knowledge is limited to how it would be possible to close the program, re-open and still there's a bonus stage available.
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
The easiest approach would be, indeed, using an external file for storing the new game plus data and reading that instead of some internal data.


But that file should also be encrypted somehow, because if not, enabling the new game plus option would be as easy as adding/changing one single line in that external text file.


Yanfly's New Game+ script can somehow store some values which persist through different play-through of the game. And if I remember right, it adds a new option to the title screen as well.


Perhaps that script can be used as a guide to see how he did it.
 

JAD94

The lunar knight
Veteran
Joined
Feb 18, 2014
Messages
662
Reaction score
189
First Language
English
Primarily Uses
RMMV
Ok so after play testing it the script works beautifully :)
 

Milena

The woman of many questions
Veteran
Joined
Jan 26, 2014
Messages
1,281
Reaction score
106
First Language
Irish
Primarily Uses
N/A
Glad that it does ^^
 

wistiecutie

Villager
Member
Joined
May 3, 2015
Messages
21
Reaction score
4
First Language
french
Primarily Uses
Glad that it does ^^


Pardon me Milena , I still am little clumsy with scripting but , when I copy your script and past it in the script  editor , it all is in one single line instead of being shaped like a usual script . Am I doing something wrong ?
 

Milena

The woman of many questions
Veteran
Joined
Jan 26, 2014
Messages
1,281
Reaction score
106
First Language
Irish
Primarily Uses
N/A
I think it has something to do with the failed formatting of this forum. Please try this:

Code:
module DataManager    
  MAP_ID_FOR_BONUS_STAGE = 2 # bonus stage map start  
  MAP_X = 10 # x coords of the bonus stage map you will be transferred in.  
  MAP_Y = 10 # y coords of the bonus stage map you will be transferred in.    
  
  class << self    
    alias milena_create_game_objects create_game_objects    
  #--------------------------------------------------------------------------    
  # * Create Game Objects    
  #--------------------------------------------------------------------------    
  def create_game_objects      
    milena_create_game_objects      
    $game_plus        = Game_NewGamePlus.new    
  end      
  
  #--------------------------------------------------------------------------  
  # * Set Up New Game  
  #--------------------------------------------------------------------------  
  def self.setup_new_game_plus    
    create_game_objects    
    $game_party.setup_starting_members    
    $game_map.setup(MAP_ID_FOR_BONUS_STAGE)    
    $game_player.moveto(MAP_X, MAP_Y)    
    $game_player.refresh    
    Graphics.frame_count = 0  
  end   
end  
 
end# this is referenced by $game_plus

class Game_NewGamePlus  
  attr_accessor :create_new_game  
  #--------------------------------------------------------------------------  
  # * Object Initialization  
  #--------------------------------------------------------------------------  
  def initialize    
    @create_new_game = false  
  end 
end
class Window_TitleCommand < Window_Command  
  #--------------------------------------------------------------------------  
  # * Create Command List  
  #--------------------------------------------------------------------------  
  def make_command_list    
    add_command(Vocab::new_game, :new_game)    
    add_command(Vocab::continue, :continue, continue_enabled)    
    add_command("Bonus Stage", :new_game_plus, new_game_plus_enabled)    
    add_command(Vocab::shutdown, :shutdown)  
  end    
  def new_game_plus_enabled   
    return true if $game_plus.create_new_game    
    return false if $game_plus.create_new_game  
  end  
end
  
class Scene_Title < Scene_Base  
  #--------------------------------------------------------------------------  
  # * Create Command Window  
  #--------------------------------------------------------------------------  
  def create_command_window    
    @command_window = Window_TitleCommand.new    
    @command_window.set_handler(:new_game, method(:command_new_game))    
    @command_window.set_handler(:continue, method(:command_continue))    
    @command_window.set_handler(:new_game_plus, method(:command_plus))    
    @command_window.set_handler(:shutdown, method(:command_shutdown))  
  end    
  
  def command_plus    
    DataManager.setup_new_game_plus    
    close_command_window    
    fadeout_all    
    $game_map.autoplay    
    SceneManager.goto(Scene_Map)  
  end  
  
end
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,862
Messages
1,017,050
Members
137,571
Latest member
grr
Top