MZ Bypass the way the game handles gameovers to make a custom scene on a specific map.

Hello!

I tried implementing that through eventing but the way the software handles game overs seem to be pretty hard coded. What I would need is "simply", instead of having an automatic game over screen, to teleport my party to a map where the death scene happens and THEN, I would launch the game over there. I looked for plugins around, but no luck so far.

I don't know how complicated it is but I suppose it's just some line bypassing the way the engine does game overs?

I'm completely new to javascript but i'm completely ok with being given guidelines on how to do that if it will help me get the basics better, I'm more than willing to learn, it's never useless! So if I just need to be given some pointers to handle this, even more the yes! I don't know javascript but I have some basic understanding of programming logic in general.

So what I need is nothing too fancy : i just want to be able to make the game teleport to a specific map on game over rather than launch the game over event. I'll handle the rest, I know how I want to pull it off!

Have a nice day everybody 🙂
I Googled "rpg maker mz game over plugin" and this seems to do exactly what you want.
you can try this out. replace the x with the id for a common event and when the player loses a battle theyre not supposed to be able to, itll play that before common event before taking them away to the game over screen.

Code:
BattleManager.updateBattleEnd = function() {
    if (this.isBattleTest()) {
        AudioManager.stopBgm();
        SceneManager.exit();
    } else if (!this._escaped && $gameParty.isAllDead()) {
        if (this._canLose) {
            $gameParty.reviveBattleMembers();
            SceneManager.pop();
        } else {
            $gameTemp.reserveCommonEvent(x); //Here
            SceneManager.pop();
        }
    } else {
        SceneManager.pop();
    }
    this._phase = null;
};
I Googled "rpg maker mz game over plugin" and this seems to do exactly what you want.
Oh fantastic, thank you! That should do the trick! Don't know how I managed to miss that, I googled about this a thousand times, maybe I was too specific on my request to google :/.

you can try this out. replace the x with the id for a common event and when the player loses a battle theyre not supposed to be able to, itll play that before common event before taking them away to the game over screen.

Code:
BattleManager.updateBattleEnd = function() {
    if (this.isBattleTest()) {
        AudioManager.stopBgm();
        SceneManager.exit();
    } else if (!this._escaped && $gameParty.isAllDead()) {
        if (this._canLose) {
            $gameParty.reviveBattleMembers();
            SceneManager.pop();
        } else {
            $gameTemp.reserveCommonEvent(x); //Here
            SceneManager.pop();
        }
    } else {
        SceneManager.pop();
    }
    this._phase = null;
};
Thank you!
However I need it to happen anytime game over happens, and it can happen A LOT outside battles hahaha.


Thaks for taking the time to help !
@Robro33 I'd probably put it in Scene_Base.prototype.checkGameover() also.

Original thread: https://forums.rpgmakerweb.com/threads/bypass-the-way-the-game-handles-gameovers-to-make-a-custom-scene-on-a-specific-map.168503/