FF1-like escape system help

So I'm trying to make escaping work so that the actors make the action of escape, rather than the entire party, but the entire party escapes, with the chances of success depending on class, like in the first Final Fantasy, but I can't seem to get it to work. Any help would be greatly appreciated.
Bump
What have you done so far? What have you tried? What happens when you do it? Don't say "it doesn't work" - say "nothing happens" or if there's an error, say what it is.
What I tried is using a script (Yanfly Engine Core, I think) to remove the "Escape" option from the "Fight" and "Escape" options at the start of the battle, and gave each class a skill that was Escape that has different success chances, and set it to the entire party as it's range. What happened was that when it was successful, that actor would be gone for the entirety of the battle scene, and if the remaining actors died, game over like usual, but if the battle was won and it went back to the main scene, the actor was back. No errors, per say, but this would obviously not be acceptable in a finished product.
Do you want the whole party to run when a character casts the "run" skill?
Do you want the whole party to run when a character casts the "run" skill?

Yes, that is exactly what I'm trying to do. If you can help me in any way, I'd love that.
If that is all you need then just have your Escape skill call a common event, add a script call to that common event (3rd page, last button on the right) and write this:
Code:
BattleManager.process_escape
This makes your whole party run away from battle.
Thanks! I'll try it in a bit!
You re welcome. Keep in mind that it works provided that you are not using something that changes the battle system. And on top of it you escape when the character using that skill acts. You cannot escape as soon as you select "Skills > Escape" but you have to actually wait until your actor performs his/her own action to successfully run away from the battle.
I got the error
"Script 'Game_Interpreter' line 1411: NameError occurred

undefined local variable or method `change_event's for BattleManager:Moduler "

I am using the Ace Core Engine and Ace Battle engine, is that the problem?
Ace Core Engine and Ace Battle engine
Are those scripts?
Yes, yanfly scripts. YEA Core Engine and YEA Battle Engine
Then there is a high chance that one of them interacts with methods of BattleManager module. I should take a look at them to know what changes and what not.
interacts with methods of BattleManager module
They both have battlemanager in them, but I don't think this is the problem. I just did this test and it works fine.
I would say @Petorius put the command in the wrong place.
Thanks @Roninator2 for testing it. Your help is much appreciated.
I am currently busy and unable to check, but when I have a chance I'll check to see if any of the scripts I'm using have battlemanager in them, and if they don't, I'll double check to see if I made a stupid mistake. Thank you both for all the help you have offered already.
Wow, this makes me look really stupid, but what happened was in the Module BattleManager at line 221-222 it says

"if success
process_abort
I don't remember doing this, but for some reason I changed it to
if success
scene_change
So at that point, not even the normal escape would work. Once again, I thank you all for your help. I probably could not have done it without you, and even if I could, it would have been very frustrating and time consuming. So once again, I thank you, and am glad that RPG Maker has such an awesome community. I will be sure to credit both of you.
Although, one slight problem, if it's not easily taken care of, I don't need it, but escape chance is 100 percent. Even when the skill "misses". Is there a way to fix this?
That is something you have to set up in your event. There are few ways you can do this and how you do it is ultimately your choice. One possible option would be to store actors' escape chance in a variable and determine success chance by comparing that variable with a randomized value.
Code:
escape_successfull = ($game_variables[your_var_id] < rand(100))
BattleManager.process_escape if escape_successfull
Another way would be to mark the actor trying to escape with a state and have a different chance based on the actor's class. If that is the case you can just have your common event check actors' states and then compare the random value with the respective escape chance for that actor.
Code:
$game_party.each.with_index do |m, i|
  if m.state?(your_escape_state_id)
    BattleManager.process_escape if ((rand(100) < $game_variables[your_var_id][i-1])
  end
end
In this example I am assuming you stored each actor escape chance in an array variable so that you can access them using your actor id later on.
So would I put this in the "Script" command on the common event page?

Original thread: https://forums.rpgmakerweb.com/threads/ff1-like-escape-system-help.106236/