Skip Gameover / Lose Money After Random Encounter?

I want to make a system in this game I'm making similar to Earthbound's where you lose half the money you have on you and are taken back to where you last saved. I have an idea of how to get this to work in game, and indeed I can get it to work when using Event Battles, but I was wondering if there is a way to skip the default Game Over screen so the player isn't forced to load an old save?

I've been searching for about an hour now and some people mention plugins or whatever, and some solutions seem to exist on MV(?) but I wasn't able to find what I was looking for. Thank you!

I've moved this thread to Script Requests. Thank you.


Moving it there, as I'm certain you'll need one. If you've been searching for plugins specifically, that's likely your trouble - Plugins are for MV only. Scripts are what are written for Ace and older versions.

This may be a good starting place. https://forums.rpgmakerweb.com/index.php?threads/vxace-master-script-list.73/
One way to achieve this, it's rewrite the updateBattleEnd method from the Battle Manager, like this:
Code:
BattleManager.updateBattleEnd = function() {
        if (this.isBattleTest()) {
            AudioManager.stopBgm();
            SceneManager.exit();
        } else if (!this._escaped && $gameParty.isAllDead()) {
                //Instead Gameover, do something else here
                SceneManager.pop();
        } else {
            SceneManager.pop();
        }
        this._phase = null;
    };
This reminds me of a request I did before, because I had to edit a Checkpoint Script and that script had an option to lose a percent of gold.

Bravo Checkpoint and Edit

The original respawns instantly at the checkpoint. My edit leads to a "You Died" screen.
You could make every battle with a "continue when loss", then get value of gold and divide by 2, make gold 0 then give half value, then load checkpoint. The checkpoint would be the harder part. If you want to load a save game then it becomes difficult to change the gold value. Perhaps a script writer can make that happen. or
If you use a variable and set a value for each checkpoint, then you could just transport the player to that checkpoint using a common event.

Original thread: https://forums.rpgmakerweb.com/threads/skip-gameover-lose-money-after-random-encounter.83705/