MZ Need help making an battle escape plugin

I feel the current battle escape rate is too high, it seems that however it's set up, I can escape on 2nd try every time.

What I want is a base 25% chance to escape, that goes up 10% every failure until you escape. And a way to edit that base value in case I decide it needs tweaking.
JavaScript:
BattleManager.makeEscapeRatio = function() {
    this._escapeRatio = (0.25 * $gameParty.agility()) / $gameTroop.agility();
};

save this as JS and it works.
default is 0.5 and it adds 0.1 on escape failure
ok, i got you covered, i just made simple plugin, with base escape rate is 25% and will increase 10% every time you use escape command, till you get out of battle you can check it on my itchio page
free to download
you can also change base escape rate and increment rate according to your choice




escape3.png


escape1.png


escape2.png
There must be something else going on, even if I set escape rate to 0 and delete the party and troop calculations, the party escapes 2nd try every time. EDIT: This was in response to ShadowDragon, I'll try the other plugin later. If that doesn't change anything, I will try disabling other plugins, then if that affects it try to isolate what plugin is causing the issue. Thanks for the help so far!

EDIT: Yeah even if all plugins disabled but Wisepot's, and I set both values to 0, party always escapes on 2nd attempt. Any ideas?
There must be something else going on, even if I set escape rate to 0 and delete the party and troop calculations, the party escapes 2nd try every time. EDIT: This was in response to ShadowDragon, I'll try the other plugin later. If that doesn't change anything, I will try disabling other plugins, then if that affects it try to isolate what plugin is causing the issue. Thanks for the help so far!

EDIT: Yeah even if all plugins disabled but Wisepot's, and I set both values to 0, party always escapes on 2nd attempt. Any ideas?
HI, i just test out doing escape rate 0 for both, and it took minimum 4-9 turns for me to escape the battle its working fine with my project,
if both rate become zero, still you can not make you cant escape battle fully, it will always have chance to escape but its minor took me 4-9 fail attempts to run out of battle ,
tested more than 6 battles

if you check the code it will , try to take base game rate, if plugin rate are zero or not availble
Hmm yeah I loaded a new project to test escaping, with your plugin it is working as expected in the new project. Not sure what I have to do to fix it in existing project... I'll see what I can find...

EDIT: So even though the issue is still there with all my plugins disabled, it's still an issue with one of the plugins. When I use the original plugins.js file in the js directory, escape behaves as expected. When I use my plugins.js file (which I assume has all my plugin configuration info), escape is wonky.

Attached is a picture of my plugins. I'll take a look through their settings and see if I can find what is doing this, but if anyone might know where to look to help speed things up, it would be appreciated.
try to put in top may be other plugin making it go wrong something like that
That didn't fix it, but I have isolated it to being from Visu CoreEngine. When I delete the entire plugin's entry from the plugin.js file, your plugin works. So now I have to either find what exactly is causing it, or just do Visu CoreEngine from scratch and retweak things.
That didn't fix it, but I have isolated it to being from Visu CoreEngine. When I delete the entire plugin's entry from the plugin.js file, your plugin works. So now I have to either find what exactly is causing it, or just do Visu CoreEngine from scratch and retweak things.
my plugin is kind of very simple and should not have any problem with any other plugins, my other plugins work with visustella plugins
hope so it work for your game
Good news (kind of)! It seemed it was Visu CoreEngine because when it was activated the bug happened, but actually it's Visu BattleCore. So there's a setting in there I must have messed with that's doing this. If I figure it out without resorting putting the plugin to its original values and tweaking everything else again, I'll post how it's done in case someone has a similar problem down the line.

EDIT: See attached image. No matter what I set Escape Ratio and Escape Raise to (even if 0.0000001), escape *always* succeeds on 2nd try. No matter where I place your plugin and do with it, same issue. It's something with specifically Visu BattleCore. And I want to use the BattleCore plugin if for nothing else but HP bars on enemies, I've seen other plugins that do only this but they don't look as clean.
1736100016571.png
Good news (kind of)! It seemed it was Visu CoreEngine because when it was activated the bug happened, but actually it's Visu BattleCore. So there's a setting in there I must have messed with that's doing this. If I figure it out without resorting putting the plugin to its original values and tweaking everything else again, I'll post how it's done in case someone has a similar problem down the line.
send me to when u find solution, so if any one watch my video on YouTube and got same problem with visustella battle plugin i can explain them
Those two VS Settings SHOULD work to fix your issue.
You should share SS of what is IN those settings.
That would probably help a LOT here.
1736101005151.png
1736101020767.png

Maybe it's the agility + party alive members calculation? I do just want a flat % base + flat % increase per failure. What's the safe way to remove these to test?

EDIT: I think I'm just going to use a plugin to have currency drop on escape, and have escape always be successful. https://forums.rpgmakerweb.com/index.php?threads/kotonoha-escape-lost-gold-escape-penalty.121729/
You can comment // out the value += line to fix, but do whatever you like.

My game guarantees escapes as well.
The penalty there is a temporary increase in the chance for a surprise attack which builds up on subsequent escapes.
the way I did it should work, but it also has it's party and game troop agility
that plays a role so it has a higher change.
JavaScript:
BattleManager.makeEscapeRatio = function() {
    this._escapeRatio = 0.25 ; // always 25% change + 0.1 from failure
};

BattleManager.makeEscapeRatio = function() {
    this._escapeRatio = 0; // fails the first time, 10% afterwards
};

you can always set it not able to as well, but require further modification.
So now that I have changed my mind on what I want to do, and I hate to ask this after everyone has tried to help me with my previous request... but that "drop currency on escape" plugin I found, drops based on how much the monsters would have if killed. I want to have a value I can modify that is just % of personal currency. And it would need to have a customizable text for what the currency is, since in my game it is not called gold. I am thinking drop 5% of personal currency on every escape, but I want to balance it, so want to be able to fiddle. I am willing to pay a buck or two for this as well, if it's on itch.io to make it easy to pay.

EDIT: And, barring that, I got custom escape rates working. In addition to putting // in front of the previously shown lines, also had to do it with this one:
1736132596017.png

Original thread: https://forums.rpgmakerweb.com/threads/need-help-making-an-battle-escape-plugin.174436/