Help with making a VN? PLEASE*stress*

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
RandomKoro83
Newbie
Posts: 9
Joined: Mon Jun 11, 2012 10:17 pm
Contact:

Help with making a VN? PLEASE*stress*

#1 Post by RandomKoro83 »

How do you have a choice based off of previous choices? Also, have a guy character say something based off the previous choice?

Like saying
go out with him:
"yes":
blah "asdfasdkjf"

"no":
blah "fsahdkfje"

and later on shouldn't it be like if "yes":
good night?

I don't understand how to use the variables and the ifs!
Yes, I red the renpy.wiki page a million times and still don't get what they mean.
I'm trying to put like paths for each character but I don't want the true ending and good ending to be the same words but in the end all of a sudden becomes based off the points...
I don't know how to do the points either~
Is it like:
Ericpoints > 10:
e "I hate bananas but I love you"

Ericpoints > 5:
e "I hate you but like bananas"
D: HELP ME PLEASE...
Attachments
Picture 2.png

pwisaguacate
Veteran
Posts: 356
Joined: Mon Mar 11, 2013 11:03 pm
Contact:

Re: Help with making a VN? PLEASE*stress*

#2 Post by pwisaguacate »

RandomKoro83 wrote:How do you have a choice based off of previous choices?
Examples:

Code: Select all

label start:
    "DEMO: routes result in different choices"

    menu:
        "Route A":
            "You are now on route A."
            jump route_a
        "Route B":
            "You are now on route B."
            jump route_b

label route_a: # Only choices C and D will show on route A.
    menu:
        "Choice C":
            "You chose choice C."
            jump end
        "Choice D":
            "You chose choice D."
            jump end

label route_b: # Only choices E and F will show on route A.
    menu:
        "Choice E":
            "You chose choice C."
            jump end
        "Choice F":
            "You chose choice D."
            jump end

label end:
    "End of Demo"

    return

Code: Select all

label start:
    $ fruits = False
    "DEMO: choices change based on previous choices; linear route"
    "Do you like fruits?"

    menu:
        "Yes":
            $ fruits = True
        "No":
            pass # Do nothing.

    "What will you eat today?"

    menu:
        "Carrot":
            "You eat a carrot."
        "Tomato":
            "You eat a tomato."
        "Banana" if fruits == True: # Will not show if fruits == False
            "You eat a banana."

    "End of Demo"

    return
RandomKoro83 wrote:Also, have a guy character say something based off the previous choice?
(Note: your screenshot is similar in concept.) Example:

Code: Select all

label start:
    "DEMO: minor dialogue changes based on previous choices; linear route"

    menu:
        "Choice A":
            $ choice = "A" # OR $ choice = True
        "Choice B":
            $ choice = "B" # OR $ choice = False

    "The quick brown fox jumps over a lazy dog..."

    if choice == "A": # OR if choice:
        "Oh, and you chose choice A."
    elif choice == "B": # OR else:
        "Oh, and you chose choice B."

    "End of Demo"

    return
RandomKoro83 wrote:and later on shouldn't it be like if "yes":
good night?
Almost. You'd make a variable; see above example.
RandomKoro83 wrote:I'm trying to put like paths for each character but I don't want the true ending and good ending to be the same words but in the end all of a sudden becomes based off the points...
Don't forget you can branch off routes with labels and jumping to those labels.

Post Reply

Who is online

Users browsing this forum: Semrush [Bot]