Need help with end of game coding

Czarcasm

Warper
Member
Joined
Feb 9, 2013
Messages
4
Reaction score
0
First Language
English
Primarily Uses
Basically what I want to do is: After beating the final boss, the game proceeds to the end cut screen and fades to black. At this point the player is transported back to just before the final boss. The credits play. After that, you get sent to the save menu to save your game with the game clear data (basically after defeating the final boss, the journal entry/quest log/whatever gets filled in). after that, you return to the main menu. I'm trying to figure out how to get the return to main menu to only trigger the one time, instead of just returning to the menu any time I load the save.
 

DoctorT

Veteran
Veteran
Joined
Dec 22, 2012
Messages
197
Reaction score
4
First Language
English
Primarily Uses
I would just not return to the main menu, and just continue the game from that point. If the player wants to quit / reload another file or something, (s)he can do that then. 

What you're trying to do will likely be extremely difficult, unless you can figure out a way to manipulate some kind of data that doesn't get saved to the save file somehow. By default, RPG Maker saves EVERYTHING, meaning there's no way to tell it not to perform the exact same action after reloading the file as what is set up to happen immediately after you save. 
 

awgord

Budding Developer
Veteran
Joined
Dec 14, 2012
Messages
37
Reaction score
1
First Language
English
Primarily Uses
Create an event for your final boss.  Have it start the battle, then when the battle is done, have the event fade the screen out and you could either do the credits through scrolling text, or put it in a movie.  Whichever way you want to go, have the event do that.

Then after the credits have rolled, you can have the event load the save screen, and after the save screen is done, you can again have the event load the main title menu.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
I would just not return to the main menu, and just continue the game from that point. If the player wants to quit / reload another file or something, (s)he can do that then. 

What you're trying to do will likely be extremely difficult, unless you can figure out a way to manipulate some kind of data that doesn't get saved to the save file somehow. By default, RPG Maker saves EVERYTHING, meaning there's no way to tell it not to perform the exact same action after reloading the file as what is set up to happen immediately after you save. 
It sounds simple: when you kill the boss the first time, turn on a switch for "end-game"

This will trigger all of the end-game events.

The event for the actual saving will look something like

1. turn off end-game switch2. prompt player to save game3. Other stuff4. Return to main menu 
If the return to menu command is not executed because you changed to the menu, you might need something like

1. turn off end-game switch2. turn on return-menu switch3. prompt player to save game4. turn on self-switch AIn page 2, activate when return-menu switch and self-switch A is on

return to main menuNone of these will run unless the end-game switch is ON, and it is only turned on when you defeat the boss.
 
Last edited by a moderator:

DoctorT

Veteran
Veteran
Joined
Dec 22, 2012
Messages
197
Reaction score
4
First Language
English
Primarily Uses
The problem is loading your saved game that you saved before the game redirected you to the menu. All the switches that were set at the moment you saved your game will be saved to that file, so it will still return to the menu when you reload your game. 

So using your example: 

1. turn off end-game switch2. prompt player to save game3. Other stuff4. Return to main menu
When you reload your game, it will do:

3. Other stuff

4. Return to main menu

And you won't be able to play the post-game content. 
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
The event won't run because all end-game events require the end-game switch to be ON.


In my example, all 4 steps are in the same page with that condition.


1. If you save the game BEFORE you run the end-game events, then you will be able to view them when you reload, because the switch is still ON


2. If you save AFTER the end-game events, then the switch will be OFF, and none of those events will run, thus allowing you to run around and leave the dungeon, etc.
 
Last edited by a moderator:

DoctorT

Veteran
Veteran
Joined
Dec 22, 2012
Messages
197
Reaction score
4
First Language
English
Primarily Uses
Maybe I am misunderstanding the following...

If you save your game while an event is running (because it prompts the user to save during the course of an event), when you reload the game, doesn't it resume the event where it left off before the save? Or does it just bring the player back to the map? 

If the save file does not include the progress of the currently running event, that would explain why this would be an easy solution. 
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Oh, right, yes it would just resume where the event was.


Sorry I completely forgot about that.


Here is a possible solution only with switches and a a simple script


http://db.tt/gosSbY2j
 
Last edited by a moderator:

Kilravok

Veteran
Veteran
Joined
Jul 18, 2012
Messages
73
Reaction score
4
First Language
English
Primarily Uses
RMMV
Does the event continue even if the switch is flipped? and when you reload, does the event start at the beginning of it's page or at the save comand?
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Yes, once a page is running, it doesn't matter if the conditions are not met during execution.


When you reload, the interpreter will start one command after the save command.
 

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

Latest Threads

Latest Posts

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,078
Members
137,580
Latest member
Snavi
Top