Introduction
Allows the use of formulas to adjust the invocation speed of skills and items, and adjusting base speed formula.
How to use
Save it as APHO_SpeedEval.js and put it in your plugin folder.
If you are using YEP_BattleEngineCore.js, this needs to be placed below it.
Use the following notetags in your skills/items:
JavaScript:
<speed>
//Code goes here; perform operations on 'speed'.
</speed>
复制代码
The code will be run after all the default speed calculations.
You can use 'a' to reference the user.
Examples
JavaScript:
<speed>
speed += a.atk;
</speed>
复制代码
This will increase the invocation speed by the user's Attack.
JavaScript:
<speed>
speed = 0;
</speed>
复制代码
This will set the invocation speed to 0, ignoring Agility or the invocation speed set in the editor.
The base speed can also be adjusted from the plugin parameter 'Base speed'.
By default, RMMV has some random variance added to base speed.
This plugin's default settings will remove the random variance.
Script
Spoiler: CODE
JavaScript:
//==========================================
// APHO_SpeedEval.js
//==========================================
/*:
* @title Speed Eval
* @author Apho
* @plugindesc v1.1 Allows the use of formulas to adjust the invocation speed of skills and items, and adjusting base speed formula.
*
* @param Base speed
* @desc Formula to determine base speed.
* @default agi
* @help
*
* This plugin allows the developer to use evals to adjust the invocation speed
* of skills and items.
* To do so, use the following notetags in your skills/items:
*
* <speed>
* //Code goes here; perform operations on 'speed'.
* </speed>
*
* The code will be run after all the default speed calculations.
* You can use 'a' to reference the user.
*
* EXAMPLES:
* <speed>
* speed += a.atk;
* </speed>
* This will increase the invocation speed by the user's Attack.
*
* <speed>
* speed = 0;
* </speed>
* This will set the invocation speed to 0, ignoring Agility or the invocation
* speed set in the editor.
*
* The base speed can also be adjusted from the plugin parameter 'Base speed'.
* By default, RMMV has some random variance added to base speed.
* This plugin's default settings will remove the random variance.
*
* TERMS OF USE
* - Free for commercial and non-commercial use, as long as I get a free copy
* of the game.
* - Edits allowed for personal use.
* - Do not repost or claim as your own, even if edited.
*
* VERSION HISTORY
* v1.1 - 2022/9/10 - Optimized code to improve compatibility with other plugins.
Free for commercial and non-commercial use, as long as I get a free copy of the game.
Edits allowed for personal use.
Do not repost or claim as your own, even if edited.
Do not use for training AI models. This includes, but is not limited to, inputting the plugin contents or part thereof into AI models that train on user input.
Version history
v1.2 - 2023/6/1 - Fixed a bug that caused incompatibility issues with other turn order display plugins.
v1.1 - 2022/9/10 - Optimized code to improve compatibility with other plugins.