How can I make the game not game over after being defeated?

Hi, I have a place in my game that goes like that:
  1. The main team is changed into a temporary "game-in-game" team.
  2. In that "game-in-game", the player loses at some point.
  3. A cutscene in the main game shows up, telling the player that they just can try again, with the intended result being that the player is again able to control the main team and then play the "game-in-game" again.
  4. Instead, the game just game-overs after that cutscene.
In simpler language, I just want to make that, if the team gets defeated, the game will allow the player to still be on the map and try again or play a special cutscene and move on, without the game immediately placing a game over screen (or, as I like to call it, "bad ending").

Could someone help me with that? For reference, I have all tier 0 and 1 VisuStella plugins.
Hiya there!

If you're using the Visustella plugins--refer to this part of the 'Battle Core' plugin settings:


1679075870615.png


Here there's the 'Common events' where you can specify a range of common events to be activated depending on various situations regarding a battle's outcome, including defeat! Hopefully that helps.
It depends on how you're doing the battles. If these cutscene battles are being started using the Battle Processing event command, you can simply check the Can Lose box and you get a Lose branch in your event to put more event commands in.

If you're using map random encounters and you expect them to lose one of those, then you'd have to do something like FrigidGaze pointed out.
I think that I found my answer. This is how the battle loss common event looks like:
${Title} - RPG Maker MZ 17.03.2023 19_10_08.png

I think that with the "can lose" box, it does that code first, doing the exact same code as the "room = 28", then this code checks - the room check (obviously) fails, the "losable battle" switch is unset and also fails, and then it game overs. Let me check if my hypothesis is true
that is much too complex for what it does, especially as the can lose box only applies to the single battle processing where it is used - and you didn't even give the event containing that battle.

additionally, going to a new map (like with the transfer) resets common events

and third, do not cut away the important properties when screenshotting events - the content is only half the event and for bughunting the properties (like trigger) are extremely important.
Ok, it now works. Thanks, everyone!

Original thread: https://forums.rpgmakerweb.com/threads/how-can-i-make-the-game-not-game-over-after-being-defeated.155893/