Making a guaranteed escape from battle item/skill

How would I go about making an item or skill that guarantees escape from battle?

I tried creating an item and setting "special effect" to escape but only the one that used it runs from battle while the rest of the party is still there. So, I tried setting it to entire party, but if an actor is dead, it leaves him behind and results in a battle loss. So, that is not it either.


How would I go about making this skill or item?
How would I go about making an item or skill that guarantees escape from battle?

I tried creating an item and setting "special effect" to escape but only the one that used it runs from battle while the rest of the party is still there. So, I tried setting it to entire party, but if an actor is dead, it leaves him behind and results in a battle loss. So, that is not it either.


How would I go about making this skill or item?
If you were to have all active members use this skill/item and left the one dead actor on the battlefield then wouldn't it still be a loss?

For individual actors leaving, I'm not sure how to do that. I think some battle systems have that, but I'm not sure how they did it.
As for the whole group leaving, this can be done.
You need to copy the process escape or abort or victory from battlemanager and tweak it for how you want, and give it a different name.
Choose how you want it to react.
Are you allowing gold and exp gain to run -> victory.
Are you allowing escape by chance -> escape
Are you allowing escape no matter what -> abort

You can combine part of each to make what you want.
Ruby:
module BattleManager
    def self.get_out_of_here
        # do stuff
        SceneManager.return
        battle_end(#) <- number is 0 for victory, 1 for abort
    end
end

It may work best if you had the skill/item call a common event and in the CE you do a script command to call the battlemenager method

The ce would just simply call BattleManager.get_out_of_here

Original thread: https://forums.rpgmakerweb.com/threads/making-a-guaranteed-escape-from-battle-item-skill.157717/