help with nvl input, like in text adventure games

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
User avatar
warmsundae
Regular
Posts: 61
Joined: Tue Feb 24, 2015 9:51 pm
Skype: electriclan
Soundcloud: lanterny
Location: korea
Contact:

help with nvl input, like in text adventure games

#1 Post by warmsundae »

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 wrote

Code: Select all

screen input:

    window:
        style "nvl_window"
        has vbox:
            style "nvl_vbox"

        text prompt
        input id "input"

    use quick_menu
which 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:
Image


thanks for taking the time to read through all this!

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Andredron, Ocelot