An open library of RPG Maker MV plugins, powered by the community.

PGMV - The Community-Driven Plugin Library for RPG Maker MV

MV plugins

FTKR Auto Invoke Skill - FTKR_AutoInvokeSkill.js

Plugin desc : v1.3.2 Plugin that automatically activates skills under certain conditions

License : MIT License

Author : Futokoro

Desc page : https://github.com/munokura/futokoro-MV-plugins

Download Page : https://raw.githubusercontent.com/munokura/futokoro-MV-plugins/refs/heads/master/FTKR_AutoInvokeSkill.js

File name : FTKR_AutoInvokeSkill.js

Help of plugin :

@plugindesc v1.3.2 Plugin that automatically activates skills under certain conditions
@author Futokoro
@url https://github.com/munokura/futokoro-MV-plugins
@license MIT License

@help
English Help Translator: munokura
This is an unofficial English translation of the plugin help,
created to support global RPG Maker users.
Feedback is welcome to improve translation quality
(see: https://github.com/munokura/futokoro-MV-plugins ).
Original plugin by Futokoro.
Please check the URL below for the latest version of the plugin.
URL https://github.com/futokoro/RPGMaker
-----
-----------------------------------------------------------------------------
Overview
-----------------------------------------------------------------------------
You can automatically activate skills under certain conditions.

The activation conditions are as follows:

1. When a specified condition is met after an action.

2. When an applied state is removed.

-----------------------------------------------------------------------------
Setup Instructions
-----------------------------------------------------------------------------
1. Add this plugin to the "Plugin Manager."

2. When using with other plugins:
This plugin must be placed below the following plugins:
YEP_BattleEngineCore.js
YEP_X_BattleSysATB.js
And other FTKR plugins.

-----------------------------------------------------------------------------
Set it for an actor, job, equipment, or state, and activate it after an action.
-----------------------------------------------------------------------------
Add the following tag to the Note field for an actor, job, equipment, or state.
The skill will automatically activate each time a character takes an action if the specified condition is met.

<AIS_INVOKE_CONDITIONS: x>
Condition Expression
</AIS_INVOKE_CONDITIONS>

x: Skill ID

[Condition Judgment Timing]
Condition judgment is performed each time each character takes an action.
The target on which the skill is activated is the target of that character's action.

For example, if an ally attacks an enemy, the skill will be activated against the attacking enemy.
Conversely, if an ally takes an action targeting themselves, such as defending, the skill will be activated against that character.

For this reason, the condition expression can reference the parameters of the specified actor, the character who acted, and the character targeted by the action.
The judgment is performed in order from the front of the party, and the skill of the character that meets the condition is executed.

[Codes that can be used in condition expressions]
The following codes can be used in condition expressions. a.param - References the parameters of the specified actor. (a.hp references current HP)
b.param - References the parameters of the target character of the action.
c.param - References the parameters of the character who performed the action.
item - References the data of the skill used.
s[x] - References the state of switch ID x.
v[x] - References the value of variable ID x.

Example: Set this to a weapon and activate skill ID 10 only when a character equipped with that weapon attacks an enemy.

<AIS_INVOKE_CONDITIONS: 10>
a !== b && a == c
</AIS_INVOKE_CONDITIONS>

In the above condition, a refers to the equipped character, b refers to the attacking enemy, and c refers to the attacking character.
Skill ID 10 will activate when the following conditions are met: a !== b, meaning the equipped character is not the attacking character;

a == c, meaning the equipped character is the attacking character.

You can change the activation conditions by changing the settings of the skill used.
item.stypeId
- Refers to the skill type ID.
0: None, 1~: Database skill type.
item.hitType
- Refers to the hit type.
0: Certaion Hit, 1: Physical, 2: Magic.
item.damage.elementId
- Refers to the damage element ID.
-1: Normal attack, 0: None, 1~: Database element.
item.damage.type
- Refers to the damage type.
1: HP damage, 2: MP damage, 3: HP recovery,
4: MP recovery, 5: HP absorption, 6: MP absorption, 0: None.

Example: To activate skill ID 10 only when a physical attack skill is used:

<AIS_ActivationCondition: 10>
a !== b && a == c
item.hitType == 1
</AIS_ACTIVATION_CONDITION>

-----------------------------------------------------------------------------
Set this as a skill and activate it when the specified condition is met after the skill's action.
-----------------------------------------------------------------------------
Adding the following tag to a skill's Note field will automatically activate the skill at the end of the turn in which the specified condition is met.
Note that the same skill can only be activated once per turn.

<AIS_INVOKE_CONDITIONS>
Condition
</AIS_INVOKE_CONDITIONS>

[About the Value of the Condition (eval)]
The condition (eval) allows you to use non-fixed values by entering a formula, like a damage formula. The following codes can be used:
a.param - References the parameters of the character who acted.
s[x] - References the state of switch ID x.
v[x] - References the value of variable ID x.

Example:
Automatically activates when a character's TP reaches 50 or above.
<AIS_ActivationCondition>
a.tp >= 50
</AIS_ActivationCondition>

-----------------------------------------------------------------------------
Notes on Setting Condition Expressions
-----------------------------------------------------------------------------
Skills activate when the conditions are met.
In other words, they will always activate while the conditions are met.
If the skill's specifications allow for multiple activations, there's no problem.
If this is not the case, set the condition expression to prevent multiple activations.

[When Setting Multiple Conditions]
In this case, the skill will activate when all set conditions are met.
The following notations all have the same meaning.

1. Arrange them horizontally using '&&'.
<AIS_ActivationCondition>
Condition 1 && Condition 2 && Condition 3
</AIS_ActivationCondition>

2. Arrange them vertically.
<AIS_ActivationCondition>
Condition 1
Condition 2
Condition 3
</AIS_ActivationCondition>

3. Combine the above.
<AIS_ActivationCondition>
Condition 1 && Condition 2
Condition 3
</AIS_ActivationCondition>

-----------------------------------------------------------------------------
Activates when a state is released.
-----------------------------------------------------------------------------
Adding the following tag to the state's Note field will automatically activate (*3) the specified skill when the state is released (*1).

<AIS_解除発動: x>
:x - Skill ID

(*1) Follows the state release condition setting.
(*2) If the skill is released by damage, it will activate when the damage is received. If the skill is released at the end of the turn, it will activate at the end of the turn.
(*3) If the skill's range is "Single Enemy," it will be "1 random enemy."

Also, if you add the following tag, the last enemy who dealt damage (*3) at the time of release will be the target for skill activation.

<AIS_リベンジターゲット>

(*3) If the skill is released by damage, it will activate the enemy who dealt the damage.
Enemies who dealt damage after release will not be targeted.

If no damage has been dealt to anyone at the time of release, the skill will activate according to the skill's range setting.

-----------------------------------------------------------------------------
License for this plugin (License)
-----------------------------------------------------------------------------
This plugin is released under the MIT license.

Copyright (c) 2017 Futokoro
http://opensource.org/licenses/mit-license.php

Futokoro's Plugin Repository
https://github.com/futokoro/RPGMaker/blob/master/README.md

-----------------------------------------------------------------------------
Change History
-----------------------------------------------------------------------------

v1.3.2 - 2018/09/07: Bug Fixes
1. Fixed an issue where an error would occur on the next action if a character with multiple actions activated an automatic skill when combined with FTKR_AlternatingTurnBattle.js.
2. Fixed an issue where a skill set to activate when a state is released at the end of a turn would activate on the next turn when combined with FTKR_AlternatingTurnBattle.js.

v1.3.1 - November 4, 2017: Help revisions

v1.3.0 - November 4, 2017: Traits additions, specification changes
1. Changed the code that references the parameters of the character who acted in the activation condition expression.
2. Added a Traits to reference used skills by item code in the activation condition expression.

v1.2.0 - November 2, 2017: Traits additions
1. Added the ability to set skill activation conditions for jobs, equipment, and states.

v1.1.0 - June 28, 2017: Traits additions, tag name changes
1. Added the ability to set automatic skill activation conditions for actors.
2. Changed the alphabetical name of the activation condition tag.

v1.0.0 - May 3, 2017: First version created

-----------------------------------------------------------------------------

スポンサードリンク

-MV plugins

Copyright© PGMV - The Community-Driven Plugin Library for RPG Maker MV , 2026 All Rights Reserved.