Hello, I made a thread since I had replied to an old one, but the line "0.5 * $gameParty.agility() / $gameTroop.agility()" which is the escape rate is not enough as for normal monsters I want a way to make the escape rate like 95% chance instead of unable to run every time, and on top of that is there a way to make an item to reduce encounter rates while equipped or used?
thank you in advance, just wondered on what i should change in the line of code to make it so people can run all the time unless scripted otherwise
1) the escape rate increases for every failed attempt, and if you want the player to escape more often simply reduce the enemy agility.
for more changes you'll need a plugin.
2) please check the "other" traits in the database. Those can be given to equipment and then the effect is active as long as that item is equipped.
there is no way to make an "item in inventory" do the same.
ok thanks, I only gave enemies higher agility to attack first, i will have to have another play around, the editing did not work however as it would not start the game, thank you for the time
thanks, I tried it but still appear unable to run, I might just decrease the amount of exp if people cant run as much, at least they wont be overleveled after first small dungeonlike area 🙂 thank you though
...can you post what you changed? And what it says when you try to play the game? If you followed my instructions, there's no reason it should stop the game from running.
And yes, personally, I would not design my game around the presumption that people want to run a lot. I would make fewer encounters or fights easier or combat more fun. But still, this should work.
BattleManager.processEscape = function() {
$gameParty.performEscape();
SoundManager.playEscape();
var success = this._preemptive ? true : Math.random() < 0.9;
if (success) {
this.displayEscapeSuccessMessage();
this._escaped = true;
this.processAbort();
} else {
this.displayEscapeFailureMessage();
this._escapeRatio += 0.1;
$gameParty.clearActions();
this.startTurn();
}
return success;
};
when in encounters it still says failed to run, the game started after the typo but for some reason im unable to run right away from battles, just done a test few and its taking 5-6 turns to successfully run away, thank you for the patience
Did you start a new game after making the change? Loading a save game won't load any changes to the code.
Aside from that...your change is correct, so it could only be bad luck. You should be, on average, escaping 9 times out of 10.
i did i havnt had a save, i tend to make a start point and test from there after knowing cutscenes are working, il try again soon though, might just be very bad luck on my end :/ (knowing me i live on bad luck lol)
and tried again 5 times in a row and still unable to escape and died to poison lol
Huh. I don't see any place else that would be creating any odds of success, and my math doesn't look wrong to me.
Maybe someone will see a mistake and offer a correction, but here's something you can try - like I mentioned in my earlier reply, just make that entire line say var success=true;
Then you should have guaranteed success every time, unless there's some other function I haven't found getting involved.
Or you may be using a plugin that already offers you control over the escape odds, which would be overwriting any changes you make to this base code.
i just tried that and still 1 out of 6 attempts im escaping now but at least i can escape on the odd try lol i dont know if its due to enemy agility though as i wanted it to b a bit higher just so they can outspeed my players or hit first, i would show you it all if it was possible but i cant really screenshare it
Edit: (sorry edited as it wasnt clear) I have that plugin already, but what do i change in that one then if its the case? and i feel quite stupid knowing i had a plugin causing the problem (the yanfly battle engine core one)