MZ Problem with escape battle fail

Whenever i fail to escape from a battle, the actors are just frozen there. All the attack options disappear. And im forced to quit the game. I believe it has something to do with a Visustella plugin. Any suggestions?
If you turn off all the plugins does it still happen?
If you turn off all the plugins does it still happen?
No it only happens when BattleCore is on. But I've been looking at the plugin forever and can't find what would cause this problem. I did a new project with only BattleCore on and there wasn't a problem. But in my regular project with only BattleCore on, i have this issue. Which leads me to believe something in my database configuration is conflicting with BattleCore
It might be good to double check and make sure that your VisuStella plugins are in the correct order. Otherwise, maybe try uninstalling Battle Core (completely remove it from your plugin manager), and then saving the project, and then re-installing Battle Core.
We are running into a similar problem. I have tried using SceneManager from to console to move to another scene, and I get a message from the Visustella code that it does not support going to another scene during a battle, so it definitely seems to be in control. As with your case, it only happens after a failed escape.
We are running into a similar problem. I have tried using SceneManager from to console to move to another scene, and I get a message from the Visustella code that it does not support going to another scene during a battle, so it definitely seems to be in control. As with your case, it only happens after a failed escape.
I can reproduce this error consistently with a test game that has just the Visustella core and battle core plugins. Always escape is turned off in the core plug-in, and escape ratio is set to .005 in the battle core plug-in. Every attempted escape fails and causes the hang.

I will be submitting a bug report to Visustella.
@LynnGrant, Did anything ever come of this? I’m also confirming the same error happening on my end.
We submitted a bug report on April 28th, and have had no reply, other than the automatic acknowledgement. Here is what our bug report said:
-----
With "Always Escape" turned off in the CoreEngine, and escape ratio set to 0.005 in the BattleCore, every failed escape results in a hang, with no response from keyboard or mouse. I tried getting out of it by going to the console and entering SceneManager.push(Scene_Gameover) and got a Visustella messaging saying that it did not support changing to that scene mid-battle.
-----
If you have the VisuMZ_4_Debugger plugin, you can get out of the freeze by pressing PF9, selecting "Quick", and then "Defeat Enemies". This is useful for testing, but it doesn't do anything for your customers.

We are still looking into whether we can get control in a common event when an escape fails, and then do something, but we are still researching what that something would be.

Best of luck,

Lynn
Thanks for the follow up! Let’s hope something comes from it.
OK, I have a workaround. It's not terribly pretty, but it seems to solidly work.

In the Mechanics Settings for the VisuMZ_1_BattleCore plugin, specify an Escape Fail common event. In this case, I chose Common Event 116.

visu-battle-core-settings.png


Common Event 116 contains a script that looks like this:

$gameVariables.setValue(2022, $gameTroop._troopId);
BattleManager.abort();


The first line remembers which troop is attacking. The second stops the attack, so you are right where you were before you got attacked.

On the map page is an event that looks like this. The first page is just a placeholder:

battle-retry-1.png


The second page is triggered when the Control Variable we saved the attacking troop ID in is non-zero:

battle-retry-2.png


It starts a battle with the saved troop ID. It does not have the "can escape" box checked, so we don't have to worry about recursive escape failures. The "If Lose" clause calls our Common Event that does Game Over processing; you could just as well use the regular GameOver command. At the end, it sets the troop ID variable to zero, which sets the event back to page 1.

The Tint Picture command may not be necessary. We found that in the second battle, the background would be dark. But since our code that tints the screen based on time of day is apart on the bench, and may not be working completely, that may be an artifact of our environment. If you screen isn't dark on the retried battle, leave the Tint Picture command out.

What is ugly about this approach is that you need the retry event on every page where you might have battles. But it still is a lot less ugly than have your game freeze in the middle of a battle.

Good luck, and happy game-making!

Lynn
I should add that the rationale behind this slightly convoluted process is that once you issue the BattleManager.abort(), the Common Event seems to lose control, or at least effectiveness. So if you issue the new Battle Processing command in the Common Event, nothing happens.
I looked into this, and I was able to discover the source of the bug. I went ahead and wrote a little patch. Add the attached plugin to your project, and make sure that it is BELOW Battle Core in the plugin manager. It seems to fix it pretty well as far as I can tell, but I can't say that I tested it super extensively, so please let me know how it goes.

Make sure to remember to remove this patch from your project if VisuStella fixes the problem in a future update.

Just to elaborate on what triggers the bug, for anyone interested: If you're using the turn-based battle system, and you use the Escape command from the Actor Command Window, then the game will softlock if the escape fails. If you initiate the escape from the Party Command Window, or if you're using the time progress battle system, then the bug doesn't occur.
Thank you, thank you, thank you! I just finished putting up a new release of our game moments ago, but I will be sure to try this for the next release. It will be a lot less clunky than my workaround.

Thanks again...

Lynn
@Arthran Just for the sake of clarity, are you saying that this problem is present if, and only if, one is using the default battle system? And that if one is using another (in my case CTB ) this isn't an issue we need worry about?
Thanks
Thank you, thank you, thank you! I just finished putting up a new release of our game moments ago, but I will be sure to try this for the next release. It will be a lot less clunky than my workaround.

Thanks again...

Lynn
No problem. Since it's an issue that impacts me as well, I'd be lying if I said that my motives were entirely altruistic.

@Arthran Just for the sake of clarity, are you saying that this problem is present if, and only if, one is using the default battle system? And that if one is using another (in my case CTB ) this isn't an issue we need worry about?
Thanks
To be honest, I only tested it with the plugins that are in the free VisuStella Sample Project, so I can't really make any guarantees in regards to their paid battle system plugins. I do own them, but I've never used them, nor have I familiarized myself with them enough to give a definitive answer.

But I'm reasonably sure that the issue should only affect battle systems like the default one (where nobody does anything until after you've selected actions for the entire party). If the battle system that you're using is one where each actor's turn is handled individually, then you should be fine.
If the battle system that you're using is one where each actor's turn is handled individually, then you should be fine.
That is the type I'm using, so I shall breathe a sigh of relief and move on.
Thank you for the clarification.
Sorry for technically necro-posting, but just wanted to say thanks as I was having this issue too.

Not sure if anyone has done already, but if not I'll report it to VS with a link to @Arthran 's post.
Necro-post notice: @werzque

Thanks for reporting it, but please don't necropost.

Original thread: https://forums.rpgmakerweb.com/threads/problem-with-escape-battle-fail.155660/