MZ Text Scroll Speed Adjustment

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.

Spoiler: Plugin's Content (WIP)
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();
};
I only skimmed that and haven't used the plugin syntax, but when you have 'const name =' shouldn't you write your plugin name there instead of the parameter name? Also, if your plugin name has spaces, it's better to write it without spaces, or so I understand.
That was it, good find!

When I replicated part of the previous Luck plugin mentioned above, I must have confused similar strings of words carelessly. Now the text displays proper! 👍 As for file names... That would explain why so many well known plugin makers add a "_" between words and/or stick them together. I liked it with space but I'll follow suit then. Thanks!

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/text-scroll-speed-adjustment.184022/