Introduction
Allows for playing a random animation when landing a crit.
How to use
Save it as APHO_RandomCriticalAnimation.js and put it in your plugin folder.
Fill the Animation List with a list of animations you'd like to play on crit, separated by a comma. (e.g.
1,2,4
复制代码
)
Specify when you want the animations to be mirrored.
Never mirror - never mirrors the critical animation
Mirror if target is actor - the animation will be mirrored only if the target is an actor (default RMMV behaviour)
Mirror at random - the animation has a 50% chance of being mirrored.
You may also opt to use a different pool of animations for critical heals; if so you'll need to fill the heal animation list.
Script
Spoiler: code
JavaScript:
//==========================================
// APHO_RandomCriticalAnimation.js
//==========================================
/*:
* @title Random Critical Animation
* @author Apho
* @plugindesc v1.0 Allows for playing a random animation when landing a crit.
*
* @param AnimList
* @text Animation List
* @type string
* @desc Pool of animation IDs to play on crit. Separate values with a comma.
*
* @param MirrorAnim
* @text Mirror Animations
* @type select
* @option Never mirror
* @value 0
* @option Mirror if target is actor
* @value 1
* @option Mirror randomly
* @value 2
* @desc When should critical animations be mirrored?
* @default 0
*
* @param AnimDelay
* @text Animation Delay
* @type number
* @desc Delay before the animation is played, in frames.
* @default 0
*
* @param HealAnim
* @text Crit Heal Animations
* @type select
* @option No animation
* @value 0
* @option Same as regular crits
* @value 1
* @option Use custom pool (defined below)
* @value 2
* @desc Should critical heals have an animation?
* @default 2
*
* @param HealAnimList
* @text Animation List (Heal)
* @type string
* @desc Pool of animation IDs to use for a crit heal. Separate values with a comma.
*
* @help
* Allows for playing a random animation on the target when landing a crit.
* Critical heals may optionally have their own animation pool.
*
* 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.0 - 2023/7/10 - Initial release.
*/
(function(){
var parameters = PluginManager.parameters('APHO_RandomCriticalAnimation');
var AnimList = parameters['AnimList'].split(",").map(Number);
var MirrorAnim = parseInt(parameters['MirrorAnim']);
var AnimDelay = parseInt(parameters['AnimDelay']);
var HealAnim = parseInt(parameters['HealAnim']);
var HealAnimList = parameters['HealAnimList'].split(",").map(Number);
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.0 - 2023/7/10- Initial release.