MZ Change Text Speed

This is just a modification of a native function of the Window_Base class.
Thanks to anyone who can test and let me know if you find any problems.

Options:
Set 0 to Instant text
Set from 1 to 20 to slow down

Config:
Set in Plugin Default speed
Change the speed through "Plugin Command"

Script:
JavaScript:
/*:
 * @target MZ
 * @plugindesc Sound per character on dialogue.
 * @author DevWithCoffee
 *
 * @help filename: RMMZ-SpeedDialogue.js
 * Script is just a modification of Rpg Maker's native function
 * so it is not necessary to credit the author and
 * it can be used in commercial projects
 *
 * Config:
 * Set in Plugin Default speed
 * Change the speed through "Plugin Command"
 *
 * Options:
 * Set 0 to Instant text
 * Set from 1 to 20 to slow down
 *
 * @param Speed
 * @type number
 * @desc Set Speed
 * @default 10
 * @min 0
 * @max 20
 *
 * @command Speed
 * @text Change Config
 * @desc Change the speed dialog here.
 *
 * @arg Speed
 * @text Speed
 * @type number
 * @default 10
 * @min 0
 * @max 20
 * @desc Select the Speed
 */

(() => {
    const pluginName = "RMMZ-SpeedDialogue";
    var parameters = PluginManager.parameters(pluginName);
  
    PluginManager.registerCommand(pluginName, 'Speed', args => {
        parameters.Speed = args.Speed;
        PluginManager.loadScript(pluginName);
    });

    Window_Base.prototype.processCharacter = function(textState) {
        /*------------ Modification here ------------*/
        this._waitCount = parameters['Speed'];
        this._showFast = true;
        /*------------------- end -------------------*/
        const c = textState.text[textState.index++];
        if (c.charCodeAt(0) < 0x20) {
            this.flushTextState(textState);
            this.processControlCharacter(textState, c);
        } else {
            textState.buffer += c;
        }
    };
})();
Throws a Error Argument must be a Rectange :L
Could you send me a screenshot of the error in the game?

@Edael
Oh, wait, apologies, I was using a different text speed plugin that was causing that issue
Tho trying your plugin it just seems to cause text to be instant, regardless of the default speed value or the use of plugin commands, this is with and without any other plugins being turned on...
What was the name of the JS file when you saved it in the Plugins folder?
...Oh my, the file name itself can cause a plugin to not work? Sorta just gave it a generic name, didn't realize that would cause issues. It seems to be working perfectly now.

I'm sorry :hswt:
(facing palming hard rn)
...Oh my, the file name itself can cause a plugin to not work? Sorta just gave it a generic name, didn't realize that would cause issues. It seems to be working perfectly now.

I'm sorry :hswt:
(facing palming hard rn)
Glad it worked, thanks for NOT reacting to the top post...

Original thread: https://forums.rpgmakerweb.com/threads/change-text-speed.156228/