Preserved forum archive. This topic stores the original first post and locally mirrored RPG Maker Web attachments when available. It is posted by the BMMPlay archive account, not by the original creator.
Original Source
- Original title: TSR_NumPad
- Original author: TSR
- Original date: February 11, 2023
- Source thread: https://forums.rpgmakerweb.com/threads/tsr_numpad.154887/
- Source forum path: Game Development Engines > RPG Maker Javascript Plugins > JS Plugin Releases (RMMZ)
Summary
{ "lightbox_close": "Close", "lightbox_next": "Next", "lightbox_previous": "Previous",
Archived First Post
This plugin replace the default number input process with a numeric pad where digits are input from right to left like a classic calculator. Navigate the pad with keyboard arrows or mouse, or directly type the digits on the keyboard to input numbers in game.
HOW TO USE:
-Install the plugin in your Plugin Manager
-Use the default event command: 'Number Input Process'
Same as default, set the max digits and the game variable ID that will store the input number. Once you confirm and close
the number input pad, the returning value will be stored in that game variable.
The numeric pad will adjust to the position of the message window.
The plugin also provide a few additionnal features like the possibility to input negative and floating values.
All settings are done using plugin commands so each time you need a number input, the numeric pad can be set as needed.
For further details, consult the plugin instructions:
Happy game dev!
Regards.
TSR
HOW TO USE:
-Install the plugin in your Plugin Manager
-Use the default event command: 'Number Input Process'
Same as default, set the max digits and the game variable ID that will store the input number. Once you confirm and close
the number input pad, the returning value will be stored in that game variable.
The numeric pad will adjust to the position of the message window.
The plugin also provide a few additionnal features like the possibility to input negative and floating values.
All settings are done using plugin commands so each time you need a number input, the numeric pad can be set as needed.
For further details, consult the plugin instructions:
Code:
* ===================================================================================
* == About this Plugin ==============================================================
* ===================================================================================
* This plugin replace the default number input process with
* a numeric pad. Navigate the pad with keyboard arrows or
* mouse, or directly type the digits on the keyboard to
* input numbers in game.
*
* HOW TO USE:
*
* -Install the plugin in your Plugin Manager
* -Use the default event command: 'Number Input Process'
*
* Same as default, set the max digits and the game variable ID
* that will store the input number. Once you confirm and close
* the number input pad, the returning value will be stored in
* that game variable.
*
*
* Using plugin commands, you can set 3 different layouts for the
* numeric panel:
*
* Layout 1
* ========
* This is the basic layout:
*
* 1 2 3
* 4 5 6
* 7 8 9
* C 0 Ok
*
* Buttons:
* Digits [0-9] = input a digit
* Ok = confirm the input and close
* C = delete last digit, close if no inputs
*
*
* Layout 2
* ========
* This layout allow to return negative values.
*
* 1 2 3 C
* 4 5 6 AC
* 7 8 9 +/-
* 0 Ok
*
* Additional buttons:
* AC = delete all digits, close if no inputs
* +/- = toggle On/Off the minus sign, return
* negative values when On
*
*
* Layout 3
* ========
* This layout add the dot (.) button to turn the
* number into a floating value.
*
* 1 2 3 C
* 4 5 6 AC
* 7 8 9 +/-
* . 0 Ok
*
* Additional button:
* . = input a dot to turn the number into a
* floating value***
*
*
* *** Floating value ***
*
* The input number is returned inside a game variable.
* By default game variables cannot stored floating numerical
* values, so when the input number is a floating value, the
* plugin will return the value as a string (text), see bellow.
*
* ******************************************************
*
*
*
* Plugin commands
* ===============
*
* -Number input layout:
* Select between one of the 3 layouts described above
*
*
* -Number input font face:
* Select between the main font face or the number font
* face for the number input windows.
*
* *the main font face and the number font face are
* the 2 default font faces set in the data base.
*
*
* -Input leading zeros:
* If you want the returning combination to includes '0'
* in front, like: 0246, you can enable the leading zeros.
* Note that in this case the returning value will be a
* string (text), see bellow.
*
*
* -Number input auto close:
* When enabled, the number input windows will automatically
* confirm and close when the last digits is input.
*
* Ex:
* You have set the maximum digits to 4.
* The number input process will close as
* soon as a fourth digit is input.
*
*
* -Revert digits layout:
* Revert the first and second digits rows.
*
* revert no revert
* 7 8 9 1 2 3
* 4 5 6 4 5 6
* 1 2 3 7 8 9
*
*
*
* ** String values **
* **********************************************************
* When the returning value is a string, you cannot directly
* compare it to a numerical value, and math operations using
* a string value might render unexpected results.
*
* A string value can be convert to a numerical value using
* the parseInt method in js.
*
* Ex: parseInt('123') = 123
*
* But doing that will remove any leading zeros and round up
* floating values.
*
* The parseFloat method can be use for returning the floating
* value of a string.
*
* Ex: parseFloat('0.56') = 0.56
*
*
* For direct comparison, you can simply check if the returing
* value is equal to the corresponding string (between quotes).
*
* Ex: If the returning value is '00456' and is stored
* in the game variable X.
*
* You can check if:
* $gameVariables.value(X) === '00456'
*
*
* Important notes:
*
* -Float
* If you're using the Layout 3. The returning value
* will be a string only if it contains a dot ('.').
* Otherwise it will return a numerical value.
*
* -Leading zeros
* If you have enabled the 'Leading zeros' option, the
* returning value will always be a string, even if it
* doesn't contains any leading zeros.
*
* **********************************************************
Code:
* ================================================================================
* == Term of Usage ===============================================================
* ================================================================================
*
* Use in any independant RPG Maker MZ projects, including commercials.
*
* Credit is required for using this Plugin.
* For crediting, use 'TSR' along with one of
* the following terms:
* 'The Northern Frog' or 'A frog from the north'
*
* Do not change the Header or the Terms of usage.
*
* You can edit it as you like for you project.
*
*
* DO NOT REDISTRIBUTE!
* If you want to share it, share the link to my itch.io account:
* https://the-northern-frog.itch.io/
*
*
* ================================================================================
Happy game dev!
Regards.
TSR
Downloads / Referenced Files
Log in to download
Log in, then follow the RPG Maker Developers Group to see these download links.
Log in to downloadLicense / Terms Note
* Use in any independant RPG Maker MZ projects, including commercials. * * Credit is required for using this Plugin. * For crediting, use 'TSR' along with one of
Creator Claims / Removal
If you are the original creator and want this listing reassigned, edited, or removed, join BMMPlay and contact the moderators with proof that matches the original RPG Maker Web profile, linked GitHub, itch.io page, or another public creator identity.
Replies (0)
No replies yet.
0
replies
1
view
Topic Summary
Loading summary...