Battle System - ATB (YEP)
Jump to navigation
Jump to search
Welcome to the wiki! This is where you can find resources from Yanfly.moe, Ækashics.moe,
VisuStella, Caz Wolf, Fallen Angel Olivia, Atelier Irina, and other affiliated content creators.
VisuStella, Caz Wolf, Fallen Angel Olivia, Atelier Irina, and other affiliated content creators.
Download
System
This is a plugin created for RPG Maker MV.
For help on how to install plugins, click here.
For help on how to update plugins, click here.
Got errors with your RPG Maker MV plugin? Click here.
Extension Plugins
The following plugins are Extension Plugins that require this plugin as its Parent Plugin.
Place the following plugins below this plugin located in the Plugin Manager if you plan on using them.
Required Plugins
The following plugins are required in order to use this plugin.
Place the following plugins above this plugin located in the Plugin Manager.
Yanfly Engine Plugins
This plugin is a part of the Yanfly Engine Plugins library.
Help File
============================================================================ Introduction ============================================================================ The Battle System - Active Turn Battle plugin is an extension plugin for Yanfly Engine Plugins' Battle Engine Core. This extension plugin will not work without the main plugin. To use the ATB system, go to the Battle Engine Core plugin and change the 'Default System' setting in the parameters to 'atb'. The Active Turn Battle system functions in such where battlers will have a new gauge in battle functioning as their turn gauge. As time goes by without anything happening such as actions, menu selection, etc, the gauge fills up. Once it is full, the battler can commit to an action. After committing to an action, the battler charges the skill before using it in battle to either attack an enemy, heal an ally, etc. Upon finishing the action, the gauge drains to empty and the battler must charge it up again. This is a battle system where agility plays an important factor in the progress of battle where higher agility values give battlers more advantage and lower agility values give battlers less advantage. ============================================================================ Plugin Commands ============================================================================ To change your battle system to Active Turn Battle if it isn't the default battle system, you can use the following Plugin Command: Plugin Command: setBattleSys ATB Sets battle system to Active Turn Battle. setBattleSys DTB Sets battle system to Default Turn Battle. Using the above Plugin Commands, you can toggle between the Default Battle System and Active Turn Battle! ============================================================================ Notetags ============================================================================ The following are notetags that pertain to and affect the ATB system. Skill and Item Notetags: <ATB Help> text text </ATB Help> For those planning on using multiple battle systems, sometimes you may have your skills perform differently while using ATB. If so, using this notetag will allow skills and items to display different help text while ATB is enabled. <ATB Speed: x> <ATB Charge: x> <ATB Gauge: x> Usable only during ATB. This sets the target's current speed or charge to x. If 'speed' or 'charge' is used, it will only affect those gauges while in the respective phase. If 'gauge' is used, it will affect either. <ATB Speed: x%> <ATB Charge: x%> <ATB Gauge: x%> Usable only during ATB. This sets the target's current speed or charge to x% of the whole gauge. If 'speed' or 'charge' is used, it will only affect those gauges while in the respective phase. If 'gauge' is used, it will affect either. <ATB Speed: +x> or <ATB Speed: -x> <ATB Charge: +x> or <ATB Charge: -x> <ATB Gauge: +x> or <ATB Gauge: -x> Usable only during ATB. This increases or decreases the target's current speed or charge by x. If 'speed' or 'charge' is used, it will only affect those gauges while in the respective phase. If 'gauge' is used, it will affect either. <ATB Speed: +x%> or <ATB Speed: -x%> <ATB Charge: +x%> or <ATB Charge: -x%> <ATB Gauge: +x%> or <ATB Gauge: -x%> Usable only during ATB. This increases or decreases the target's current speed or charge by x% of the whole gauge. If 'speed' or 'charge' is used, it will only affect those gauges while in the respective phase. If 'gauge' is used, it will affect either. <After ATB: x> <After ATB: x%> This will set the skill/item user's ATB speed value to x or x%. If 'x' is used, this will be the exact ATB value. If x% is used, this will be the percentage of the ATB gauge that it will be at. <ATB Interrupt> <ATB Interrupt: x%> This will give the skill the ability to interrupt and cancel out the target's current action while it is in the charging phase. If the 'x%' notetag version is used, it will have a x% chance of success. <Cannot ATB Interrupt> This causes the skill to be unable to be interrupted and prevent the battler's ATB to reset. Actor, Class, Enemy, Weapon, Armor, and State Notetags: <ATB Start: +x> <ATB Start: +x%> Usable only during ATB. This will give the actor, class, enemy, weapon, armor, or state the property of starting battle with X ATB Speed or X% of the ATB gauge filled up. <ATB Turn: +x> <ATB Turn: +x%> Usable only during ATB. This will give the actor, class, enemy, weapon, armor, or state the property of starting a turn with X ATB Speed or X% of the ATB gauge filled up. ============================================================================ Lunatic Mode - Conditional ATB Speed and Conditional ATB Charge ============================================================================ For those who have a bit of JavaScript experience and would like to have more unique ways of performing ATB speed and charge changes, you can use the following notetags: Skill and Item Notetags: <Target ATB Eval> speed = x; charge = x; </Target ATB Eval> You can omit speed and/or charge. Whatever you set 'speed' to will change the ATB speed of the target. If the target is charging, 'charge' will cause the target's charge to change to that value. To make things more simple, 'max' will be the full gauge value. Here is an example: <Target ATB Eval> speed = target.hp / target.mhp * max; charge = target.hp / target.mhp * max; </Target ATB Eval> The above code will set the user's current ATB gauge to position equal to the target's HP ratio. If the target has 25% HP, the ATB gauge will go to 25% full for the target. --- --- --- --- --- <After ATB Eval> speed = x; </After ATB Eval> This is the ATB set after the user has used the skill/item and the custom ATB amount you want the user to be at after. 'max' be the value of the full gauge value. Whatever you set 'speed', the user's ATB speed value will change to that much: Here is an example: <After ATB Eval> speed = user.mp / user.mmp * max; </After ATB Eval> The above code will set the user's ATB gauge after using the skill/item to equal the user's MP ratio. If the user has 25% MP, the ATB gauge will go to 25% full for the user. --- --- --- --- --- <ATB Interrupt Eval> interrupt = true; </ATB Interrupt Eval> This will allow you to set custom conditions for interrupting a target. Keep in mind that even though it is a custom condition, it still requires the target to be in the charging phase for the interrupt to work. By setting 'interrupt = true', the target will be interrupted. Here is an example: <ATB Interrupt Eval> if (user.hp > target.hp) { interrupt = true; } </ATB Interrupt Eval> The above code will state that if the user has more HP than the target, the target will be interrupted. ============================================================================ Yanfly Engine Plugins - Battle Engine Extension - Action Sequence Commands ============================================================================ You can make use of these extra ATB related action sequences. ============================================================================= ATB CHARGE: target, X ATB CHARGE: target, X% ATB CHARGE: targets, +X ATB CHARGE: targets, +X% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Usable only for ATB. Sets the target's ATB charge to X or X%. This only applies when the target is in the ATB charge phase. This will not affect the user to prevent mechanical issues. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Usage Example: atb charge: targets, +5000 atb charge: target, -50% ============================================================================= ============================================================================= ATB GAUGE: target, X ATB GAUGE: target, X% ATB GAUGE: targets, +X ATB GAUGE: targets, +X% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Usable only for ATB. Sets the target's ATB speed or charge (whichever the user is currently filling up) to X or X%. This only. This will not affect the user to prevent mechanical issues. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Usage Example: atb gauge: targets, +5000 atb gauge: target, -50% ============================================================================= ============================================================================= ATB INTERRUPT: target - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Usable only for ATB. If the target is in the charging phase, interrupt it. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Usage Example: atb interrupt: targets ============================================================================= ============================================================================= ATB SPEED: target, X ATB SPEED: target, X% ATB SPEED: targets, +X ATB SPEED: targets, +X% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Usable only for ATB. Sets the target's ATB speed to X or X%. This only applies when the target is filling up its ATB gauge. This will not affect the user to prevent mechanical issues. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Usage Example: atb speed: targets, +5000 atb speed: target, -50% ============================================================================= ============================================================================ Options Core Settings - Adding the New Options ============================================================================ If you are using YEP_OptionsCore.js, you can add a new Option using this plugin. Here's the following code/parameter settings you can use with it. --------- Settings: --------- Name: \i[87]ATB Speed Help Description: Determines how fast the ATB Gauge fills up during battle. Symbol: atbSpeed Show/Hide: if (Imported.YEP_X_BattleSysATB) { show = $gameSystem.getBattleSystem() === 'atb'; } else { show = false; } Enable: enabled = true; Ext: ext = 0; ---------- Functions: ---------- Make Option Code: this.addCommand(name, symbol, enabled, ext); Draw Option Code: var rect = this.itemRectForText(index); var statusWidth = this.statusWidth(); var titleWidth = rect.width - statusWidth; this.resetTextColor(); this.changePaintOpacity(this.isCommandEnabled(index)); this.drawOptionsName(index); var value = this.getConfigValue(symbol); var rate = value / 10; var gaugeColor1 = this.textColor(13); var gaugeColor2 = this.textColor(5); this.drawOptionsGauge(index, rate, gaugeColor1, gaugeColor2); this.drawText(this.statusText(index), titleWidth, rect.y, statusWidth, 'center'); Process OK Code: var index = this.index(); var symbol = this.commandSymbol(index); var value = this.getConfigValue(symbol); value += 1; if (value > 10) value = 1; this.changeValue(symbol, value); Cursor Right Code: var index = this.index(); var symbol = this.commandSymbol(index); var value = this.getConfigValue(symbol); value += 1; if (value > 10) value = 1; this.changeValue(symbol, value); Cursor Left Code: var index = this.index(); var symbol = this.commandSymbol(index); var value = this.getConfigValue(symbol); value -= 1; if (value < 1) value = 10; this.changeValue(symbol, value); Default Config Code: // Empty. Provided by this plugin. Save Config Code: // Empty. Provided by this plugin. Load Config Code: // Empty. Provided by this plugin. ============================================================================ Changelog ============================================================================ Version 1.28: - Bypass the isDevToolsOpen() error when bad code is inserted into a script call or custom Lunatic Mode code segment due to updating to MV 1.6.1. Version 1.27: - Compatibility update with YEP_OptionsCore.js. Version 1.26: - Updated for RPG Maker MV version 1.5.0. Version 1.25: - Lunatic Mode fail safes added. Version 1.24: - During action end, a single tick will be forced to occur to prevent clash amongst actors with similar AGI values and make tick values more unique. Version 1.23: - Timing has been changed for states that update turns at Turn Start. Now, the states will update prior to the actor's command box opening or the enemy make a decision on which action it will use. Version 1.22: - Updated for RPG Maker MV version 1.1.0. Version 1.21: - Counterattacks no longer cause interrupts if attack actions have interrupt functionality. Version 1.20: - Updated plugin to update the AI more accordingly with Battle AI Core. Version 1.19: - Fixed a bug where forced actions clear out an action's effects before the turn is over, making post-turn effects to not occur. Version 1.18: - Fixed a bug where changing back and forth between the Fight/Escape window would prompt on turn start effects. Version 1.17: - Made a mechanic change so that turn 0 ends immediately upon battle start rather than requiring a full turn to end. Version 1.16: - Added a fail safe setting up ATB Charges when the Cannot Move restriction is imposed upon an actor. Verison 1.15: - Implemented a Forced Action queue list. This means if a Forced Action takes place in the middle of an action, the action will resume after the forced action finishes rather than cancels it out like MV does. Version 1.14: - Added a speed position check for Instant Casts to maintain order position. Version 1.13: - Fixed a bug that doesn't update state turns properly. - Removed 'Turn Structure parameter' as it goes against the nature of a Tick-Based battle system. Version 1.12: - Added speed rebalance formulas for tick-based systems (innate). Version 1.11: - Fixed a bug that would still allow battlers to perform actions even if the actions got sealed midway through charging the action. Version 1.10: - Fixed a bug that would cause AutoBattlers to stall if they got added into the party mid-battle. Version 1.09: - Mechanic change for states that update on Action End to end at the end of a battler's turn instead of at the start. Version 1.08a: - Fixed a bug that crashed the game when enemies were confused. - Preparation for Enemy ATB Gauges. Version 1.07: - Added 'Flash Enemy' to plugin parameters to flash the enemy once when it starts charging a skill. Version 1.06: - Added pre-emptive and surprise attack mechanic plugin parameters! Version 1.05: - Fixed a bug with Forced Actions locking out the battle. Version 1.04: - Added the 'Per Tick' parameter for you to adjust the formula that governs the speed rate at which the ATB gauge fills up. Version 1.03: - Fixed a bug that caused the ATB Gauge appear slow with maxed AGI. Version 1.02c: - Fixed a bug with the ATB GAUGE and ATB CHARGE action sequences. - Fixed a bug with battlers still getting a turn after the battle is over. - Fixed a bug that prevented escaping. - Added math fail safes for calculating ATB charging. Version 1.01: - Fixed a bug with escaping causing battlers to go into infinite lock. - Fixed a bug with multiple victory messages. - Added fail safe to prevent infinite charging. - Added <Cannot ATB Interrupt Notetag>. Version 1.00: - It's doooooooone!