Continue Enabled

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 noticed a good point on RPG Maker which is the continue_enabled in the Scene_Title.

I just have a few question, I am making a game where it has chapters basically, I was able to script the scene title's other commands like credits...pictures...etc, however there's something I can't figure out... adding something like the continue enabled.

So my game title options looks like this:

  • New Game
  • Chapter 2
  • Chapter 3
  • Continue
  • Credits
For the start, I was able to gray out the chapters 2 and 3, giving a condition that if this switch is on, then should Chapter 2 be available. 

My problem is this: When I return to Scene Title right after saving, Chapter 2 is available, yet when I re-start the game from the Test Run (F12), it won't be available anymore. is there a way to duplicate such method where, if turned on or off in game and saved, even if you restart it (not from going on the scene title), will the Chapter 2 available? Its like if you finished Chapter 1 and saved it, you can play chapter 2 anytime you like.
 

Mike

Veteran
Veteran
Joined
Aug 28, 2013
Messages
316
Reaction score
36
First Language
English
Primarily Uses
Yes

1. Save Chapter Switch in the game constant.

2. Scan all save files and check whether chapter switch is on or off.

This is one way to scan savefile.

def load_save_data(index) if (DataManager.check_if_that_save_file_exists?(index)) File.open(DataManager.make_filename(index), "rb") do |file| header = Marshal.load(file) contents = Marshal.load(file) @exist_list[index] = true @data[index] = {} @data[index]['char'] = header[:characters] @data[index]['total_sec'] = header[:playtime_s] @data[index]['gamesys'] = contents[:system] @data[index]['gamemes'] = contents[:message] @data[index]['gameswi'] = contents[:switches] @data[index]['gamevar'] = contents[:variables] @data[index]['gameselfvar'] = contents[:self_switches] @data[index]['gameactor'] = contents[:actors] @data[index]['gamepar'] = contents[:party] @data[index]['gametro'] = contents[:troop] @data[index]['gamemap'] = contents[:map] @data[index]['map_name'] = get_mapname(@data[index]['gamemap'].map_id) end else @exist_list[index] = false @data[index] = -1 end endBut you don't need to load all the variables. One is good enough.
 

Milena

The woman of many questions
Veteran
Joined
Jan 26, 2014
Messages
1,281
Reaction score
106
First Language
Irish
Primarily Uses
N/A
where do I actually put the code in? 

on my Title Command I made this:

class Window_TitleCommand < Window_Command def make_command_list add_command("Start", :start) endendwhile making the method for start at Scene_Title.

So if i ever want a new chapter and say:

add_command("Chapter 2", :chapter2, chapter_two_enabled)and make a method for it, where do I place the checking? Does it work for game switches? I want to test the script like if I turned Switch 1 on and saved the game, close the window and restart it, I should be able to see Chapter 2 open...
 
Last edited by a moderator:

Mike

Veteran
Veteran
Joined
Aug 28, 2013
Messages
316
Reaction score
36
First Language
English
Primarily Uses
You can put the code anywhere you want as long you link them together.

May I see how you store the chapter switches? We can start from there.
 
Last edited by a moderator:

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 had the switch saved in game, so basically an event. However my problem starts from there, it somehow saves the switch only for that saved game. I am starting to think the switches won't affect the entirety of the game. Is there a way to create a switch that can affect the whole game (as long as that saved game exist)?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,676
First Language
German
Primarily Uses
RMMV
My problem is this: When I return to Scene Title right after saving, Chapter 2 is available, yet when I re-start the game from the Test Run (F12), it won't be available anymore. is there a way to duplicate such method where,
Check the ReStaff archives for Fomar's "persistent data" script.
I don't know in which of the ReStaff's it was published, but it allows you to store switch data outside savegames and is easier to use than scanning all saves for the data...
 

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'll try to look for that :)
 

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

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
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

Forum statistics

Threads
105,868
Messages
1,017,072
Members
137,578
Latest member
JamesLightning
Top