Testing a text-scroll command for an intro, I realized that even the lowest value could be slowed a little more, via a plugin. I've made one, and replicating parts of the LuckEffectBooster plugin Ive made not too long ago, I though it would work, but it doesnt. As it is, no text appears at all. It DID work beforehand, before I added '@ Param' (2).
EDIT: Also before I added 2x 'const name = 'XXX'', 2x 'const parameters.'
The reasons I've added the '@ Param' parts is so that the user could adjust it all on the fly (without needing to edit the .js directly. More user friendly and less destructive this way). I'd like to release it for free on Itch and RMN (later on). It'll probably be simple to correct for many of you, but I'd appreciate if you could ALSO explain what I did wrong, and why it was wrong. I want to learn (and hopefully have a chuckle in the process). Thanks.
EDIT: Also before I added 2x 'const name = 'XXX'', 2x 'const parameters.'
The reasons I've added the '@ Param' parts is so that the user could adjust it all on the fly (without needing to edit the .js directly. More user friendly and less destructive this way). I'd like to release it for free on Itch and RMN (later on). It'll probably be simple to correct for many of you, but I'd appreciate if you could ALSO explain what I did wrong, and why it was wrong. I want to learn (and hopefully have a chuckle in the process). Thanks.
JavaScript:
//=============================================================================
// Text Scroll Speed Adjuster.js
//=============================================================================
/*:
* @plugindesc [v1.1] Lowers min. TextScroll Speed + Boost FF rates.
* @target MZ
* @author SuccubusNirriti
* @url https://succubus-nirriti.itch.io
* @help [ DESCRIPTION ]
By default, the slowest SCROLL-TEXT speed is somewhat fast.
This plugin enables to you greatly lower the floor value.
ScrollSpeed Divide: Engine's default value is "2." If you
want slower, increase the number. 3 is enough. Limit: 5.
*
* Additionally: You can adjust the FAST-FORWARD rate when the
* player holds the Accept/Shift button(s) on their controller
* or keyboard. Default is 3. Limit: 10.
*
*
*
* [ COMPATIBILITY ]
* Made for RPGMaker MZ as a standalone plugin.
*
* @param ScrollDivide
* @text ScrollSpeed Divide
* @desc Division factor to lower the speed floor of
* the text-scroll command. Engine's default value is "2."
* @default 2
* @type number
* @max 5
* @min 1
*
*
* @param FastForwardEX
* @text Fast-Forward Rate
* @desc Held-Button Fast-Forward rate Multiplier.
* Engine's default value is "3."
* @default 3
* @type number
* @max 10
* @min 1
*/
Window_ScrollText.prototype.scrollSpeed = function() {
const name = 'ScrollDivide'
const parameters = PluginManager.parameters(name);
let speed = $gameMessage.scrollSpeed() / Number(parameters['ScrollDivide']);
if (this.isFastForward()) {
speed *= this.fastForwardRate();
}
return speed;
};
Window_ScrollText.prototype.isFastForward = function() {
if ($gameMessage.scrollNoFast()) {
return false;
} else {
return (
Input.isPressed("ok") ||
Input.isPressed("shift") ||
TouchInput.isPressed()
);
}
};
Window_ScrollText.prototype.fastForwardRate = function() {
const name = 'FastForwardEX'
const parameters = PluginManager.parameters(name);
return Number(parameters['FastForwardEX']);
};
Window_ScrollText.prototype.terminateMessage = function() {
this._text = null;
$gameMessage.clear();
this.hide();
};