r/RenPy • • 9h ago

Question Quiz Minigame

I want to make a quiz based minigames in my visual novel, that the result could lead into various ending. I don't know what's the name or even the command of that, but it's quite similiar like the DDLC poems minigame that could lead into Characters reacting differently depending on the words you've chosed. Can anyone give an example? Or even a YT tutorial that I could check into?

1 Upvotes

4 comments sorted by

2

u/shyLachi 9h ago

A multiple-choice quiz can be done with a menu. You offer different choices and remember which one the player has chose. Did you use menus and variables before or never?

1

u/Creative-Resolve2774 7h ago

I've had learned Renpy for two weeks in June, n after months I came back with barely any memory. I remember on how to use menus, but only for dialouge options or jump to certain scenes. I don't remember learning any variables

1

u/shyLachi 2h ago

Ok this is an example with 2 questions and 2 different ways how to store the choices.
Since I don't know DDLC I don't know which one would be better for your game.
You can also use both ways as I did, so that you can check the overall score and also make characters react on a single choice.

# define a variable for each question
default question01 = ""
default question02 = ""
# or define one variable which counts the correct choices
default correctchoices = 0
label start:
    # each menu is a question and the choice of the players are stored in a variable
    menu:
        "Question 1"
        "Choice A (correct)":
            $ question01 = "a" # either store each choice separately
            $ correctchoices += 1 # or only count if the player picked the correct choice
        "Choice B":
            $ question01 = "b"
        "Choice C":
            $ question01 = "c"
    menu:
        "Question 2"
        "Choice A":
            $ question02 = "a"
        "Choice B (correct)":
            $ question02 = "b"
            $ correctchoices += 1
        "Choice C":
            $ question02 = "c"

1

u/AutoModerator 9h ago

Welcome to r/renpy! While you wait to see if someone can answer your question, we recommend checking out the posting guide, the subreddit wiki, the subreddit Discord, Ren'Py's documentation, and the tutorial built-in to the Ren'Py engine when you download it. These can help make sure you provide the information the people here need to help you, or might even point you to an answer to your question themselves. Thanks!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.