Number Input Max/Min (Number Input Extremum)

Number Input Max/Min V1.0​


This is a conversion of dragon3025's Number Input Extremum. I'm not a programmer so apologies if there are issues. I just wanted to use this for myself and thought I'd share.

This allows you to control the Number input to set a Max and Minimum value that the player can select from by setting a Max and Min Variable. Digits will also increment.


How can I use this?

You can event a bank where the player can only store as much money as they actually have.

Or if you want to event a shop without using the Shop Scene. Instead of letting them choose more items than they can afford and forcing them to choose again. You can calculate how many they can actually buy and set that number as the Max.

Min is probably useful too, idk.


NumberInput2.gif


Download:
GitHub​
it looks like a nice idea, but checing the plugin, the plugin commands
aren't MZ, but MV as MZ uses "PluginManager.registerCommand(pluginName, "ParamName", args => {}"
if not mistaken, as there aren't "args" in the parameter as well.

I can be mistaken, but not sure why you "else if" later as well.

if it does work on MZ, you have a screenshot for that?

I dont have use for it, but it sound cool otherwise 🙂
it looks like a nice idea, but checing the plugin, the plugin commands
aren't MZ, but MV as MZ uses "PluginManager.registerCommand(pluginName, "ParamName", args => {}"
if not mistaken, as there aren't "args" in the parameter as well.

I can be mistaken, but not sure why you "else if" later as well.

if it does work on MZ, you have a screenshot for that?

I dont have use for it, but it sound cool otherwise 🙂
I'm not a coder, so it's probably not formatted well. It's based off a plugin from MV but i made it work for MZ.

The gif I posted shows the plugin working in MZ.
so far I notice that, but the max value/min value when rechecked is more
the variable Number you check.

if this is based of MV plugin already, they can easely add "MZ" plugin commands
to it or just using the variables I think.

but try to understand how MZ plugin commands works if you want them there
effectively 🙂

I dont exactly know how MZ plugin commands works either, so I cannot help
you on that part, but it looks cool, but I dont know why 2 digits if they mostly
run to 99 on 2 digits than 0, unless you have a more specific reason to cap it.

but I might find some idea's on that part, as it could be intresting.

the only thing I can think about if you can hold 150 gold on pocket, and
bank infinited, so you want to cap it on gold withdraw if you have 144 gold
and need 150 so you can only withdraw 6 gold.

I dont know any other way for it, maybe for items and max items, but I want
to hear more of this kind of idea's, as it can come in handy 🙂
so far I notice that, but the max value/min value when rechecked is more
the variable Number you check.

if this is based of MV plugin already, they can easely add "MZ" plugin commands
to it or just using the variables I think.

but try to understand how MZ plugin commands works if you want them there
effectively 🙂

I dont exactly know how MZ plugin commands works either, so I cannot help
you on that part, but it looks cool, but I dont know why 2 digits if they mostly
run to 99 on 2 digits than 0, unless you have a more specific reason to cap it.

but I might find some idea's on that part, as it could be intresting.

the only thing I can think about if you can hold 150 gold on pocket, and
bank infinited, so you want to cap it on gold withdraw if you have 144 gold
and need 150 so you can only withdraw 6 gold.

I dont know any other way for it, maybe for items and max items, but I want
to hear more of this kind of idea's, as it can come in handy 🙂
The cap can be used for any amount of digits. I prefer using variables for the plugin as it can be used for math. I've given two examples of uses for it already, but it can be used for other things. It only affects the number input though.
Made an acc an am bumping this thread because I'm at my wit's end.
I'm using RMMV and I need the max input based on a variable. The player collects tokens throughout their adventure and at certain points the game is supposed to prompt the player to use tokens, the number of which is up to the player. Obviously, the amount the player can put in may not exceed the amount of tokens in the inventory, hence I need to cap the input number command at a variable equal to tokens in the inventory.
This script is the closest I've found to this, however: It just doesn't work on RMMV. Unless I deactivate the plugin, the value of the number doesn't change. Can anyone double check this for me? Since this plugin is based on an RMMV plugin I was hoping it would work on RMMV, but unfortunately it seems it'll only work on RMMZ.
(And if anyone with coding experience is watching my I kindly request a rewrite of this plugin for RMMV pretty pretty please?)
I'm using RMMV
As stated in the OP, this is a port of an MV plugin:
This is a conversion of dragon3025's Number Input Extremum.
Here's a link to that plugin's thread:
Thanks for the reply, I tried out the original plugin as well, unfortunately it's missing the option to put in a variable's value as an extremum.
Well, I'll continue my search (or learn how to code ...)

Original thread: https://forums.rpgmakerweb.com/threads/number-input-max-min-number-input-extremum.157550/