Kino

EIS Game Dev
Veteran
Joined
Nov 27, 2015
Messages
562
Reaction score
805
First Language
English
Primarily Uses
RMMV
Introduction



This plugin creates a new numerical pad, which you can use in your game.
This pad lets the player enter numbers, remove numbers from the buffer, and overall have a more robust numerical pad to use when they need to enter numbers.
This can be great for things like puzzles, or maybe a math game. It even comes with an area to to see the information you typed in.



One of the core features is that you can access the pad just about anywhere you can make a script call. The second thing is, it will pause the message
window until the player is done entering information.



One thing to note is that once you click "OK" on the pad, the pad will close, and the input is saved. The script calls below let you access that information, or open the pad at your leisure.

Check the website here for constant updates: http://endlessillusoft.com/cecilia-numerical-pad/

Instructions

  1. Place the script in your plugins folder with the same name Cecilia_Heart and Cecilia_NumericalPad

  2. Place Cecilia_Heart above Cecilia_NumericalPad

  3. Enjoy



Core Features

  • Shows maximum 9 characters

  • Going over 9 characters pushes the pointer forward and shows characters 2 - 10 for example, instead of 1-10.

  • Clearing the buffer by character using the X button

  • Ok saves the input buffer

  • Can pass the input, or value to a game variable

  • Can access input directly

  • Can store input upon pressing ok

  • Pauses message window upon starting input processing

  • Set your own window highlight (When people double click on it, you can highlight the window to be any color you choose -- make it pink if you want)

  • Adjusted window sizing, and grid layout for ease of use



Scripts


View attachment Cecilia_Heart.js


View attachment Cecilia_NumericalPad.js


Script Calls


/* Version 1.03
//=============================================================================
// Script Calls
//=============================================================================
* Currently there are only two necessary scripts calls for this plugin.
* The four script calls are accessPad, storeInGameVariable, getBufferDirectly.
*
* $numPad.accessPad()
* This script call summons the numpad using the positions you set on screen.
* The numpad is locked to that position unlike other windows of the Cecilia
* system. With that in mind, you can use the numpad buttons to enter numerical
* information. X clearing one number from the buffer at a time.
*
* $numPad.closePad()
* This script call closed the numpad automatically, and deactivates it.
*
* $numPad.storeInGameVariable()
* Example: $numPad.storeInGameVariable(6);
* This script call does as it says; it stores the input into a game variable
* after processing. The most important part about this, is that it does this once
* called. So, you need to either set up a wait for the user to input a number, or
* if you're summoning while a message window is open. The message window will wait
* until you click 'OK' on the pad, before advancing the text.
*
* $numPad.storeInGameVariableUponCompletion()
* Example: $numPad.storeInGameVariableUponCompletion(6);
* This does the same thing as the above, but instead the value will be stored once
* the user presses okay, and no waiting is require; it will be done automatically.
*
* $numPad.getBufferDirectly()
* This does as it says; it will return the number entered into the buffer upon
* completion of processing -- when you hit "OK". Then, you can use it as you want,
* like storing it in a game variable for later use or in some crazy script call.
* The choice is yours.
*/






Screenshots

Setup Example Window


CeciliaNumPad.png


We access the pad using $numPad.accessPad(); this opens the pad up, and pauses the advancement of the message window.


We set what variable to store the answer in using $numPad.storeInGameVariableUponCompletion(6); this stores it in game variable 6.


Updated Window -- now with Highlighting!


ScreenShot_7_31_2016_2_17_42.png


ScreenShot_7_28_2016_6_51_12.png


Example of overflowing the buffer


ScreenShot_7_28_2016_6_51_26.png



You can get constant updates on my website here: http://endlessillusoft.com/cecilia-numerical-pad/

Credits:


Free for both commercial and non-commercial use.Credit with the name Kino or Endless Illusion Software.


Thanks:
I appreciate you using this script, and I'm glad that it's able to help you.


If there are any bugs/issue, please contact me via message on the forums.


Note:
If you have any ideas, please feel free to mention them here.
 
Last edited:

pikotan

Villager
Member
Joined
Jun 7, 2016
Messages
23
Reaction score
5
First Language
english
Primarily Uses
It is amazing
This is ideal for creating a computer.


But I do not can not select a number If you do not click twice the window.
Do not be in such numbers can be selected when you click once in the focus state?
 

Kino

EIS Game Dev
Veteran
Joined
Nov 27, 2015
Messages
562
Reaction score
805
First Language
English
Primarily Uses
RMMV
As of right now it's designed for you to click twice to activate the window, but since it's locked to its position -- I might change it, or provide indication of an active state.


Stay tuned for an update!
 

pikotan

Villager
Member
Joined
Jun 7, 2016
Messages
23
Reaction score
5
First Language
english
Primarily Uses
Thank you. :)
I'm waiting for your update.
If the number can be selected in a single click I think it is very convenient.
 

Kino

EIS Game Dev
Veteran
Joined
Nov 27, 2015
Messages
562
Reaction score
805
First Language
English
Primarily Uses
RMMV
@pikotan @nilotech @Kyuukon @VanillaBrocker


It's been updated, and I think it's a lot better now; check it out!
You can also highlight your window -- the OK button and the X button both have color codes on them now. If you don't like them I can revert those changes, or make it an option to set your own colors.
 
Last edited by a moderator:

nilotech

Villager
Member
Joined
Jul 15, 2014
Messages
14
Reaction score
5
First Language
English
Primarily Uses
Hi Kino, thanks again. I will try the updated version and get back to you.  :)
 

vectorinox

Airport Luggage
Veteran
Joined
Jun 20, 2016
Messages
45
Reaction score
9
First Language
Singlish
Primarily Uses
Neat!


But is there a way to set the numpad window location?


I wanted it to be at the center.
 

nilotech

Villager
Member
Joined
Jul 15, 2014
Messages
14
Reaction score
5
First Language
English
Primarily Uses
Hi Kino, great job with the appearance of the number pad. The OK and X ‘buttons’ are the perfect colour and all the padding are adjusted effectively. That being said:


·         After following your example, (Lilith) I am still unable to have both the number pad and the message window opened at the same time which is a critical game play element in my games. I cannot figure out what I am doing wrong. I could try to modify my game play to suit the plugin if both windows cannot be opened at the same time but I see that they can. What I would also prefer though, once both windows are opened at the same time that the number pad OK button closes the message window. Within the number pad code something to the effect of: if message window open then close, else close self, do nothing. Etc.


·        Also... My hero/character can still move and interact with NPCs and other game events while the number pad is open, which take effect immediately upon closing the number pad. I would prefer no movement and any interaction with any part of the screen/gaming area until the pad is closed. Having interaction without having to input a number or without closing the pad first will greatly affect the game play. Of course there would be no movement/interactions with the message window open.


Interesting to note; using \^ - Do not wait for input after displaying text (Text to display Control Characters) in a message, the number pad pops up, highlighted and takes input with only one click! Obviously this would not be efficient since the player would need to read the message and would be unable to do so in that short space of time. Additionally, if repeated within the game, the pad pops up with OK highlighted in the default green box. Perhaps because it was the last box highlighted when the window was closed. Thought this may be useful information when updating the plugin.


I hope this will help with further improvements.


Thanks again.
 
Last edited by a moderator:

nilotech

Villager
Member
Joined
Jul 15, 2014
Messages
14
Reaction score
5
First Language
English
Primarily Uses
Hey, Vectorionx, to move the pad to the center of the screen change the X and Y positions in the plugin parameters. Y is set to 210 by default. You will have to experiment with positioning by trial and error. Try working with 48s. That is 48, 96, 144 etc. or any number until you get it centered. 
 
Last edited by a moderator:

nilotech

Villager
Member
Joined
Jul 15, 2014
Messages
14
Reaction score
5
First Language
English
Primarily Uses
Hey, Vectorionx, to move the pad to the center of the screen change the X and Y positions in the plugin parameters. Y is set to 210 by default. You will have to experiment with positioning by trial and error. Try working with 48s. That is 48, 96, 144 etc. or any number until you get it centered. 


Neat!


But is there a way to set the numpad window location?


I wanted it to be at the center.
 

pikotan

Villager
Member
Joined
Jun 7, 2016
Messages
23
Reaction score
5
First Language
english
Primarily Uses
It's been updated, and I think it's a lot better now; check it out!You can also highlight your window -- the OK button and the X button both have color codes on them now. If you don't like them I can revert those changes, or make it an option to set your own colors.



fantastic, thanks for doing this so quickly!


If you and another cited a desire, How do you hide the Cecilia_Heart window as you say is nilotech?
I see this in the flip of a switch, it is ideal if they can hide.


finally...


Nice job:3
 
Last edited by a moderator:

Kino

EIS Game Dev
Veteran
Joined
Nov 27, 2015
Messages
562
Reaction score
805
First Language
English
Primarily Uses
RMMV
There's  a param to turn off the heart window if you go to the plugin manager;  you can turn it off by right  clicking the plugin. @pikotan
 

pikotan

Villager
Member
Joined
Jun 7, 2016
Messages
23
Reaction score
5
First Language
english
Primarily Uses
I What a ignorant ...
Thank you you're a life saver
 

Kino

EIS Game Dev
Veteran
Joined
Nov 27, 2015
Messages
562
Reaction score
805
First Language
English
Primarily Uses
RMMV
After following your example, (Lilith) I am still unable to have both the number pad and the message window opened at the same time which is a critical game play element in my games. I cannot figure out what I am doing wrong. I could try to modify my game play to suit the plugin if both windows cannot be opened at the same time but I see that they can. What I would also prefer though, once both windows are opened at the same time that the number pad OK button closes the message window. Within the number pad code something to the effect of: if message window open then close, else close self, do nothing. Etc.



Try moving the number pad to the bottom of your plugin list along with the Cecilia_Heart plugin. 
Some plugins tend to make modifications to the message window -- if they have, it may prevent you from getting the same effect as I have as a result. @nilotech


Right now, it's set up so that when the numerical pad is open/active, the message window will not update input essentially, pausing text, etc.


The effect you see there in your quote is an example of that, if you want to open up the message_window while having the numpad open, you're going to want to use the show text command first then in your event page, use the script call $numPad.accessPad() right after. It might help to show me a screenshot of the event in question.

Also... My hero/character can still move and interact with NPCs and other game events while the number pad is open, which take effect immediately upon closing the number pad. I would prefer no movement and any interaction with any part of the screen/gaming area until the pad is closed. Having interaction without having to input a number or without closing the pad first will greatly affect the game play. Of course there would be no movement/interactions with the message window open.



I can understand not being able to interact with the game area at all, but I think for other users it would also make the plugin a lot less flexible. One thing I can recommend is if you want to prevent the user from interacting with anything but the numpad is to setup two common events to do this.


Instead, I made a short script, which allows you to disable player movement whenever you like. This will make it so the player can't really interact with anything else but the open window. I also updated the source files with minor changes, so okay or, the last button isn't highlighted when you open the pad again.


Script:


View attachment EISGamePlayerStopMove.js


I've done this myself, so here:


Code Snippets


$numPad.accessPad();
$gamePlayer.stopMove(true);
$gameSwitches.setValue(2, true);
//You're going to want to change the 2 here to whichever switch you want to use, and set to on using true.



Code:
var scene = SceneManager.getCurrentSceneCLI();
var numPadWindow = scene.getWindowFromCLIList("numpad");
if(!numPadWindow.isOpen() && !numPadWindow.isOpening()) {
  $gamePlayer.stopMove(false);
  $gameSwitches.setValue(2, false);
  //Once again set the number 2 to whichever switch you're using for the openPad common event in the screenshot below, then set to false
}

Common Event Setup


CeciliaNumPadCmn1.png


CeciliaNumPadCmn2.png


The console logs are irrelevant, I was just using them for testing purposes.





You can then call the common event like a script call whenever you want like so:

Code:
$gameTemp.reserveCommonEvent(4);
//Or if you want to use the Cecilia System Code -- either option works
Cecilia.callCmnEvent(4)
//In my case it's 4, because it's set to common event 4; common event 5 will be called automatically when switch 2 is on.
 
Last edited by a moderator:

nilotech

Villager
Member
Joined
Jul 15, 2014
Messages
14
Reaction score
5
First Language
English
Primarily Uses
Hi there, thanks for your advice. I will try out everything stated here and get back to you on how it turned out.


Thanks again for your time and effort in creating this plugin. :)
 

vectorinox

Airport Luggage
Veteran
Joined
Jun 20, 2016
Messages
45
Reaction score
9
First Language
Singlish
Primarily Uses
Hey, Vectorionx, to move the pad to the center of the screen change the X and Y positions in the plugin parameters. Y is set to 210 by default. You will have to experiment with positioning by trial and error. Try working with 48s. That is 48, 96, 144 etc. or any number until you get it centered. 

Thanks! I'll try it out. I'm always confused on how the x,y coordinate works on the screen.
 

Kino

EIS Game Dev
Veteran
Joined
Nov 27, 2015
Messages
562
Reaction score
805
First Language
English
Primarily Uses
RMMV
The top left corner is consider 0, 0 so, remember that. @vectorinox So, positive numbers will always move you to the right (x), or down (y).
 

nilotech

Villager
Member
Joined
Jul 15, 2014
Messages
14
Reaction score
5
First Language
English
Primarily Uses
Hey Kino, my internet was out for awhile but I am happy to inform you that everything is working well with the plugin. Strange though, I didn't do anything but restarted the program (I put my computer to sleep with RPGMV open when I am not using it). Message windows are popping up with the number pad and as a result my hero cannot move, which is exactly what I want.


However there are two things you can look into. These are just minor and can be worked around though.

  • I've noticed, sometimes a zero is returned as an input when used message. Eg. This is my number \v[21, where 21 is the variable the number is stored in. I think it probable has to do with updating/refreshing the buffer. The zero does not affect the comparison thus far even though in the message my number (input) is sometimes displayed as a zero. Eg... A code may be 345... I would input 345... the text message: Processing.... (see image 1) displays 0 (sometimes) but I will still get an accurate response because 345 = 345 when the Control Answer is compared to Player Answer. The display part is just messed up... The work around to this is simply not display the number in a message... I rather not as it serves as a reminder of what was your input. Plus I intend to use commas in the display to show the numbers as it is the focus of this game. Eg. 1,234,567.


  • Secondly, to make the pad a bit more interactive, sound effects could be added to the numbers, OK and X 'buttons,' similar to the Name Input Processing. 

If I come across any other issue, I will share them with you.


Again thank you  so much and then some for this plugin! It really has made a difference to my game(s).  :guffaw:

NumDis.png
 

Kyuukon

主人公
Veteran
Joined
Aug 22, 2013
Messages
2,257
Reaction score
1,119
First Language
Spanish
Primarily Uses
RMMV
Hello. Is there a way to add keyboard support for the numerical pad? :3 or maybe I missed it?
 

Tuomo L

Oldbie
Veteran
Joined
Aug 6, 2012
Messages
2,419
Reaction score
1,327
First Language
Finnish
Primarily Uses
RMMV
Is it possible to restrict the ammount of digits within the game?

Such as say, you want to restrict a puzzle to only accept 4 digits only instead of 9, to make it somewhat more fair for the player to hint at the sollution?
 

Latest Threads

Latest Profile Posts

Rakon wrote on xizorandy's profile.
Hello! I found a post of lightning strike pictures you posted. You said you made them, am I allowed to use them in my commercial project. Would be really cool!^^
evhht2zr.png

Have a nice day!
It's almost 3 month and this piece of drawing is still not finished yet.
aaaa.jpg

Really busy with other stuffs like commission and coping with personal problem.
Stella & Elyune, maybe used for promotional art if my game project finished one day.
My ex put my heart upon a self he said don't give me no lines and keep my hands to myself :,(
An Old... old Harold | RPG Maker News #71

Forum statistics

Threads
112,249
Messages
1,066,823
Members
145,856
Latest member
garima
Top