DoubleX RMVXA Escape Addon to YSA Battle System: Classical ATB


DoubleX RMVXA Escape Addon v1.02c to YSA Battle System: Classical ATB
​


by DoubleX
​




Prerequisites


DoubleX RMVXA Bug Fixes to YSA Battle System: Classical ATB


YSA Battle System: Classical ATB(Created by Yami)


Introduction


With this script, each failed escape clears charge bar and consumes 1 action time of all battlers. Those with action times <= 1(0 here means atb bar not full) will have atb bar cleared after a failed escape.

Spoiler
 




# This feature needs
# DoubleX RMVXA Action Addon to YSA Battle System: Classical ATB
# ESCAPE_ACTION, default = 1
# All party members need ESCAPE_ACTION actions to make a party escape
ESCAPE_ACTION = 1

# This feature needs
# DoubleX RMVXA Cooldown Addon to YSA Battle System: Classical ATB
# ESCAPE_COOLDOWN, default = 0
# All party members will cooldown with rate ESCAPE_COOLDOWN after
# failed escapes
# Setting ESCAPE_COOLDOWN as 0 will disable this feature
ESCAPE_COOLDOWN = 0

# This feature needs decent understanding of RGSS3 and YSA-CATB scripts
# ESCAPE_CONDITION, default =
%Q(@action_actors.size < $game_party.members.size ||
@action_actors.any? { |actor| actor.catb_action_times < ESCAPE_ACTION ||
actor.ct_catb_value > 0 ||
$imported["DoubleX RMVXA Cooldown Addon to YSA-CATB"] &&
actor.cd_catb_value > 0 })
# ESCAPE_COMDITION must be met to be possible to make a party escape
ESCAPE_CONDITION = %Q(@action_actors.size < $game_party.members.size ||
@action_actors.any? { |actor| actor.catb_action_times < ESCAPE_ACTION ||
actor.ct_catb_value > 0 ||
$imported["DoubleX RMVXA Cooldown Addon to YSA-CATB"] &&
actor.cd_catb_value > 0 })

# This feature needs
# DoubleX RMVXA Reset Addon to YSA Battle Add-on: Lunatic CATB Reset
# ESCAPE_RESET, default = "0"
# Sets the Party escape reset value as an actual value ESCAPE_RESET
# The default MAX_CATB_VALUE is 100000.0
ESCAPE_RESET = "0"



Video










Features
Plug and play(You don't need to edit anything in this script but you may still do so)

How to use
Open the script editor and put this script into an open slot between the script DoubleX RMVXA Bug Fixes to YSA Battle System: Classical ATB and Main. Save to take effect.

FAQ
Q1: How can I set ESCAPE_CONDITION without any scripting nor YSA-CATB scripts knowledge? For me its default value is just incomprehensible.


A1: You can ask here for ways to setup specific escape conditions but I don't think I'm good enough to be a scripting teacher(and I used an entire week just to briefly understand the original YSA-CATB script) 🙂

Credit and Thanks
DoubleX(Giving me credit is completely optional)
The terms of use are the same as that of YSA Battle System: Classical ATB except that you must also give Yami credit(you should do this anyway) if you give DoubleX or his alias credit
 
Compatibility
Same as that of YSA Battle System: Classical ATB
 
Changelog


v1.02c(GMT 1200 25-2-2014):


- In sync with the latest version of other CATB scripts


v1.02b(GMT 1400 19-9-2014):


- Fixed ESCAPE_ACTION and ESCAPE_COOLDOWN not working bug


v1.02a(GMT 0700 4-9-2014):


- Added ESCAPE_ACTION, ESCAPE_COOLDOWN, ESCAPE_CONDITION and ESCAPE_RESET


v1.01a(GMT 0900 13-2-2014):


- Compatible with DoubleX RMVXA Constants Edit


v1.00a(GMT 0400 13-1-2014):


- 1st version of this script finished


(DoubleX)YSA CATB Escape Addon v1.02c.txt
I'm glad I found this script, I was testing out battles and thought "Man, I can just spam Escape and at some point, I'll probably be able to." With this, it makes escaping during battle much more fair. Thank you.
Updates

v1.02b(GMT 1400 19-9-2014):

- Fixed ESCAPE_ACTION and ESCAPE_COOLDOWN not working bug

v1.02a(GMT 0700 4-9-2014):

- Added ESCAPE_ACTION, ESCAPE_COOLDOWN, ESCAPE_CONDITION and ESCAPE_RESET
Updates

v1.02c(GMT 1200 25-2-2014):

- In sync with the latest version of other CATB scripts
I plugged this and the prerequisite Bug Fix patch in. Now, whenever I'm in battle, the escape menu doesn't come up at all. This is using the classical atb and Symphony Engine for side view. Have you seen this before?
May you please post a video and/or give me your project so I can know more details about this?
May you please post a video and/or give me your project so I can know more details about this?


Whups someone warned me to just message directly instead of having the whole game up.
My testing shows the escape works fine without the escape add-on script. I did not have any issues getting to the escape option.
I think it's due to this configuration:
Code:
    # This feature needs decent understanding of RGSS3 and YSA-CATB scripts
    # ESCAPE_CONDITION, default =
    %Q(@action_actors.size < $game_party.members.size ||
    @action_actors.any? { |actor| actor.catb_action_times < ESCAPE_ACTION ||
    actor.ct_catb_value > 0 ||
    $imported["DoubleX RMVXA Cooldown Addon to YSA-CATB"] &&
    actor.cd_catb_value > 0 })
    # ESCAPE_COMDITION must be met to be possible to make a party escape
    ESCAPE_CONDITION = %Q(@action_actors.size < $game_party.members.size ||
    @action_actors.any? { |actor| actor.catb_action_times < ESCAPE_ACTION ||
    actor.ct_catb_value > 0 ||
    $imported["DoubleX RMVXA Cooldown Addon to YSA-CATB"] &&
    actor.cd_catb_value > 0 })
The default value means that, in order for the escape option to be available, the following conditions must be met:
1. All actors have full atb
2. All actors have enough action slots for the escape action(for those using the action addon as well)
3. All actors aren't already charging actions
4. All actors aren't already cooling down(for those using the cooldown addon as well)

To remove all these constraints, simply change ESCAPE_CONDITION to this instead:
Code:
ESCAPE_CONDITION = %Q(false)
Of course, this still doesn't mean the escape option's always available, like those explicitly disallowed by the bug fix 🙂

Original thread: https://forums.rpgmakerweb.com/threads/doublex-rmvxa-escape-addon-to-ysa-battle-system-classical-atb.22286/