DoubleX RMVXA ATB Addon to YSA Battle System: Classical ATB

DoubleX RMVXA ATB Addon v1.00b to YSA Battle System: Classical ATB​
by DoubleX​

Prerequisites

DoubleX RMVXA Bug Fixes to YSA Battle System: Classical ATB

http://forums.rpgmakerweb.com/index.php?/topic/22142-doublex-rmvxa-bug-fixes-to-ysa-battle-system-classical-atb/

YSA Battle System: Classical ATB(Created by Yami)

http://yamiworld.wordpress.com/rgss3/battle-scripts/yeas-add-on/ysa-battle-system-classical-active-time-battle/

Introduction

Lets users to set the formula for battler's atb bar filling speed

Spoiler
#==============================================================================|# ** You only need to edit this part as it's about what this script does |#------------------------------------------------------------------------------|module DoubleX_RMVXA module YSA_CATB_ATB_Addon # The atb increment per frame is: # CATB_GAIN_MODIFIER * MAX_CATB_VALUE / $game_system.catb_fill_time # MAX_CATB_VALUE is equal to 100000.0 # $game_system.catb_fill_time is DEFAULT_FILL_TIME or FILL_TIME_VARIABLE # CATB_GAIN_MODIFIER default is "agi.to_f / BattleManager.average_agi" # agi.to_f is battler's agi # BattleManager.average_agi is the average agi of all battlers CATB_GAIN_MODIFIER = "agi.to_f / BattleManager.average_agi" end # YSA_CATB_ATB_Addonend # DoubleX_RMVXA#==============================================================================|
Features

Little scripting knowledge is needed to use or edit this script

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
None

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.00b(GMT 0200 3-5-2014):

- Increased the efficiency of this script

v1.00a(GMT 0600 5-7-2014):

- 1st version of this script finished

(DoubleX)YSA CATB ATB Addon v1.00b.txt
Nice one, I was trying to figure this out myself. Any chance of implement a way to directly increase or decrease the ATB? (Like a "Knockback" skill that sets the target back on their AT😎.
Nice one, I was trying to figure this out myself. Any chance of implement a way to directly increase or decrease the ATB? (Like a "Knockback" skill that sets the target back on their AT😎.
You can try this to change the target's atb by a specified amount only right after a specified state hits that target:

CATB_GAIN_MODIFIER = "@frame_count ||= 0; @even_add_atb = false if @even_add_atb == nil; @odd_add_atb = false if @odd_add_atb == nil; @frame_count %= 2; @frame_count % 2 == 0 ? @even_add_atb = state?(STATE_ID) : @odd_add_atb = state?(STATE_ID); value = @frame_count % 2 == 0 && @even_add_atb && !@odd_add_atb || @frame_count % 2 == 1 && !@even_add_atb && @odd_add_atb ? ATB_CHANGE : agi.to_f / BattleManager.average_agi; @frame_count += 1; value"STATE_ID is the id of the specified state triggering the atb change with a specified amount and ATB_CHANGE is that specified amount.

Note that the real change amount is ATB_CHANGE * MAX_CATB_VALUE / $game_system.catb_fill_time

It affects charging and cooldown(if you use my cooldown addon as well) as well, as they both also use the CATB_GAIN_MODIFIER to update their values.

This whole thing doesn't work if the target isn't movable or that target's atb bar is already full(except when charging or cooldown) as there's no atb gain under either case and thus CATB_GAIN_MODIFIER won't be used.
Thanks, I'll see if I can make this work!
Updates

v1.00b(GMT 0200 3-5-2014):

- Increased the efficiency of this script

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