Tsukihime 1,489 Posted May 28, 2012 (edited) Simple text input Author: Tsukihime Overview This is a very simple text input that only uses the default scripts (and is pretty much the default scripts) It allows you to ask the user to enter some text (using the text input window) and then do something with the given input. I imagine a script that does this is already around though. Usage Make a script call enter_text(title, variable, max_chars) "title" is a string that will be displayed. Sort of like reminding the user what the question was. Variable is the variable that the text will be stored in. Default 1. Max chars is the maximum number of characters they can enter Download Script: Download here Notes Improve upon it and release a better script I would prefer if it were available directly on Scene_Map so you could display both a game message as well as the text input. Sort of like the number input. I would also like to see an input system that allows users to directly type it in with their keyboard. Edited April 2, 2016 by Tsukihime 1 Share this post Link to post Share on other sites
+ Novem 344 Posted May 28, 2012 This is cool, I expect some very good memory reliant puzzles could be built with this script! Share this post Link to post Share on other sites
Ariel Schnee 7 Posted September 20, 2012 I tried What is another name for Corn Chex? ' enter_text("What is another name for Corn Chex?",1,6) ' and I got this . Where is the English, why this Japanese?! Share this post Link to post Share on other sites
Tsukihime 1,489 Posted September 20, 2012 Maybe you're using the japanese version of RM. Share this post Link to post Share on other sites
Hyde 2 Posted September 21, 2012 @Nightgazer Starlight, I had that problem as well once. I think it was because I had the japanese trial installed before I bought the english version. If you go to Game_System in the Scripts theres this code on lines 38 - 40: def japanese? $data_system.japanese end change that to this... def japanese? return false end That should hopefully work for you. If not, then I have no clue. And Tsukihime, very nice script. I have some ideas for this. Not sure if I can implement them how I imagine, but I am going to try. Share this post Link to post Share on other sites
Ariel Schnee 7 Posted September 21, 2012 @Nightgazer Starlight, I had that problem as well once. I think it was because I had the japanese trial installed before I bought the english version. If you go to Game_System in the Scripts theres this code on lines 38 - 40: def japanese? $data_system.japanese end change that to this... def japanese? return false end That should hopefully work for you. If not, then I have no clue. And Tsukihime, very nice script. I have some ideas for this. Not sure if I can implement them how I imagine, but I am going to try. Thanks! That seems to have done the trick. Didn't realize the trial would mess with the install of the version I paid for. Share this post Link to post Share on other sites
Elixia 7 Posted September 21, 2012 Nice script Tsuki. I can use this to make a password to enter certain areas perhaps :3 Anyway thanks for sharing ~ Share this post Link to post Share on other sites
winnerspiros 0 Posted February 2, 2013 (edited) Nice script man I am gonna use it all time at my proj but I have some questhow did you "read" the text (variable) for example to show it or to make an if statement that works when specific text/s is/are writtenand finally if you have max 10 and you write for example a message with 4 chars does the 6 empty chars count as letters (spaces) thanks beforehand i hope for a quick reply :/ edit: actually the big prob i have is that the variable is string so how can i read a string variable??? :/ and also how to show it on a text like you did... Edited February 2, 2013 by winnerspiros Share this post Link to post Share on other sites
Tsukihime 1,489 Posted February 2, 2013 You would use a script in the conditional branch. Assuming I stored it in variable 12... Compare using $game_variables[12].downcase == "blah" Showing up in text should be a matter of \v[12] Share this post Link to post Share on other sites
winnerspiros 0 Posted February 2, 2013 You would use a script in the conditional branch. Assuming I stored it in variable 12... Compare using $game_variables[12].downcase == "blah" Showing up in text should be a matter of \v[12] really thx man! thank you for fast reply too Share this post Link to post Share on other sites
A holy Templar 0 Posted February 25, 2013 Hey what do you do with the variables? Share this post Link to post Share on other sites
A holy Templar 0 Posted February 25, 2013 @Nightgazer Starlight, I had that problem as well once. I think it was because I had the japanese trial installed before I bought the english version. If you go to Game_System in the Scripts theres this code on lines 38 - 40: def japanese? $data_system.japanese end change that to this... def japanese? return false end That should hopefully work for you. If not, then I have no clue. And Tsukihime, very nice script. I have some ideas for this. Not sure if I can implement them how I imagine, but I am going to try. Hey dude thanks it really helped when i had the Japanese version Share this post Link to post Share on other sites
nyxzryu 1 Posted August 12, 2013 Hey what do you do with the variables? yeah, just what must we do with the variable ? because the variable only allow us to insert number, not text i mean, i want to make something like a quiz, and the way are like this : quiz : when my mother bought some juices ? if he answer " september " it comes the right value. and if he answer the wrong value, nothing will happened. how to make that ? Share this post Link to post Share on other sites
estriole 326 Posted August 12, 2013 (edited) @nyxzryu: you can insert anything to variables. just select change variable. and in "operand" choose Script. then you could add any text (and even object). and hime script store what you input TO a variable (you set in config). thus you can compare it with the 'answer' quiz : when my mother bought some juices ? if he answer " september " it comes the right value. and if he answer the wrong value, nothing will happened. how to make that ? using hime script. 1) show text: when my mother bought some juices ? (optional) 2) script call: enter_text("when my mother bought some juices ?", 1,12) above translate to: show input window with title: "when my mother bought some juices ?" and when you enter the answer it will store it to variable: 1 and max char you can inputted is: 12 character 3) the user will input the answer. 4) conditional branch: 4th tab: Script: $game_variables[1].downcase == "september" if true show message "you're right..." else show message "you're wrong" 5) profit . Edited August 12, 2013 by estriole 1 Share this post Link to post Share on other sites
nyxzryu 1 Posted August 12, 2013 @nyxzryu: you can insert anything to variables. just select change variable. and in "operand" choose Script. then you could add any text (and even object). and hime script store what you input TO a variable (you set in config). thus you can compare it with the 'answer' quiz : when my mother bought some juices ? if he answer " september " it comes the right value. and if he answer the wrong value, nothing will happened. how to make that ? using hime script. 1) show text: when my mother bought some juices ? (optional) 2) script call: enter_text("when my mother bought some juices ?", 1,12) above translate to: show input window with title: "when my mother bought some juices ?" and when you enter the answer it will store it to variable: 1 and max char you can inputted is: 12 character 3) the user will input the answer. 4) conditional branch: 4th tab: Script: $game_variables[1].downcase == "september" if true show message "you're right..." else show message "you're wrong" 5) profit . wow your methods really works, thank you so much i get it now, so the variables are changeable isn't it ? but i still confused about ( downcase == "september" ), what is downcase means ? i changed it to uppercase, it always comes with the right answer when i filled the answer with both uppercase and lowercase letter. Share this post Link to post Share on other sites
estriole 326 Posted August 12, 2013 .downcase and .uppercase is method for string. It convert string to downcase or upper case. Ex: "My NAme iS bOboY" Downcase: "my name is boboy" Uppercase: "MY NAME IS BOBOY" The downcase and uppercase is used so the answer doesn't need to be case sensitive. Ex: answer is "September" "SEPtember" will still correct. "september" will still correct. "SEPTEMBER" will still correct. You don't want your player to angry because they got wrong capitalization. Share this post Link to post Share on other sites
nyxzryu 1 Posted August 15, 2013 .downcase and .uppercase is method for string. It convert string to downcase or upper case. Ex: "My NAme iS bOboY" Downcase: "my name is boboy" Uppercase: "MY NAME IS BOBOY" The downcase and uppercase is used so the answer doesn't need to be case sensitive. Ex: answer is "September" "SEPtember" will still correct. "september" will still correct. "SEPTEMBER" will still correct. You don't want your player to angry because they got wrong capitalization. so that's how it works, anyway thanks for the help Share this post Link to post Share on other sites
Geekman 3 Posted August 15, 2013 Haven't tested this, but I can see how this can be useful. Share this post Link to post Share on other sites
nyxzryu 1 Posted August 15, 2013 .downcase and .uppercase is method for string. It convert string to downcase or upper case. Ex: "My NAme iS bOboY" Downcase: "my name is boboy" Uppercase: "MY NAME IS BOBOY" The downcase and uppercase is used so the answer doesn't need to be case sensitive. Ex: answer is "September" "SEPtember" will still correct. "september" will still correct. "SEPTEMBER" will still correct. You don't want your player to angry because they got wrong capitalization. so that's how it works, anyway thanks for the help hey, i had some problems again i can;t enter long text for the "title". i want to make somekind of quiz just like i said before, but when i input not-too-long "title", it's not shown up. ex : enter_text("how and why some animals can fly while some again not ? can you answer it with 2 little words ? ", 2,15) any solution for this ? Share this post Link to post Share on other sites
estriole 326 Posted August 15, 2013 Need script edit to modify the window. Share this post Link to post Share on other sites
KayDgirl91 99 Posted August 16, 2013 I've been just using the name input to do stuff like this in my games but I have been limited to the 16 character max for the input. Is there a limit on how many characters can be typed in? Also, it's looking like people are having trouble with text that exceeds the window size, it runs off the screen. Is there a way to alter the script to make it so that it wraps into a second third and maybe fourth line when it gets too long? Awesome script Tsukihime! As usual Share this post Link to post Share on other sites
Tsukihime 1,489 Posted August 16, 2013 I have not taken the time to look at multiple lines but the easiest way would be to have a fixed number of characters per line and then check how many characters have been entered to determine where the cursor should be placed. Share this post Link to post Share on other sites
nyxzryu 1 Posted August 16, 2013 I've been just using the name input to do stuff like this in my games but I have been limited to the 16 character max for the input. Is there a limit on how many characters can be typed in? Also, it's looking like people are having trouble with text that exceeds the window size, it runs off the screen. Is there a way to alter the script to make it so that it wraps into a second third and maybe fourth line when it gets too long? Awesome script Tsukihime! As usual I have not taken the time to look at multiple lines but the easiest way would be to have a fixed number of characters per line and then check how many characters have been entered to determine where the cursor should be placed. yeah i agree with kevin, is there a way to doing so ? it would be nice Share this post Link to post Share on other sites
Sozdorferz 0 Posted December 7, 2013 A few questions.1. What are the conditions to use this, if any.2. I get the script call, but where do i actuall put the script itself? I tried putting it Materials (Insert Here) section of the script editor, but I just keep getting errors whenever a script call for this is reached. What am I doing wrong?But all in all this sounds so awesome, I really can't wait to get this working. Share this post Link to post Share on other sites
chelle01411 0 Posted September 2, 2014 is your problem solved? I also have the same problem. I need a script that will make a word wrap in a 2nd or 3rd line if a text is too long Share this post Link to post Share on other sites