How to turn enemy's escape from battle into a loss?

Hello!
I want to make a specific type of encounter with animals where all they do is try to escape the battle. I have worked out this part, my issue is that if they do escape it counts as a win for the player when I want it to be a loss.

Is there a quick way to turn the enemy's escape from battle into a player's loss?
1 - Get HimeWorks' End Phase Triggers, so troop events can go off after all enemies are gone

2 - Make a troop event that checks for all enemies to have run away and uses the Game Over event command
If you wanna throw a ganeover screen at the player's face, ATT_Turan 's suggestions will be useful there.

Yet, if you just wanted to count it as a loss without a game over, you'll need to modify the second suggestion a little bit.
That's true, but what counts as a loss aside from a game over?

Edit: you mean for an evented battle. Gotcha.
Yeah, I don't want it to mean a game over.
It's basically supposed to be an evented battle that if won leads to a certain interaction with another character and if lost the interaction changes a bit.
Yeah, I don't want it to mean a game over.
It's basically supposed to be an evented battle that if won leads to a certain interaction with another character and if lost the interaction changes a bit.
Then you would just have a different cutscene/sequence of commands under If won and If lost
Then you would just have a different cutscene/sequence of commands under If won and If lost
Yes, but the question is how to make it count as a loss.

@May_Trash I suggest not using the "if won" "if lost" branches in the event. Instead, keep track in your battle whether it ended from killing the enemies or they won away.

One example of how to do this is to install the plugin I mentioned above, so that troop events can trigger when the enemies are gone.

Then make two troop events - one turn 0 turns on a switch (or turn it on in your event before you call Battle Processing).

Make another (you'll need a copy of this for each enemy in your troop) that checks whether that enemy is at <= 0% HP. If yes, and there are no other enemies left alive, that means the party killed the last enemy and you turn the switch OFF.

Then back on the map, you just check whether the switch is off or still on and you know how the battle ended.
Or you could deploy the following plugin that I made and tested recently.

Through the Plugin Manager you can define what's the actual Switch ID you're gonna use to change an escape into a loss but not a gameover.

I've titled this plugin BattleEndAsLoss MV!
It's very simple to use it for sure.
Yes, but the question is how to make it count as a loss.

@May_Trash I suggest not using the "if won" "if lost" branches in the event. Instead, keep track in your battle whether it ended from killing the enemies or they won away.

One example of how to do this is to install the plugin I mentioned above, so that troop events can trigger when the enemies are gone.

Then make two troop events - one turn 0 turns on a switch (or turn it on in your event before you call Battle Processing).

Make another (you'll need a copy of this for each enemy in your troop) that checks whether that enemy is at <= 0% HP. If yes, and there are no other enemies left alive, that means the party killed the last enemy and you turn the switch OFF.

Then back on the map, you just check whether the switch is off or still on and you know how the battle ended.
Thank you! This seems to have done the trick

@kyonides I'll gladly check out the plugin too, thank you ^^

Original thread: https://forums.rpgmakerweb.com/threads/how-to-turn-enemys-escape-from-battle-into-a-loss.158420/