help with nvl input, like in text adventure games
Posted: Thu Sep 07, 2017 11:23 am
I wanna keep a text input box on the bottom of the screen that can interact with events in the nvl dialogue screen. think of a text adventure with commands and stuff, it's basically that.
here's how it'd work (theoretically): all mechanics are based on the input box. hitting enter without typing anything will move the dialogue along. but you can cut into the conversation whenever you want. typing a keyword with a question mark at the end will push the conversation in that direction. typing a keyword without a question mark will be an "answer" to whatever question is posed.
so far I've thought of brute forcing it and just using the renpy.input function for every single line of dialogue, but that sounds like a really messy idea. as for processing commands, maybe I'll make a separate document to call to when something that isn't whitespace is inputted.
I might be better off using another engine, but I also think it'll be fun to try and experiment with Ren'Py, so... I'm attempting something that I don't know how to code.
if that sounds like a bad idea, I do have something else I've wanted to figure out for a long time.
this is a bit of code that apricotorange wrotewhich puts the renpy.input menu in an nvl window. but I wish I could make it so it was in the nvl dialogue screen (and not something separate that automatically clears the screen while the player inputs something). for example:

thanks for taking the time to read through all this!
here's how it'd work (theoretically): all mechanics are based on the input box. hitting enter without typing anything will move the dialogue along. but you can cut into the conversation whenever you want. typing a keyword with a question mark at the end will push the conversation in that direction. typing a keyword without a question mark will be an "answer" to whatever question is posed.
so far I've thought of brute forcing it and just using the renpy.input function for every single line of dialogue, but that sounds like a really messy idea. as for processing commands, maybe I'll make a separate document to call to when something that isn't whitespace is inputted.
I might be better off using another engine, but I also think it'll be fun to try and experiment with Ren'Py, so... I'm attempting something that I don't know how to code.
if that sounds like a bad idea, I do have something else I've wanted to figure out for a long time.
this is a bit of code that apricotorange wrote
Code: Select all
screen input:
window:
style "nvl_window"
has vbox:
style "nvl_vbox"
text prompt
input id "input"
use quick_menu
thanks for taking the time to read through all this!