Text Input Window

● ARCHIVED · READ-ONLY
Started by darkkitten 20 posts View original ↗
  1. I'm working on a script for making Input Scenes, it's mostly done here

    Terms of use:   Free for Commercial and free use as long as I get some credit for the script.



    How to use:

    Spoiler
    Spoiler



    There's two methods of use, default, which means you set up the information in the plugin setup, or like this from Plugin Command  in your event  If you want to use an Image make sure you change Use Image in the setup to true.


    Not using images:


    enter_text <variable> <max characters> false <title> <default text>


    if you're using images:


    enter_text <variable> <max characters> true <image file> <title> <default text>


    Example:  enter_text 121 18 false I'm_a_computer_prompt Default


    Image Example: enter_text 121 18 true ClipComputer  I'm_a_computer_prompt Default


    xxx = Variable number


    "String" is what I'm checking against.


    Red = Variable


    Purple = Maximum Characters they can input,  in the Example that means you can only Input 18 Characters total. you can make it as large as you want I believe as well. All the way down to 1 Character Max I believe without crashing lol.


    Lime Green = Text to display above the Inputted Text.


    When you want it to check against Lowercase it's example:  $gameVariables.value(121).toLowerCase() == "text to check"  


    or if you want it to check against all Caps, its  $gameVariables.value(121).toUpperCase() == "TEXT TO CHECK"


    Blue = The name of the image file without .png


     

     



    Screenshot

    Spoiler
    Spoiler





    Input_Scene.png


    This is the new Look so far:


    New_Input_Look.png


    Working_Input_Screne.png




    Changelog:

    Spoiler
    Spoiler





    Version 0.0.1


    Features:


    Basics are in place


    Version 0.0.1b


    Fixed some variable mislabels.


    Added some information to @help


    Added a comment


    Still unable to find the bug yet.. Hence why 0.0.1b not 0.0.2  ;)


    Version 0.0.1c


    Fixed the Input bug I had in 0.0.1 and 0,0.1b but now I have to get it to display the Text..


    Version 0.0.1d


    Removed all the code for Window_NameInput since the default works fine and all I need is the modified code I'm using now.


    Not quiet ready for 0.0.2 need to find this one last crippling bug. and I'm going to skip to 0.5.0 once that's found.  ;)


    Version 0.9.0


    I skipped a ton of versions between 0.0.1d and now because of internal testing, also I said I would once I got it to display the Text Input as you type it, and I did  :)


    Still left to do is figure out why it cuts my text when I use the Plugin Command.. but not when you use Default.


    Version 0.9.1


    Fixed a bug I created in 0.9.0


    Forgot to push changes to Github lol


    Version 1.0.0


    Fixed the bugs I was having with the script, it should work smoothly now.


    Version 1.0.1


    Added ArkDG's suggestion:


    var Imported = Imported || {};
    Imported.CmdInp = true;


    Thank you.


    Version 1.0.2


    Centered the Text


    Added RegExp but for some reason it's not working Conditional Checking in Events.


    Version 1.0.3


    Till I find a solution to wrap the title text I removed it off of being centered.


    Fixed a major breaking bug when using default settings.  Found another bug while doing that and fixed it as well.


    Code Cleanup probably will be an ongoing thing as I learn more and more. :)


    Version 1.0.4


    Fixed a bug I created in 1.0.3


    Version 1.1.0


    Added an Image system 


    Version 1.1.1


    Updated it to work with latest RPG Maker MV.


    Updated the Plugin Commands see the Examples or plugin help


    Added Quasi_Input support thanks to Duce (If there's a better way to handle it let me know)



    Download

    Spoiler
    Spoiler



    https://raw.githubusercontent.com/Darkkitten/MyRPGMakerMV/master/CommandInput/CmdInp.js


    ClipComputer.png  Right click and save in your games img/pictures folder.


    Optional:


    https://github.com/quasixi/RPG-Maker-MV/blob/master/Systems/QuasiInput.js



    Bugs:

    Spoiler
    Spoiler





    Unable to Input Characters - If you click Ok, it allows you to exit and saves your default text at least so far.


    Unable to see Text.


    defaultPromptText is cut off when you use the plugin via the plugin Command


    Long Text's have to use the Underscore _  otherwise it picks it up as the next Param.  so basically If_I_want_long_text  is what it would be instead of If I want long text.



    ToDo:

    Spoiler
    Spoiler



    Ability to change Background Graphics. Wouldn't look right.


    Fix the Default Header Text.


    Fix the Display Editor Bug.


    Fix the Bug that stops the script from being useful..


    Clean up the Code. - Some Done. Some more Done.


    Clean up the image code and change how it works to make it more efficient.   What I want to do is add another command argument somewhere in there allowing you to enable or disable images via the Plugin Command..





    You can still get an old version without image support here  v1.0.4


    Special Thanks to


    http://www.rpgmakervxace.net/topic/4238-simple-text-input/ by Himeworks, Thank you to him/her for inspiration from their Ace script.


    The font in the Screenshot's is thanks to  Font Squirl , GoodDog-webfont.ttf  they also provide free font's for commercial use.


    Duce for posting how to add Quasi_Input support.
  2. Hey, can I store what I write with this input in a variable to use later in the game?
  3. Yes, you choose a variable to use when you use the command :) or when you setup the defaults :) and you can bring it up later.

    I'm currently using it in my project that's why I wrote it, I use a conditional branch with Script checked and $gameVariables.value(xxx) == "String"

    xxx = Variable number

    "String" is what I'm checking against.

    Also when 

    Calling the input scene its: enter_text 121 18 I'm a computer prompt

    Red = Variable

    Purple = Maximum Characters they can input,  in the Example that means you can only Input 18 Characters total. you can make it as large as you want I believe as well. All the way down to 1 Character Max I believe without crashing lol.

    Lime Green = Text to display above the Inputted Text.
  4. This is perfect! ^^

    I will make a new feature in my save game plugin that will need a second plugin with a function like that to work properly and be more friendly user manageable. (the other way would be forcing the developper to create an actor just to use it as a template for the name thing) Then I will indicate your plugin to be added as this needed second tool to make this feature possible. 

    The feature is that you will be able to give a name to your save slots other than the "File ID"  boring thing. ^-^

    And very good plugin! I really liked it!

    IMPORTANT EDIT

    Can you add it to your plugin? I would really need it:
     

    var Imported = Imported || {};Imported.CmdInp = true;Put this on public domain so I can access it and make my feature dependant of your plugin.
  5. Sure I didn't add it because I wasn't sure about it.

    Redownload Version 1.0.1 now includes your suggestion :)
  6. Thanks for the script!

    I do have a question/request - is there any way to make the text and input area to be aligned at the center?

    Also, is there any way to ignore case sensitivity in the input (like the downcase in tsukihime's original script).
  7. I can look into it, the conversion was difficult, and took a long time to get done.   :)

    I can center everything, working on the case insensitivity.

    I believe the JavaScript equivalent to .downcase is .toLowerCase()

    $gameVariables.value(xxx).toLowerCase() == "blah"
    Updated to 1.0.4 see changelog
  8. Thanks for the update and JavaScript command! Working like a charm now :D
  9. Your welcome, and I added a new version, there's work to do on this version, if you enable Images you're kinda stuck using them.. I'm working on that right now.
  10. Hey darkkitten,


    Love the plugin, but got a quick question. How can I change Actor(#)'s name to Variable(#) which was set via your plugin? Is it possible?
  11. $gameActors.actor(actorId).setName(n)
  12. eivl said:
    $gameActors.actor(actorId).setName(n)

    This doesn't seem to apply the text variable set by Darkkitten's plugin. The actorID is 20, and the game variable is 2. So I tried,


    $gameActors.actor(20).setName(2)
    $gameActors.actor(20).setName($gameVariable(2))
    $gameActors.actor(20).setName(\v(2))


    and none of this work.
  13. Hey, would it be possible to change the language of the characters? I found a plugin that would let me change the language for the name entry, but I guess the virtual keyboard used for this plugin doesn't use the same keyboard? 


    Either way, this is super cool. Thanks for creating it! 
  14. I just noticed the title sometimes gets cut off (missing front half) and this usually happens randomly. Any clue why this is?
  15. Nekonron said:
    I just noticed the title sometimes gets cut off (missing front half) and this usually happens randomly. Any clue why this is?



    I noticed the same thing happening when you activate the same event again after activating it once...

    taco_god said:
    This doesn't seem to apply the text variable set by Darkkitten's plugin. The actorID is 20, and the game variable is 2. So I tried,



    $gameActors.actor(20).setName(2)
    $gameActors.actor(20).setName($gameVariable(2))
    $gameActors.actor(20).setName(\v(2))


    and none of this work.



    Don't know if you already fixed this but you are doing it wrong.


    $gameVariable.value(2)


    returns you the name stored in variable 2


    So when you want to use  $gameActors.actor(actorId).setName(n)


    you need to substitute $gameVariable.value(2) for n
  16. @DeviousSiddy bump for same problem with prompt text cuttoff problem. have been trying to work it out and will post a solution if i can find one but i'm very much an amateur at this.  otherwise this plugin is awesome.


    @DeviousSiddy  i found a workaround for the text cuttoff problem. it's not pretty and you'll have to play around depending on the image size you're using, but here ya go:

    Scene_Input.prototype.onThatsJustFine = function()
    ...


    change: Darkkitten.Param.defaultPromptText = ''
    to:  Darkkitten.Param.defaultPromptText = '          '   where '  ' contains an arbitrary number of spaces that puts your text in the right position. for me it was 9 spaces but it varies depending on your image size.

    hope this helps!
  17. Hello! This plugins works on mobile and browser?


    Thanks! :)
  18. I'm pretty new to MV, so I'm a little iffy when it comes to JS vs Ruby. But would there be a way to do text input via keyboard rather than the input window? The script I had for Ace used the keyboard, and when I need to type a lot of things in game (I like to make games to use as study tools, or make characters take written tests) I find it tiring to use the input system like that. No complaints if there wouldn't be - I'm just glad there's a plugin for it at least! ^_^ I can't believe this isn't something that RPG Maker wouldn't do by default, considering how often people use it. 
  19. LeoHalliwell said:
    I'm pretty new to MV, so I'm a little iffy when it comes to JS vs Ruby. But would there be a way to do text input via keyboard rather than the input window? The script I had for Ace used the keyboard, and when I need to type a lot of things in game (I like to make games to use as study tools, or make characters take written tests) I find it tiring to use the input system like that. No complaints if there wouldn't be - I'm just glad there's a plugin for it at least! ^_^ I can't believe this isn't something that RPG Maker wouldn't do by default, considering how often people use it. 

    I know for a fact the SumRdmDude is working on one...  I was asking about just yesterday and he said it's mostly finished just needs to figures out how to get it compatible with Yanfly's Button Common Events Plugin.
  20. Curious if I can integrate this with Quasi input?