MZ Adding Adjustable Plugin Parameters (Solved)

Ive made a plugin to enhance the effect of luck differences when calculating if someone receive a status ailment or not. Ive realized it would be tedious, during playtesting, to constantly adjust the values on the .JS file directly, then go to Plugin > press refresh each time. I would like to add a "Plugin Parameter" so that the user (might put it on Itch later on) can adjust the values with up and down arrows or simply enter their own numbers via the plugin menu.

What would I need to add, and how should I do so, in this context? I would like its parts explained, if easily done. I've added the plugin's current content in the spoilers button below. Thanks in advance!

Spoiler: Luck Effect Booster.js
Code:
//=============================================================================
// Luck Effect Booster.js
//=============================================================================
/*:
 * @plugindesc [v1.O] Raises the intensity of Luck in Luck value differences.
 * @Target [MZ]
 * @author Nirriti
 * @url https://succubus-nirriti.itch.io
 * @help [ DESCRIPTION ]
 * Default Rate: For each point differences in Luck of 100, add +1O%/-1O%
 * chances to inflict or resist a status ailment during battle. This is too
 * low. This plugin enables a wider range of effective luck difference bonus.
 * The default values (RMMZ engine): O.OO1 : O.O. CURRENT: +2O%.
 *
 *
 *  [ VALUE CHANGES / DIFF BONUS ]     [IF DIFF:1OO] [IF DIFF:5O]
 *
 *      O.O1O:       + 1.O % Bonus        + 1OO %       + 5O %
 *      O.OO8:       + O.8 % Bonus        +  8O %       + 4O %
 *      O.OO5:       + O.5 % Bonus        +  5O %       + 25 %
 *      O.OO4:       + O.4 % Bonus        +  4O %       + 2O %
 *      O.OO3:       + O.3 % Bonus        +  3O %       + 15 %
 *      O.OO2:       + O.2 % Bonus        +  2O %       + 1O %
 *      O.OO1:       + O.1 % Bonus        +  1O %       +  5 %
 *
 *
 * [ COMPATIBILITY ]
 * Made for RPGMaker MZ as a standalone plugin.
 *
 */
 

(function() {

Game_Action.prototype.lukEffectRate = function(target) {
    return Math.max(1.0 + (this.subject().luk - target.luk) * 0.002, 0.0);

};
Ive realized it would be tedious, during playtesting, to constantly adjust the values on the .JS file directly, then go to Plugin > press refresh each time
FWIW, if the change youre making is to the js file you dont need to refresh the plugin list between changes. you just need to press f5 ingame to reload the game (or overwrite your functions directly within the console).

I would like to add a "Plugin Parameter" so that the user (might put it on Itch later on) can adjust the values with up and down arrows or simply enter their own numbers via the plugin menu.
you can use this page to see how to set them up and use them. I cant think of anything there thatd work differently between mv and mz
I cant think of anything there thatd work differently between mv and mz
MZ has the following additional "types" (unfortunately, I don't have the source)

- color
- icon
- map
- location
It also has dependency directives and a dedicated URL directive:

JavaScript:
/*:
@target MV MZ
@base <pluginID>
@orderAfter <pluginID>
@orderBefore <pluginID>
@url <webURL>
*/

Other than that, there's the fact that @require and @noteRequire aren't needed in MZ (but I'd include them anyway!) and the method of defining plugin commands. (Speaking of @noteRequire and the related directives for defining note tags for Exclude Unused Files – that's not covered in Robro's link, but you can find it in the official documentation from the Help menu.)

The source I use is here. It's in Japanese, but automatic translation should be mostly sufficient – just beware that it mangles the actual code.

It would definitely be helpful if someone were to gather all this information in one place though…
Managed to get it working after a lot of headaches, trials and errors (a friend also helped me understanding parts of the code through outside examples (like how RetroAchievement's system is coded!)) Learned a lot... What helped the most was analyzing previous plugins I had from various source. Displaying them in Telegram (with monospace formatting) has all the code looking much easier to parse through, like if using Notepad++.

  1. So if you set two @ help, the previous one is overwritten. You can also make an "IF"-like description for various languages.

  2. You can name values differently inside the 'comment' (word?) section of the .js via @ param and then make a call inside the (function(){ (with the name specified name involved).

  3. The engine has troubles with handing decimals when it comes to the UP and DOWN arrows. In my case, I set my @ max(arbitrarily) to 0.100 @ min to 0.001 (default of the engine). So pressing the arrows worked as a binary, only switching between the two values. Thats okay, I wrote a memo in the @ desc box below to type it manually. Works that way.

  4. @decimals 3 was needed or else it only displayed 0.

Thanks Robro33 (and the rest)! Honestly, without looking up other plugins, Id have never guessed a large part of it all (lots of parts make no sense to the untrained). Here's how the relevant part looks for those curious:

Spoiler: Plugin's End.
Code:
 * @param LuckValueBonus
 * @text Luck Value [% Bonus]
 * @desc Enter the bonus value per points of luck  differences.
 * The arrow buttons are broken: Type manually. Default values: O.OO1
 * @default 0.001
 * @type number
 * @decimals 3
 * @max 0.100
 * @min 0.001
 *
 */
 

(function() {
"use strict";

    const name = 'Luck Effect Booster';
    const parameters = PluginManager.parameters(name);
    let luckValueBonus = Number(parameters['LuckValueBonus'] || 0.001);


    Game_Action.prototype.lukEffectRate = function(target) {
    return Math.max(1.0 + (this.subject().luk - target.luk) * luckValueBonus, 0.0);
    };


})();

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/adding-adjustable-plugin-parameters-solved.183352/