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.
Need help with end of game coding
● ARCHIVED · READ-ONLY
-
-
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. -
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. -
It sounds simple: when you kill the boss the first time, turn on a switch for "end-game"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.
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. -
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:
When you reload your game, it will do:1. turn off end-game switch2. prompt player to save game3. Other stuff4. Return to main menu
3. Other stuff
4. Return to main menu
And you won't be able to play the post-game content. -
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. -
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. -
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 -
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?
-
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.