DoubleX RMMV Popularized ATB Core

Note
This plugin's available for commercial use

Purpose
To be an easy, simple and user-friendly, yet powerful atb system
Serves as the core plugin implementing all atb system essentials

Patches
PATB Patch(Cinnamon)

Compatibility Fix
DoubleX RMMV Popularized ATB Compatibility

Addons
DoubleX RMMV Popularized ATB Bar
DoubleX RMMV Popularized ATB Charge
DoubleX RMMV Popularized ATB Clock
DoubleX RMMV Popularized ATB Cooldown
DoubleX RMMV Popularized ATB Countdown
DoubleX RMMV Popularized ATB CTB
DoubleX RMMV Popularized ATB Delay
DoubleX RMMV Popularized ATB Event
DoubleX RMMV Popularized ATB Force
DoubleX RMMV Popularized ATB Hotkey
DoubleX RMMV Popularized ATB Order
DoubleX RMMV Popularized ATB Rate
DoubleX RMMV Popularized ATB SE
DoubleX RMMV Popularized ATB Start
DoubleX RMMV Popularized ATB Turn

Games using this plugin
None so far

Configurations
  1. * @param battle_system_code
  2.  * @desc Sets the code indicating if ATB or the default battle system will be
  3.  *       used as battle_system_code
  4.  *       Available codes for battle_system_code:
  5.  *       atb - ATB will be used
  6.  *       The default battle system will be used if battle_system_code doesn't
  7.  *       return any available code
  8.  *       battle_system_code must not be changed from the available codes to the
  9.  *       unavailable ones during the same battle(the same for the vice versa) or
  10.  *       this plugin will fail extremely badly
  11.  * @default atb
  12.  *
  13.  * @param base_fill_time
  14.  * @desc Sets the base atb fill time from empty to full as base_fill_time
  15.  *       seconds
  16.  *       base_fill_time must return a Number and should return a positive one
  17.  * @default 5
  18.  *
  19.  * @param turn_unit_code
  20.  * @desc Sets the code of the unit of the battle turn clock as turn_unit_code
  21.  *       Available code for the unit of the battle turn clock:
  22.  *       act - Number of executed actions
  23.  *       sec - Seconds
  24.  *       The battle turn clock won't run if turn_unit_code doesn't return an
  25.  *       available code
  26.  * @default sec
  27.  *
  28.  * @param max_turn_unit
  29.  * @desc Sets the maximum battle turn clock unit as max_turn_unit
  30.  *       max_turn_unit must return a Number and should return a positive one
  31.  * @default 5
  32.  *
  33.  * @param wait_cond_code
  34.  * @desc Sets the atb wait condition code as wait_cond_code
  35.  *       Available atb wait condition codes:
  36.  *       full - Wait only when a message's showing or an event's running
  37.  *       act - Wait when an action's executing as well
  38.  *       target - Wait when the target selection window's shown as well
  39.  *       item - Wait when the skill/item selection window's shown as well
  40.  *       "Wait when players can input actions as well" will be used if
  41.  *       wait_cond_code doesn't return any available code
  42.  *       Only 1 battler can execute actions at a time
  43.  *       Only 1 action can be executed at a time
  44.  * @default full
  45.  *
  46.  * @param atb_fill_code
  47.  * @desc Sets the atb fill code as atb_fill_code
  48.  *       Available atb fill code:
  49.  *       delay - Lets battlers input actions when that battler's atb's empty
  50.  *               Refills that battler's atb right after executing actions
  51.  *       If atb_fill_code doesn't return an available atb fill code, "Lets
  52.  *       battlers input and execute actions when the battler's atb's full and
  53.  *       empties the battler's atb right after executing actions" will be used
  54.  *       atb_fill_code should return the same code during the same battle to
  55.  *       ensure proper atb fillings and action executions
  56.  * @default fill
  57.  *
  58.  * @param max_atb_val
  59.  * @desc Sets the minimum atb value regarded as overlay(also the maximum atb
  60.  *       value displayed on the atb bars) with atb fill code delay, and the
  61.  *       maximum atb value with other codes, as max_atb_val
  62.  *       max_atb_val must return a nonzero Number and should return a positive
  63.  *       one
  64.  *       max_atb_val should return the same value during the same battle to
  65.  *       ensure proper atb fillings and action executions
  66.  *       max_atb_val must be at least 10000 times larger than 2 ^ -52
  67.  * @default 100
  68.  *
  69.  * @param atb_rate_code
  70.  * @desc Sets the atb refill rate code as atb_rate_code
  71.  *       Available atb refill rate codes:
  72.  *       abs_agi - agi
  73.  *       agi - agi * max_atb_val / base_fill_time / 60
  74.  *       avg_agi - (formula in agi) / average of all alive battlers' agi
  75.  *       The fps is assumed to be always 60
  76.  *       If atb_rate_code returns an unavailable atb refill rate code, it'll be
  77.  *       the same as avg_agi, except BattleManager.patb_avg_agi will always be
  78.  *       reevalauted when it can change instead of just upon battle start
  79.  *       atb gain rate must be at least 2 ^ -52 * max atb value * 100 per frame
  80.  * @default update_avg_agi
  81.  *
  82.  * @param atb_start_code
  83.  * @desc Sets the starting atb value code as atb_start_code
  84.  *       The starting atb value is always 0 for:
  85.  *       - unmovable battlers with non-delay atb fill code
  86.  *       - actors with non-delay atb fill code and start type as surprise
  87.  *       - enemies with non-delay atb fill code and start type as preemptive
  88.  *       - actors with atb fill code delay and start type as preemptive
  89.  *       - enemies with atb fill code delay and start type as surprise
  90.  *       The starting atb value is always max_atb_val for:
  91.  *       - unmovable battlers with atb fill code delay
  92.  *       - actors with non-delay atb fill code and start type as preemptive
  93.  *       - enemies with non-delay atb fill code and start type as surprise
  94.  *       - actors with atb fill code delay and start type as surprise
  95.  *       - enemies with atb fill code delay and start type as preemptive
  96.  *       Available starting atb value code for normal start:
  97.  *       agi - max_atb_val * agi / max agi in non-delay atb fill code
  98.  *             max_atb_val * (1 - agi / this.paramMax(6)) in atb fill code
  99.  *             delay
  100.  *       The starting atb value will be 0 and max_atb_val in non-delay and
  101.  *       delay atb fill code respectively if atb_start_code doesn't return an
  102.  *       available starting atb value code for normal starts
  103.  * @default agi
  104.  *
  105.  * @param atb_reset_code
  106.  * @desc Sets the code of the reset atb mechanism as atb_reset_code for
  107.  *       additional effects
  108.  *       It'll only be used with non-delay atb_reset_code
  109.  *       The atb refill will always be freezed while not movable
  110.  *       Available code for the atb reset mechanism for additional effects:
  111.  *       clear - The atb will be emptied when becoming unmovable as well
  112.  *       No additional effects will trigger if atb_reset_code doesn't return
  113.  *       an available code
  114.  * @default clear
  115.  *
  116.  * @param max_linked_input_actors
  117.  * @desc Sets the maximum number of inputable actors that can proceed
  118.  *       inputting actions without any of them actually starting to charge
  119.  *       or execute any inputted ones as max_linked_input_actors
  120.  *       max_linked_input_actors should return the same value during the
  121.  *       same battle
  122.  *       Setting max_linked_input_actors as negative will disable this feature
  123.  *       This feature doesn't work well with any inputable actor having Action
  124.  *       Times +
  125.  *       Disabling this feature for available wait_cond_code is recommended
  126.  * @default 0
  127.  *
  128.  * @param no_prior_actor
  129.  * @desc (v1.03a+)Sets the previous command that would go to the previous(in
  130.  *       terms of party member index) inputable actor to go to the party command
  131.  *       window instead
  132.  *       Enabling this feature's recommended only with the hotkey addon
  133.  * @default false
  134.  *
  135.  * @param show_atb_bars
  136.  * @desc Sets the actor atb bars to be shown on the status window if
  137.  *       show_atb_bars is true
  138.  *       show_atb_bars should return the same value during the same battle to
  139.  *       ensure proper status window display
  140.  * @default true
  141.  *
  142.  * @param actor_name_w
  143.  * @desc Sets the maximum width allocated for actor name display on the status
  144.  *       window as actor_name_w
  145.  *       actor_name_w must return a positive Number
  146.  * @default 123
  147.  *
  148.  * @param actor_icon_ox
  149.  * @desc Sets the actor icon display area x offset relative to the actor name
  150.  *       display area on the status window as actor_icon_ox
  151.  *       actor_icon_ox must return a positive Number
  152.  * @default 6
  153.  *
  154.  * @param hp_bar_ox
  155.  * @desc Sets the actor hp bar display area x offset relative to the actor icon
  156.  *       display area on the status window as hp_bar_ox
  157.  *       hp_bar_ox must return a positive Number
  158.  * @default 6
  159.  *
  160.  * @param hp_bar_w
  161.  * @desc Sets the maximum width allocated for actor hp bar display on the status
  162.  *       window as hp_bar_w
  163.  *       hp_bar_w must return a positive Number
  164.  * @default 87
  165.  *
  166.  * @param mp_bar_ox
  167.  * @desc Sets the actor mp bar display area x offset relative to the actor hp
  168.  *       bar display area on the status window as mp_bar_ox
  169.  *       mp_bar_ox must return a positive Number
  170.  * @default 6
  171.  *
  172.  * @param mp_bar_w
  173.  * @desc Sets the maximum width allocated for actor mp bar display on the status
  174.  *       window as mp_bar_w
  175.  *       mp_bar_w must return a positive Number
  176.  * @default 87
  177.  *
  178.  * @param tp_bar_ox
  179.  * @desc Sets the actor tp bar display area x offset relative to the actor mp
  180.  *       bar display area on the status window as tp_bar_ox
  181.  *       tp_bar_ox must return a positive Number
  182.  * @default 6
  183.  *
  184.  * @param tp_bar_w
  185.  * @desc Sets the maximum width allocated for actor tp bar display on the status
  186.  *       window as tp_bar_w
  187.  *       tp_bar_w must return a positive Number
  188.  * @default 87
  189.  *
  190.  * @param atb_bar_ox
  191.  * @desc Sets the actor atb bar display area x offset relative to the actor
  192.  *       mp/tp bar display area on the status window as atb_bar_ox
  193.  *       atb_bar_ox must return a positive Number
  194.  * @default 6
  195.  *
  196.  * @param atb_bar_w
  197.  * @desc Sets the maximum width allocated for actor atb bar display on the
  198.  *       status window as atb_bar_w
  199.  *       atb_bar_w must return a positive Number
  200.  * @default 87
  201.  *
  202.  * @param atb_c1
  203.  * @desc Sets the 1st atb bar color as text color atb_c1
  204.  *       atb_c1 must return a valid text color code
  205.  *       atb_c1 should return the same value during the same battle to ensure
  206.  *       proper atb bar color displays
  207.  * @default 7
  208.  *
  209.  * @param atb_c2
  210.  * @desc Sets the 2nd atb bar color as text color atb_c2
  211.  *       atb_c2 must return a valid text color code
  212.  *       atb_c2 should return the same value during the same battle to ensure
  213.  *       proper atb bar color displays
  214.  * @default 8
  215.  *
  216.  * @param atb_overlay_c1
  217.  * @desc Sets the 1st atb bar overlay color as text color atb_overlay_c1
  218.  *       It'll only be used with atb value above max_atb_val
  219.  *       atb_overlay_c1 must return a valid text color code
  220.  *       atb_overlay_c1 should return the same value during the same battle to
  221.  *       ensure proper atb bar color displays
  222.  * @default 19
  223.  *
  224.  * @param atb_overlay_c2
  225.  * @desc Sets the 2nd atb bar overlay color as text color atb_overlay_c2
  226.  *       It'll only be used with atb value above max_atb_val
  227.  *       atb_overlay_c2 must return a valid text color code
  228.  *       atb_overlay_c2 should return the same value during the same battle to
  229.  *       ensure proper atb bar color displays
  230.  * @default 26
  231.  *
  232.  * @param atb_bar_text
  233.  * @desc Sets the atb bar description text as atb_bar_text
  234.  *       atb_bar_text should return the same value during the same battle to
  235.  *       ensure proper atb bar text displays
  236.  * @default AP
Expand to see the code.


Notetags
  1. *    # Actor/Class/Weapon/Armor/Enemy/State Notetags:                        
  2.  *      State notetags take the highest priority, followed by enemy, weapon,  
  3.  *      armor, class and actor                                                
  4.  *      1. <operator max patb val: val>                                      
  5.  *         - Assigns val to the battler's maximum atb value via operator      
  6.  *         - operator can be either =, +, -, *, / or %, meaning set to, add  
  7.  *           by, subtract by, multiply by, divide by or modulo by respectively
  8.  *         - All instances of this notetag will be used sequentially          
  9.  *         - The final max atb_value must be at least 10000 times larger than
  10.  *           2 ^ -52                                                          
  11.  *      2. <patb colors: text color 1, text color 2>                          
  12.  *         - Changes the atb bar color 1 and 2 to text color 1 and 2          
  13.  *           respectively when this notetag's used                            
  14.  *         - The 1st notetag that's being read by the battler will be used    
  15.  *      3. <patb overlay colors: text color 1, text color 2>                  
  16.  *         - Changes the atb overlay color 1 and 2 to text color 1 and 2      
  17.  *           respectively when this notetag's used                            
  18.  *         - The 1st notetag that's being read by the battler will be used    
Expand to see the code.


Plugin Calls
  1. *    # Configuration manipulations                                          
  2.  *      1. $gameSystem.patb.param                                            
  3.  *         - Returns the value of param listed in the plugin manager          
  4.  *      2. $gameSystem.patb.param = val                                      
  5.  *         - Sets the value of param listed in the plugin manager as val      
  6.  *         - All $gameSystem.patb.param changes will be saved                
  7.  *      3. $gameSystem.is_patb()                                              
  8.  *         - Returns if battle_system_code returns an available code          
  9.  *      4. $gameSystem.max_patb_turn_unit(unit)                              
  10.  *         - Returns the maximum global battle turn counter with unit as unit
  11.  *    # Data actor/class/weapon/armor/enemy/state manipulations              
  12.  *      1. meta.max_patb_val                                                  
  13.  *         - Returns the maximum atb value with the operator stored in        
  14.  *           <operator max patb val: val> in the form of [opeartor, val]      
  15.  *      2. meta.max_patb_val = [opeartor, val]                                
  16.  *         - Sets the maximum atb value with the operator stored in          
  17.  *           <operator max patb val: val> as string operator and Number val  
  18.  *         - The final max atb value must be at least 10000 times larger than
  19.  *           2 ^ -52                                                          
  20.  *         - All meta.max_patb_val changes can be saved if                    
  21.  *           DoubleX RMMV Dynamic Data is used                                
  22.  *      3. meta.patb_colors                                                  
  23.  *         - Returns the text colors stored in                                
  24.  *           <patb colors: text color 1, text color 2> in the form of        
  25.  *           [text color 1, text color 2]                                    
  26.  *      4. meta.patb_colors = [text color 1, text color 2]                    
  27.  *         - Sets the text colors stored in                                  
  28.  *           <patb colors: text color 1, text color 2> as text color 1 and 2  
  29.  *         - All meta.patb_colors changes can be saved if                    
  30.  *           DoubleX RMMV Dynamic Data is used                                
  31.  *      5. meta.patb_overlay_colors                                          
  32.  *         - Returns the text colors stored in                                
  33.  *           <patb overlay colors: text color 1, text color 2> in the form of
  34.  *           [text color 1, text color 2]                                    
  35.  *      6. meta.patb_overlay_colors = [text color 1, text color 2]            
  36.  *         - Sets the text colors stored in                                  
  37.  *           <patb overlay colors: text color 1, text color 2> as text color 1
  38.  *           and 2                                                            
  39.  *         - All meta.patb_overlay_colors changes can be saved if            
  40.  *           DoubleX RMMV Dynamic Data is used                                
  41.  *    # Battler manipulations                                                
  42.  *      1. max_patb_val
  43.  *         - Returns the battler's maximum atb value for all atb types
  44.  *      2. max_patb_val = val
  45.  *         - Sets the battler's maximum atb value for all atb types as val
  46.  *         - It'll be reevaluated if it can be changed without plugin calls
  47.  *      3. patb_val.atb
  48.  *         - Returns the battler's atb value
  49.  *      4. patb_val.atb = val
  50.  *         - Set the battler's atb value as val
  51.  *           (v1.04b+)Use fill_up_patb_val() instead if val = max_patb_val in
  52.  *           non-delay fill code and val = 0 in delay fill code, or the
  53.  *           battler would never be ale to input or execute actions
  54.  *      5. patb_rate.atb
  55.  *         - Returns the battler's atb rate
  56.  *      6. patb_rate.atb = rate
  57.  *         - Set the battler's atb rate as rate
  58.  *         - It'll be reevaluated if it can be changed without plugin calls
  59.  *      7. patb_val_change.atb = true
  60.  *         - Notifies that the atb value's changed
  61.  *         - It must be used right after the atb bar length changed
  62.  *      8. patb_note_change.note = true
  63.  *         - Notifies that the values of at least 1 notetag instance of
  64.  *           notetag note or the corresponding configuration value has changed
  65.  *         - Note can be max_atb_val, atb_color or atb_overlay_color,
  66.  *           referring to <operator max patb val: val>,
  67.  *           <patb colors: text color 1, text color 2>, and
  68.  *           <patb overlay colors: text color 1, text color 2> respectively
  69.  *      9. clear_patb()
  70.  *          - Same as calling reset_patb_val() and reset_patb()
  71.  *      10. reset_patb_val()
  72.  *          - Resets the battler's atb value to the maximum atb value in delay
  73.  *            fill mode and 0 if otherwise
  74.  *      11. reset_patb()
  75.  *          - Clears all battler's actions
  76.  *      12. patb_type()
  77.  *          - Returns the current atb type, which can be either atb, charge or
  78.  *            cooldown
  79.  *          - charge and cooldown will be available when corresponding addons
  80.  *            are used as well
  81.  *      13. patb_colors(type)
  82.  *          - Returns the text colors of the atb bars of type type, which can
  83.  *            be either atb, charge or cooldown
  84.  *          - The overlay colors will be returned instead if the atb value of
  85.  *            type type is greater than max_atb_val
  86.  *          - charge and cooldown will be available when corresponding addons
  87.  *            are used as well
  88.  *      14. fill_up_patb_val()
  89.  *          - (v1.04b+)Fully fills up the battler's atb value to its maximum
  90.  *    # Battle manipulations                                                  
  91.  *      1. BattleManager.patb_turn_clock                                      
  92.  *         - Returns the current global battle turn clock with both second and
  93.  *           action units in the form of { act: act, sec: sec }              
  94.  *         - sec is stored with the number of frames as the unit              
  95.  *         - The fps is assumed to be always 60                              
  96.  *      2. BattleManager.patb_turn_clock.act = act                            
  97.  *         - Sets the current global battle turn clock with action unit as act
  98.  *      3. BattleManager.patb_turn_clock.sec = sec                            
  99.  *         - Sets the current global battle turn clock with second unit as sec
  100.  *         - sec is stored with the number of frames as the unit              
  101.  *         - The fps is assumed to be always 60                              
  102.  *      4. BattleManager.patb_base                                            
  103.  *         - Returns the global base atb rate                                
  104.  *      5. BattleManager.need_patb_refresh = true                            
  105.  *         - Indicates that at least 1 battler has refreshed                  
  106.  *         - All windows will be refreshed and the sum of all battler's agi  
  107.  *           will be reevaluated                                              
Expand to see the code.


Video


Prerequisites
Abilities:
1. Nothing special for most ordinary use cases
2. Little Javascript coding proficiency to fully utilize this plugin

Terms Of Use
You shall keep this plugin's Plugin Info part's contents intact
You shalln't claim that this plugin's written by anyone other than DoubleX or his aliases
None of the above applies to DoubleX or his/her aliases

Instructions
  1. * The default plugin file name is DoubleX RMMV Popularized ATB Core v103c
  2.  * If you want to change that, you must edit the value of
  3.  * DoubleX_RMMV.PATB_Core_File, which must be done via opening this plugin js
  4.  * file directly
Expand to see the code.


Author Notes
  1. *      1. DoubleX RMMV Popularized ATB uses the core addon approach with this
  2.  *         plugin as its core and all addons needing this plugin to work      
  3.  *      2. DoubleX RMMV Popularized ATB also serves as a learning tool for    
  4.  *         plugin developers to learn how an atb system plugin can be written
  5.  *      3. State's Auto-removal Timing as Action End becomes right after the  
  6.  *         state owner executed all the actions to conform with the defaults  
Expand to see the code.


Changelog
  1.  
  2.  *      v1.04b(GMT 1400 15-6-2020):
  3.  *      1. Added battler manipulation plugin call fill_up_patb_val()
  4.  *      v1.04a(GMT 1200 20-5-2020):
  5.  *      1. Added wait_party_cmd
  6.  *      v1.03d(GMT 0500 20-5-2020):
  7.  *      1. Fixed the party escape command being selectable even when it won't
  8.  *         be effective
  9.  *      v1.03c(GMT 0400 13-5-2020):
  10.  *      1. Fixed the skill/item window being locked after another actor dies
  11.  *      2. Fixed the actor command window being deselected after another actor
  12.  *         dies
  13.  *      v1.03b(GMT 0400 28-4-2020):
  14.  *      1. Fixed the target window being locked after another actor dies
  15.  *      2. Fixed stale target sprite still displayed as being selected
  16.  *      v1.03a(GMT 1200 26-8-2017):                                          
  17.  *      1. Added no_prior_actor                                              
  18.  *      v1.02d(GMT 1500 13-8-2017):                                          
  19.  *      1. Increased this plugin's extensibility, modularity and robustness  
  20.  *      v1.02c(GMT 0500 11-8-2017):                                          
  21.  *      1. Fixed the 1st actor becoming inputable not performing the waiting  
  22.  *         pose bug                                                          
  23.  *      v1.02b(GMT 0500 17-9-2016):                                          
  24.  *      1. Fixed max_linked_input_actors not working when there are 3+        
  25.  *         inputable actors at the same time with no one having Action Times +
  26.  *      2. Lets you set max_linked_input_actors as negative to disable it    
  27.  *      v1.02a(GMT 0600 20-8-2016):                                          
  28.  *      1. Added max_linked_input_actors                                      
  29.  *      v1.01f(GMT 1400 12-8-2016):                                          
  30.  *      1. Fixed empty atb_bar_text being converted to 0 bug                  
  31.  *      2. PATB notetags won't be loaded more than once per game execution    
  32.  *      3. Increased this plugin's effectiveness, efficiency and simplicity  
  33.  *      v1.01e(GMT 0500 15-7-2016):                                          
  34.  *      1. Upgraded to support the latest version of PATB Order              
  35.  *      2. Increased this plugin's effectiveness, efficiency and readibility  
  36.  *      v1.01d(GMT 0800 19-6-2016):                                          
  37.  *      1. Fixed maximum atb value being possible to be nonpositive bug      
  38.  *      v1.01c(GMT 1000 5-6-2016):                                          
  39.  *      1. Fixed not updating unmovable battlers' max atb and countdown states
  40.  *      2. Improved this plugin's effectiveness, efficiency and readibility  
  41.  *      v1.01b(GMT 1400 31-5-2016):                                          
  42.  *      1. Fixed the unmovable battlers having nonempty atb bug in start addon
  43.  *      2. Improved this plugin's effectiveness, efficiency and readibility  
  44.  *      v1.01a(GMT 0300 20-2-2016):                                          
  45.  *      1. Lets users set whether actor atb bar will be shown on status window
  46.  *      2. Fixed inactive actor command window not being closed immediately  
  47.  *      3. Fixed not refreshing the inputable actor upon confirming input bug
  48.  *      v1.00d(GMT 0400 7-2-2016):                                            
  49.  *      1. Fixed not updating the status window when executing actions bug    
  50.  *      2. Fixed actor input windows not deactivating upon being uninputable  
  51.  *      3. Fixed forbidden party escape freezing the party command window bug
  52.  *      4. Loosens the coupling between core, charge, cooldown and speed addon
  53.  *      5. Removed some excessive couplings and added some code documentations
  54.  *      v1.00c(GMT 1000 31-1-2016):                                          
  55.  *      1. Fixed not updating the battler atb rate due to changing the battler
  56.  *         agi without changing the base atb rate bug                        
  57.  *      2. Fixed not refreshing actor atb bar upon reset with delay fill mode
  58.  *      3. Fixed not updating the status window when executing actions bug    
  59.  *      v1.00b(GMT 0900 27-1-2016):                                          
  60.  *      1. Fixed active hidden actor command window after closing all windows
  61.  *      2. Fixed not updating status windos and incorrect actor window x      
  62.  *         position in unavailable battle system codes                        
  63.  *      3. Fixed actor not able to execute autobattle/confusion actions with  
  64.  *         max atb value notetag used                                        
  65.  *      4. Fixed actor not able to do anything if becoming autobattle or      
  66.  *         restricted when inputable bug                                      
  67.  *      5. max_atb_val must be at least 10000 times larger than 2 ^ -52      
  68.  *      6. atb gain rate must be at least 2 ^ -52 * max atb value * 100 per  
  69.  *         frame                                                              
  70.  *      7. Confused battlers can execute confused actions ahortly after      
  71.  *         removing confusion                                                
  72.  *      8. Next/prior command can cause actor selections to appear chaotic    
  73.  *      9. The battle turn clock can be disabled as using an unavailable unit
  74.  *      10. Increased this plugin's compatibility, modularity and readability
  75.  *      v1.00a(GMT 0400 23-1-2016):                                          
  76.  *      1. Outsourced the ctb feature to the CTB addon                        
  77.  *      2. Fixed same name patb_rate for both a property setter and function  
  78.  *      3. Fixed actors added during battles having unitiailized atb statuses
  79.  *      4. Fxied undefined textWidth in draw_actor_patb bug                  
  80.  *      5. Fixed trying to read meta from null equip bug                      
  81.  *      6. Fixed undefined this_ and patb_color due to typo bug              
  82.  *      7. Fixed unitialized max atb value upon battle start bug              
  83.  *      8. Fixed executing next action before finishing the current one bug  
  84.  *      9. Fixed actor window not completely covering status window bug      
  85.  *      10. Actor poses can be chaotic when actor input actions or battle ends
  86.  *      11. Added some missing documentations                                
  87.  *      12. Incrased this plugin's compactness, modularity and simplicity    
  88.  *      13. 1st completed version of this plugin finished                    
  89.  *      v0.00g(GMT 1400 30-12-2015):                                          
  90.  *      1. Fixed undefined data in Game_Battler.prototype.patb_note_data bug  
  91.  *      2. Fixed used the undefined any instead of some function for Array bug
  92.  *      3. Fixed missed return in Array filter function bug                  
  93.  *      4. Increased this plugin's compactness, modularity and readability    
  94.  *      v0.00f(GMT 1200 9-12-2015):                                          
  95.  *      1. Fixed concat the active flag of the actor command window instead of
  96.  *         the window itself                                                  
  97.  *      2. Fixed not refreshing the actor atb bars upon resetting atb values  
  98.  *      3. Updated some outdated documentations                              
  99.  *      4. Increased this plugin's extensibility, modularity and readability
  100.  *      v0.00e(GMT 1300 29-11-2015):                                          
  101.  *      1. Fixed not refreshing all input windows upon turn end              
  102.  *      2. Fixed not returning the reevaluated sum of all battlers' agi      
  103.  *      3. Fixed not clearing the sum of all battlers' agi upon battle start  
  104.  *      4. Fixed not raising refresh and update flags upon battler atb reset  
  105.  *      5. Fixed undefined updateEvent due to typo                            
  106.  *      6. Fixed duplicate battle event updates upon turn end                
  107.  *      7. Fixed resetting atb always clearing the atb values on restrict    
  108.  *      8. Added atb_rate_code abs_agi                                        
  109.  *      9. Updated some outdated documentations                              
  110.  *      10. Increased this plugin's extensibility, modularity and robustness
  111.  *      v0.00d(GMT 0100 27-11-2015):                                          
  112.  *      1. Exposed more easy, simple and user-friendly plugin calls          
  113.  *      2. Increased this plugin's efficiency and user-friendliness          
  114.  *      v0.00c(GMT 1400 24-11-2015):                                          
  115.  *      1. Fixed database falsely returning database not loaded on game start
  116.  *      2. Fixed BattleManager properties falsely belonging to Game_Battler  
  117.  *      3. Fixed undefined this when raising the battler's refresh flags      
  118.  *      4. Fixed are_patb_battler_changed not referenced by this due to typo  
  119.  *      5. Fixed atb bars not drawing properly due to note passing fill rate  
  120.  *      6. Invalid configuration and/or notetag values will log error messages
  121.  *      7. The param descriptions and plugin help become more helpful to users
  122.  *      8. Increased this plugin's extensibility, readability and robustness
  123.  *      v0.00b(GMT 0000 24-11-2015):                                          
  124.  *      1. Fixed changing max atb value not rechecking battler actability    
  125.  *      2. Fixed null this when reading <operator max patb val: val> notetag  
  126.  *      3. Fixed update state turns not working in the default battle system  
  127.  *      4. Fixed description, params and help not loading due to typo        
  128.  *      5. Fixed battler atb clock update not triggering due to typo          
  129.  *      6. Fixed action set item passing the null argument due to typo        
  130.  *      7. Fixed undefined function error when updating atb frame due to typo
  131.  *      8. Fixed failed party escape not resetting actors' atb values in delay
  132.  *      9. Fixed passing wrong color argument type when drawing actor atb bars
  133.  *      10. Simplified operator in <operator max patb val: val>              
  134.  *      11. Increased this plugin's efficiency, extensibility and modularity
  135.  *      v0.00a(GMT 1600 22-11-2015):                                          
  136.  *      1. 1st testing version of this plugin finished                        
Expand to see the code.


Download Link
DoubleX RMMV Popularized ATB Core
Updates
  1. *      v0.00g(GMT 1400 30-12-2015):                                          
  2.  *      1. Fixed undefined data in Game_Battler.prototype.patb_note_data bug  
  3.  *      2. Fixed used the undefined any instead of some function for Array bug
  4.  *      3. Fixed missed return in Array filter function bug                  
  5.  *      4. Increased this plugin's compactness, modularity and readability    
Expand to see the code.
Updates
Added this video:

  1. *      v1.00a(GMT 0400 23-1-2016):                                          
  2.  *      1. Outsourced the ctb feature to the CTB addon                        
  3.  *      2. Fixed same name patb_rate for both a property setter and function  
  4.  *      3. Fixed actors added during battles having unitiailized atb statuses
  5.  *      4. Fxied undefined textWidth in draw_actor_patb bug                  
  6.  *      5. Fixed trying to read meta from null equip bug                      
  7.  *      6. Fixed undefined this_ and patb_color due to typo bug              
  8.  *      7. Fixed unitialized max atb value upon battle start bug              
  9.  *      8. Fixed executing next action before finishing the current one bug  
  10.  *      9. Fixed actor window not completely covering status window bug      
  11.  *      10. Actor poses can be chaotic when actor input actions or battle ends
  12.  *      11. Added some missing documentations                                
  13.  *      12. Incrased this plugin's compactness, modularity and simplicity    
  14.  *      13. 1st completed version of this plugin finished                    
Expand to see the code.
Updates
  1. *      v1.00b(GMT 0900 27-1-2016):                                          
  2.  *      1. Fixed active hidden actor command window after closing all windows
  3.  *      2. Fixed not updating status windos and incorrect actor window x      
  4.  *         position in unavailable battle system codes                        
  5.  *      3. Fixed actor not able to execute autobattle/confusion actions with  
  6.  *         max atb value notetag used                                        
  7.  *      4. Fixed actor not able to do anything if becoming autobattle or      
  8.  *         restricted when inputable bug                                      
  9.  *      5. max_atb_val must be at least 10000 times larger than 2 ^ -52      
  10.  *      6. atb gain rate must be at least 2 ^ -52 * max atb value * 100 per  
  11.  *         frame                                                              
  12.  *      7. Confused battlers can execute confused actions ahortly after      
  13.  *         removing confusion                                                
  14.  *      8. Next/prior command can cause actor selections to appear chaotic    
  15.  *      9. The battle turn clock can be disabled as using an unavailable unit
  16.  *      10. Increased this plugin's compatibility, modularity and readability
Expand to see the code.
Updates
  1. *      v1.00c(GMT 1000 31-1-2016):                                          
  2.  *      1. Fixed not updating the battler atb rate due to changing the battler
  3.  *         agi without changing the base atb rate bug                        
  4.  *      2. Fixed not refreshing actor atb bar upon reset with delay fill mode
  5.  *      3. Fixed not updating the status window when executing actions bug    
Expand to see the code.
Updates
  1. *      v1.00d(GMT 0400 7-2-2016):                                            
  2.  *      1. Fixed not updating the status window when executing actions bug    
  3.  *      2. Fixed actor input windows not deactivating upon being uninputable  
  4.  *      3. Fixed forbidden party escape freezing the party command window bug
  5.  *      4. Loosens the coupling between core, charge, cooldown and speed addon
  6.  *      5. Removed some excessive couplings and added some code documentations
Expand to see the code.
Updates
  1. *      v1.01a(GMT 0300 20-2-2016):                                          
  2.  *      1. Lets users set whether actor atb bar will be shown on status window
  3.  *      2. Fixed inactive actor command window not being closed immediately  
  4.  *      3. Fixed not refreshing the inputable actor upon confirming input bug
Expand to see the code.
Updates
  1. *      v1.01b(GMT 1400 31-5-2016):                                          
  2.  *      1. Fixed the unmovable battlers having nonempty atb bug in start addon
  3.  *      2. Improved this plugin's effectiveness, efficiency and readibility  
Expand to see the code.
Updates
  1. *      v1.01c(GMT 1000 5-6-2016):                                          
  2.  *      1. Fixed not updating unmovable battlers' max atb and countdown states
  3.  *      2. Improved this plugin's effectiveness, efficiency and readibility  
Expand to see the code.
Updates
  1. *      v1.01d(GMT 0800 19-6-2016):                                          
  2.  *      1. Fixed maximum atb value being possible to be nonpositive bug      
Expand to see the code.
Updates
  1. *      v1.01e(GMT 0500 15-7-2016):                                          
  2.  *      1. Upgraded to support the latest version of PATB Order              
  3.  *      2. Increased this plugin's effectiveness, efficiency and readibility  
Expand to see the code.
Updates
  1. *      v1.01f(GMT 1400 12-8-2016):                                          
  2.  *      1. Fixed empty atb_bar_text being converted to 0 bug                  
  3.  *      2. PATB notetags won't be loaded more than once per game execution    
  4.  *      3. Increased this plugin's effectiveness, efficiency and simplicity  
Expand to see the code.
Updates
  1. *      v1.02a(GMT 0600 20-8-2016):                                          
  2.  *      1. Added max_linked_input_actors                                      
Expand to see the code.
Updates
  1. *      v1.02b(GMT 0500 17-9-2016):                                          
  2.  *      1. Fixed max_linked_input_actors not working when there are 3+        
  3.  *         inputable actors at the same time with no one having Action Times +
  4.  *      2. Lets you set max_linked_input_actors as negative to disable it    
Expand to see the code.

P.S.: max_linked_input_actors won't work well with any inputable actor having Action Times+, which can only be fixed by rewriting the entire PATB system, so I don't think I'll go for that extra mile :)
Updates
  1.  
  2.  *      v1.02c(GMT 0500 11-8-2017):                                          
  3.  *      1. Fixed the 1st actor becoming inputable not performing the waiting  
  4.  *         pose bug                                                          
Expand to see the code.
Updates
Added PATB Patch(Cinnamon)
Updates
  1. *      v1.02d(GMT 1500 13-8-2017):                                          
  2.  *      1. Increased this plugin's extensibility, modularity and robustness  
  3.  
Expand to see the code.
Updates
  1. *      v1.03a(GMT 1200 26-8-2017):                                          
  2.  *      1. Added no_prior_actor                                              
  3.  
Expand to see the code.
Updates
  1. *      v1.03b(GMT 0400 28-4-2020):
  2.  *      1. Fixed the target window being locked after another actor dies
  3.  *      2. Fixed stale target sprite still displayed as being selected
Expand to see the code.
Updates
  1. *      v1.03c(GMT 0400 13-5-2020):
  2.  *      1. Fixed the skill/item window being locked after another actor dies
  3.  *      2. Fixed the actor command window being deselected after another actor
  4.  *         dies
Expand to see the code.
Updates
  1. *      v1.03d(GMT 0500 20-5-2020):
  2.  *      1. Fixed the party escape command being selectable even when it won't
  3.  *         be effective
Expand to see the code.
Updates
  1. *      v1.04a(GMT 1200 20-5-2020):
  2.  *      1. Added wait_party_cmd
Expand to see the code.

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=78903