Instant Cast (YEP)
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.
This plugin is a part of the Yanfly Engine Plugins library.
When an action has an instant cast property, that action is used immediately on the spot without needing to wait for the turn to start. After using it, the actor can perform another action. This can add a whole new dimension of battle depth to your game as instant cast actions do not consume a turn. Note that if your actors can perform multiple actions, the instant cast will only occur if it is the very first action selected and not a subsequent one. In the event an enemy uses an instant cast skill, once the enemy's turn comes up, it will perform the instant cast skill and then immediately after, perform another skill. It is highly recommended to use this plugin with another plugin that enables skill restrictions.
RPG Maker MV's editor is unable to allow for custom traits/properties that a game dev may wish to associate with a database object, event, map, etc. Notetags are used to work around such limitations by allowing the game dev to tag certain traits/properties using specific Notetags declared by the related plugin.
Here is a list of Notetag(s) that you may use.
The following are some notetags you can use to apply Instant Cast properties to your actions. Skill and Item Notetags: <Instant> <Instant Cast> Both notetags work the same. This causes this action when selected as the first action for an actor to be instantly cast. When used by an enemy, this will cause the enemy to have a follow up action without consuming the enemy's turn. Actor, Class, Enemy, Weapon, Armor, and State Notetags: <Instant Skill: x> <Instant Skill: x, x, x> <Instant Skill: x to y> This makes skill(s) x into having instant cast properties for the actor, class, enemy, or whenever the weapon or armor is equipped, or whenever the state is applied. If using 'x to y', it will be applied to all the skills from x to y. <Instant Item: x> <Instant Item: x, x, x> <Instant Item: x to y> This makes item(s) x into having instant cast properties for the actor, class, enemy, or whenever the weapon or armor is equipped, or whenever the state is applied. If using 'x to y', it will be applied to all the items from x to y. <Cancel Instant Skill: x> <Cancel Instant Skill: x, x, x> <Cancel Instant Skill: x to y> This makes skill(s) x unable to be instantly cast. This will take priority over all other properties that may influence instant casting if the actor, class, enemy, equipment, or states possess this notetag. If using 'x to y' then it will be applied to all skills from x to y. <Cancel Instant Item: x> <Cancel Instant Item: x, x, x> <Cancel Instant item: x to y> This makes item(s) x unable to be instantly cast. This will take priority over all other properties that may influence instant casting if the actor, class, enemy, equipment, or states possess this notetag. If using 'x to y' then it will be applied to all items from x to y.
In the event you wish to have an action be dynamic in whether or not it is an instant cast, you can use this notetag setup: Skill and Item Notetags: <Instant Eval> code code </Instant Eval> The code can be anything. However, what you want to define is the variable 'instant' to be true or false. 'instant = true' means the action will be instant cast while 'instant = false' means the action will not. If the variable 'instant' comes to no conclusion, it will resume like normal to determine instant properties via other modifiers. It is recommended to use an if/else statement with this notetag. *Note: This will take priority over <Cancel Instant> notetags. This is the only exception to the rule, but only because it can function as its own <Cancel Instant> if done in such a way. Example: <Instant Eval> if (user.atk >= 300) instant = true; </Instant Eval> In the above example, if the user's ATK value is equal to or greater than the value of 300, the action with this notetag will be considered to have instant cast properties.
Instant Cast Priority Settings
Since there are a lot of properties now that determine if a skill or item will have instant cast properties, here's the priority order: 1. Instant Eval Notetags If a skill/item's <Instant Eval> notetag dictates 'instant = true' or 'instant = false', that setting will take priority over everything else. 2. Cancel Instant Notetags If there's a property that will cancel out instant casting on the actor, class, enemy, weapon, armor, or state, this will take priority over all except for anything dictated by the Instant Eval notetag. 3. Instant Skill/Item Granting Notetags The actor, class, enemy, weapon, armor, and state notetags that grant Instant Cast properties to skills and items will take priority over all except those shown above in this list. 4. Inherent Instant Cast Property If nothing above is used or applied, whether or not a skill or item will have an Instant Cast property will be determined by it having <Instant Cast> in its notebox.
Version 1.12: - 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.11: - Updated for RPG Maker MV version 1.5.0. Version 1.10: - Compatibility update for future plugins. Version 1.09: - Lunatic Mode fail safes added. Version 1.08: - Updated for RPG Maker MV version 1.1.0. Version 1.07b: - Optimized to fit Tick-Based Battle Systems better. - Fixed a bug where if the user uses an instant action self-berserks itself, the user will still be able to input an action. - Added failsafes for those using independent items and then adding this plugin later. Effects are not applied retroactively. Version 1.06c: - Fixed a bug if instant casting a skill that would make an opponent battler to force an action to end incorrectly. Thanks to DoubleX for the fix. - Added a more consistent window refresh upon using instant actions. - Instant icons are now shown outside of battle. Version 1.05: - Added a fail safe to keep an action that once it's being used, it will maintain its current status of being an instant or non-instant until the action is finished to prevent inconsistencies if a skill were to change mid-action from instant to non-instant or vice versa. Version 1.04: - Fixed a bug that would cause the game to lock up if using an Instant action after a common event that would jump labels. Version 1.03: - Fixed a bug with Forced Actions locking out the battle. Version 1.02: - Fixed a bug that caused common events after a forced action to interrupt. Version 1.01: - Compatibility update with ChangeWeaponOnBattle.js. Version 1.00: - Finished plugin!