Help with project: inputting Player Name and rerouting menus

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
TempestuousInquiry
Newbie
Posts: 4
Joined: Tue Jan 10, 2012 10:11 pm
Contact:

Help with project: inputting Player Name and rerouting menus

#1 Post by TempestuousInquiry » Tue Jan 10, 2012 10:22 pm

So, long story short, I'm creating a simple game for a class project based on learning the ins and out of a culinary business.

I want to be able to have the player input a name for their character in the beginning. I downloaded the SoftKeyboard and placed the folder where it told me to, but I just keep getting:
I'm sorry, but an uncaught exception occurred.

While running game code:
File "game/script.rpy", line 69, in script
call screen input_softkeyboard
Exception: Screen input_softkeyboard is not known.


-- Full Traceback ------------------------------------------------------------

Full traceback:
File "F:\****'s work\Project Files\RenPy\renpy\execution.py", line 261, in run
File "F:\****'s work\Project Files\RenPy\renpy\ast.py", line 1405, in execute
File "F:\****'s work\Project Files\RenPy\renpy\ast.py", line 1418, in call
File "F:\****'s work\Project Files\RenPy\renpy\statements.py", line 100, in call
File "common/00statements.rpy", line 540, in execute_call_screen
File "F:\****'s work\Project Files\RenPy\renpy\exports.py", line 1525, in call_screen
File "F:\****'s work\Project Files\RenPy\renpy\display\screen.py", line 446, in show_screen
Exception: Screen input_softkeyboard is not known.
I'm sure what this means, and have tried to fix it in many ways. If someone can help me fix it, or can tell me a simpler way for a player to input their own name into my game, please let me know ASAP.

My other question is in creating menus. If you have a menu with multiple choices, and you want all of them but one ("Continue") to reroute back to the start of the menu, how would you do this? (Note: I have multiple menus in my game, if this affects anything.)


I would like answers to these questions ASAP, if possible: This is for a school project, not on my own personal time. Thanks very much and I appreciate the help!

User avatar
MoPark
Regular
Posts: 98
Joined: Sat Dec 31, 2011 7:05 pm
Projects: Kangaroo, Terminal Love
Location: DC
Contact:

Re: Help with project: inputting Player Name and rerouting m

#2 Post by MoPark » Tue Jan 10, 2012 10:41 pm

Is the soft keyboard an absolute necessity? If not, you can just use the renpy.input() function instead. It's fairly simple to implement.

In terms of menus, do you mean something like this?

Code: Select all

label menu_start:
    menu:
        "Menu Question?"
        "Option 1":
            jump menu_start
        "Option 2":
            jump menu_start
        "Continue":
            jump menu_next

User avatar
DragoonHP
Miko-Class Veteran
Posts: 758
Joined: Tue Jun 22, 2010 12:54 am
Completed: Christmas
IRC Nick: DragoonHP
Location: Zion Island, Solario
Contact:

Re: Help with project: inputting Player Name and rerouting m

#3 Post by DragoonHP » Wed Jan 11, 2012 8:46 am

2) You need to give your menu a name...

Code: Select all

menu Something:
    "Go up.":
        jump Something
    "Go down.":
        jump nextScreen
    "Go left.":
        jump Something
    "Go right.":
        jump Something
EDIT: Tried the SoftKeyboard framework and it works for me...
From what I can tell by looking at the error, Ren'Py can't find the screen...
Are you sure you have put both the folder... lang and softkeyboard in the game directory...

Here's the demo code...

Code: Select all

label start:
    "This is a demo."
    call screen input_softkeyboard
    "Thanks for that mate."
Attachments
Capture.JPG
My upload sped is really slow so this should do for the time being...
This snapshot shows the content of the game folder...
Capture.JPG
My upload sped is really slow so this should do for the time being...
This snapshot shows the content of the game folder...

TempestuousInquiry
Newbie
Posts: 4
Joined: Tue Jan 10, 2012 10:11 pm
Contact:

Re: Help with project: inputting Player Name and rerouting m

#4 Post by TempestuousInquiry » Wed Jan 11, 2012 7:26 pm

@MoPark: No, it's not really necessary, I just didn't know how to allow the player to type in their own name any other way. If you could show me how using the input, that would be great!

@DragoonHP: Thanks! That definitely worked, but... (see attachments)
Also, when I pull up the keyboard, everything there is in Japanese as well. I didn't mess with anything in the folders, but I'm not sure how to fix it. Can you help again?

Please pardon my slowness; I started using Ren'Py only about a week ago.
Thank you both for your help with the menu jumping. I really appreciate it!
Attachments
screenshot1.jpg
screenshot2.jpg

User avatar
MoPark
Regular
Posts: 98
Joined: Sat Dec 31, 2011 7:05 pm
Projects: Kangaroo, Terminal Love
Location: DC
Contact:

Re: Help with project: inputting Player Name and rerouting m

#5 Post by MoPark » Wed Jan 11, 2012 7:39 pm

From the sounds of it, you don't really need the soft keyboard at all. renpy.input() is well-documented here:
http://www.renpy.org/wiki/renpy/doc/ref ... enpy.input

TempestuousInquiry
Newbie
Posts: 4
Joined: Tue Jan 10, 2012 10:11 pm
Contact:

Re: Help with project: inputting Player Name and rerouting m

#6 Post by TempestuousInquiry » Wed Jan 11, 2012 10:35 pm

Great! Thanks again so much for the help! With any luck, I'll get a hang of this program soon. ^-^

User avatar
DragoonHP
Miko-Class Veteran
Posts: 758
Joined: Tue Jun 22, 2010 12:54 am
Completed: Christmas
IRC Nick: DragoonHP
Location: Zion Island, Solario
Contact:

Re: Help with project: inputting Player Name and rerouting m

#7 Post by DragoonHP » Wed Jan 11, 2012 10:52 pm

Okay... you must have chosen Japanese language...

Follow these steps:
--> Delete Persistent Data (From Ren'Py Launcher)
--> Start you game again...
--> Choose English as the language...
--> Finish...
Attachments
Capture.JPG
A menu would appear... it will look something like this...

TempestuousInquiry
Newbie
Posts: 4
Joined: Tue Jan 10, 2012 10:11 pm
Contact:

Re: Help with project: inputting Player Name and rerouting m

#8 Post by TempestuousInquiry » Thu Jan 12, 2012 4:13 am

Ah, thank you so much!
I thought I selected English, but I guess I must have clicked the wrong button.

Thanks again so much! This has been such an enormous help!! ^-^

YaibaToKen
Newbie
Posts: 15
Joined: Tue Aug 07, 2012 11:38 am
Projects: Names...
Contact:

Re: Help with project: inputting Player Name and rerouting m

#9 Post by YaibaToKen » Wed Aug 08, 2012 1:17 pm

Hi, I was wondering if anyone here knows how to use the softkeyboard as a means to define a variable such as a name, and store it...

thanks in advance

Post Reply

Who is online

Users browsing this forum: Google [Bot]