"Escape" Command Activating a Common Event?

Cuprite

Previously Golden
Veteran
Joined
Feb 6, 2017
Messages
84
Reaction score
34
First Language
English
Primarily Uses
RMMV
Is it possible to have the in-battle "Escape" command activate a common event instead of the default escape event (Without editing RMMV itself)?
Because I've changed the "Escape" skill in the skills list to activate a common event, but it still does the default escape, so I assume it has nothing to do with that skill.

EDIT:
Basically, I'm trying to make it so the game asks if you want to run away.
If you say yes, you'll escape (guaranteed escape) and gain a state that will wear off after 50 steps, but if you get into another fight with the state active, you won't be able to run away (Not using random encounters).

EDIT:
I have it mostly figured out, but after escaping once, the next battle you go into soft-locks the game. I have no idea why.

EDIT: It was because the skill was instant cast. More details below.
 
Last edited:

Cuprite

Previously Golden
Veteran
Joined
Feb 6, 2017
Messages
84
Reaction score
34
First Language
English
Primarily Uses
RMMV
Sorry, I should have been more specific. I was kinda vague about what I was trying to do. My bad. .-.
SRD's Battle End Events plugin only works after you've run away from battle. Basically, I'm trying to make it so the game asks if you want to run away.
If you say yes, you'll escape (guaranteed escape) and gain a state that will wear off after 50 steps, but if you get into another fight with the state active, you won't be able to run away (Not using random encounters).

(I'll edit the original post with this.)
 

Cuprite

Previously Golden
Veteran
Joined
Feb 6, 2017
Messages
84
Reaction score
34
First Language
English
Primarily Uses
RMMV
You can add a custom escape skill to your actors' command list using these plugins:

http://himeworks.com/2015/12/actor-battle-commands/
http://himeworks.com/2015/12/battle-command-use-skill/
For the most part, this works. There's only two problems I'm having.
It doesn't seem to be compatible with Yanfly's Equip Skills plugin. It just show's the class's available skill types rather than the universal "Skills" menu with 6 slots.
It's also treating the escape as a defeat, playing the defeat sound effect and showing a text box saying, " was defeated...".
EDIT: It also seems to not inflict the "Escapee" state like it should.
This is how I have the common event set up.
◆If:Crystal is affected by Escapee
◆Text:None, Window, Bottom
: :The party can't run away!

:Else
◆If:Jade is affected by Escapee
◆Text:None, Window, Bottom
: :The party can't run away!

:Else
◆If:Ebony is affected by Escapee
◆Text:None, Window, Bottom
: :The party can't run away!

:Else
◆If:Skye is affected by Escapee
◆Text:None, Window, Bottom
: :The party can't run away!

:Else
◆If:Cloud is affected by Escapee
◆Text:None, Window, Bottom
: :The party can't run away!

:Else
◆If:Cyra is affected by Escapee
◆Text:None, Window, Bottom
: :The party can't run away!

:Else
◆If:Joshua is affected by Escapee
◆Text:None, Window, Bottom
: :The party can't run away!

:Else
◆Text:None, Dim, Bottom
: :Are you sure you want to run away?
: :\c[18]*NOTE: If you escape, all party members will have their Max HP cut by 10% until
: :you've walked 50 steps. You'll also be unable to run away from future battles until then.*
◆Show Choices:Run Away, Fight (Dim, Middle, #1, #2)
:When Run Away
◆Change State:Entire Party, + Escapee
◆If:Crystal is in the party
◆Force Action:Crystal, Run Away, Last Target

:Else
◆If:Jade is in the party
◆Force Action:Jade, Run Away, Last Target
◆If:Ebony is in the party
◆Force Action:Ebony, Run Away, Last Target
◆If:Skye is in the party
◆Force Action:Skye, Run Away, Last Target

:Else
◆If:Cloud is in the party
◆Force Action:Cloud, Run Away, Last Target

:Else
◆If:Cyra is in the party
◆Force Action:Cyra, Run Away, Last Target

:Else
◆If:Joshua is in the party
◆Force Action:Joshua, Run Away, Last Target

:Else

:End

:End

:End

:End

:Else

:End

:Else

:End

:End

:When Fight

:End

:End

:End

:End

:End

:End

:End

:End
EDIT: The skill being used is an Instant Cast, so deciding not to run away doesn't waste a turn.
I have it so it activates another skill also called "Run Away" that activates "Special Effect: Escape" so I don't understand why it's treating it as a defeat.
I've also tried putting the two plugins under the Equip Skills and ESB Allowed Types plugins, but it still doesn't show "Skills."
Is it even possible for me to do this, or am I going to need to use the default?

*NOTE: Cloud is a white wolf, not a human. I'm not ripping of FF7 I swear!
 

JGreene

Veteran
Veteran
Joined
Oct 24, 2015
Messages
375
Reaction score
292
First Language
English
Primarily Uses
RMMV
:When Run Away
◆Change State:Entire Party, + Escapee
◆If:Crystal is in the party
◆Force Action:Crystal, Run Away, Last Target

:Else
◆If:Jade is in the party
◆Force Action:Jade, Run Away, Last Target
◆If:Ebony is in the party
◆Force Action:Ebony, Run Away, Last Target
◆If:Skye is in the party
◆Force Action:Skye, Run Away, Last Target

:Else
◆If:Cloud is in the party
◆Force Action:Cloud, Run Away, Last Target

:Else
◆If:Cyra is in the party
◆Force Action:Cyra, Run Away, Last Target

:Else
◆If:Joshua is in the party
◆Force Action:Joshua, Run Away, Last Target
BattleManager._subject.forceAction(skillId, -2);

Use that line as a script call instead of all the Force Actions you have going on. You don't need an actor ID, just the custom Escape skill ID

Edit: And something that you could try doing if all else fails is skipping the choice menu and extra skill cast and just warn the player in the game tutorial or whatever about the penalty for escaping. Just a suggestion to save some headache lol
 
Last edited:

Cuprite

Previously Golden
Veteran
Joined
Feb 6, 2017
Messages
84
Reaction score
34
First Language
English
Primarily Uses
RMMV
BattleManager._subject.forceAction(skillId, -2);

Use that line as a script call instead of all the Force Actions you have going on. You don't need an actor ID, just the custom Escape skill ID
I don't know if I'm messing something up here (I assume I am), but it doesn't force the action at all. It just inflicts the state. I also tried using Abort Battle, but then it got rid of the state after exiting the battle (Even though it isn't set to remove after battle end).
My other escape skill is id 5, so I replaced skillId with 5. Unless it starts with 0 (As in skill 1 would be represented as 0, 2 as 1, etc.), I'm not sure what I'm doing wrong here.
 

JGreene

Veteran
Veteran
Joined
Oct 24, 2015
Messages
375
Reaction score
292
First Language
English
Primarily Uses
RMMV
Well I've tested it, and the escape skill won't work as an instant cast. You'll need to make it's speed high enough to it always goes first. The other problem is that it will make your party escape, but won't end the battle (causing the game to freeze on the battle map). I'm stumped tbh.

Edit: I would just use the SRD Battle End Events plugin to add the state to your party after they escape, and skip the choices like I stated earlier.
 
Last edited:

Cuprite

Previously Golden
Veteran
Joined
Feb 6, 2017
Messages
84
Reaction score
34
First Language
English
Primarily Uses
RMMV
Well I've tested it, and the escape skill won't work as an instant cast. You'll need to make it's speed high enough to it always goes first. The other problem is that it will make your party escape, but won't end the battle (causing the game to freeze on the battle map). I'm stumped tbh.

Edit: I would just use the SRD Battle End Events plugin to add the state to your party after they escape, and skip the choices like I stated earlier.
I removed the instant cast part from the forced skill to see if it froze for me, but it just did the same thing as before.
I guess I'll try using SRD's Battle End Events again.
At the beginning of the game, I'm going to have the player obtain a tutorial book, so I guess it wouldn't be completely out of nowhere.
I guess I could live with it just cutting Max HP to 90%. Of course, I'd change it to either being removed after a larger amount of steps or until you get to an inn/healing area or with a rare item specifically for the state (More similar to the original inspiration for this mechanic, The Alliance Alive).
On the bright side, I get to make this dumb joke!
Runawaid.PNG
Edit: It still gets rid of the state at the end of battle. It shouldn't be doing this!
Edit (Again): Just realized it was because the battle was set to "Recover All" after escaping. Oops. :hswt:
 
Last edited:

Neo Soul Gamer

Veteran
Veteran
Joined
Aug 10, 2012
Messages
632
Reaction score
352
First Language
English
Primarily Uses
N/A
@Cuprite
I saw that you came across my tutorial earlier. If you're using that same method for the escape skill, then I have something that works:

First thing you have to do is create a common event. Inside that common event will be a choice event that controls a switch. You can take a look at the image here:
upload_2018-8-5_16-51-49.png

Then, in the Escape skill that you would have made based on my tutorial, you can use the following action sequence:

Code:
<SETUP ACTION>
eval: $gameTemp.reserveCommonEvent(7)
if $gameSwitches.value(4)
 clear battle log
 display action
 OPACITY all actors: 0%, 30
 eval: BattleManager.processEscape()
else
 wait: 10
end
</SETUP ACTION>

The first line you see executes common event 7 (change the ID number to match your own common event).
The second line is conditional branch that checks to see if Switch ID 4 is on or off. (Again, change the Switch ID number if necessary) The switch ID will be set based on the choice that's made with the common event. If it's turned on, the escape is processed. If it's turned off, the battler will do nothing and the turn will pass as normal. You will have to set up your own action sequencing here in case you have any unique effects.

Hope this helps!
 

Cuprite

Previously Golden
Veteran
Joined
Feb 6, 2017
Messages
84
Reaction score
34
First Language
English
Primarily Uses
RMMV
@Cuprite
I saw that you came across my tutorial earlier. If you're using that same method for the escape skill, then I have something that works:

First thing you have to do is create a common event. Inside that common event will be a choice event that controls a switch. You can take a look at the image here:

Then, in the Escape skill that you would have made based on my tutorial, you can use the following action sequence:

Code:
<SETUP ACTION>
eval: $gameTemp.reserveCommonEvent(7)
if $gameSwitches.value(4)
 clear battle log
 display action
 OPACITY all actors: 0%, 30
 eval: BattleManager.processEscape()
else
 wait: 10
end
</SETUP ACTION>

The first line you see executes common event 7 (change the ID number to match your own common event).
The second line is conditional branch that checks to see if Switch ID 4 is on or off. (Again, change the Switch ID number if necessary) The switch ID will be set based on the choice that's made with the common event. If it's turned on, the escape is processed. If it's turned off, the battler will do nothing and the turn will pass as normal. You will have to set up your own action sequencing here in case you have any unique effects.

Hope this helps!
Other than the battle menu having empty spaces where icons could be (I disabled them), this works perfectly!
BattleActionSelect.PNGBattleActionSelect2.PNG
I've also decided to make it so if the party already has the state, it'll skip the confirmation. The state would also need to be healed via item or inn.
Thanks! :hhappy:
 
Last edited:

Cuprite

Previously Golden
Veteran
Joined
Feb 6, 2017
Messages
84
Reaction score
34
First Language
English
Primarily Uses
RMMV
Update: After escaping once, the next battle you go into soft-locks the game. I have no idea why.
BattleEscapeStuck.PNG
EDIT: It was because the skill was instant cast. I understand what JGreene meant by the game freezing on the battle map now.
Unless I can think of a workaround for this, I'll have to do what he said before and skip the warning...
If only it'd work as an instant cast...
 
Last edited:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

I love the Time Fantasy tiles, but haven't played anything made with it yet. Can anyone recommend me something?
Vote for what I show more indepth on Twitter tomorrow from the MZ default resources
Oh look, 12 more free Daz3D models. *adds them to his collection * Yes, the fools... Give it a few months and my collection will be crazy, all without paying a dime. I still have no idea if I'll ever learn the software, but hey... Just in case, these models are quite expensive. In two weeks, they've already given me almost $400 worth of free models. :LZSexcite:
Not easy to find DS resources, is it? I need to make a good compilation thread linking to all the artists that do DS...
Spent a whole evening planning Stats, Animations, Abilities of 24 different weapons.. Only to realize I was just Bloating the Game. In the end i decided to stick with only 6.

Forum statistics

Threads
99,351
Messages
964,377
Members
130,951
Latest member
MXTURBO
Top