Multiple routes

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
Joshua1207
Regular
Posts: 121
Joined: Tue Jan 17, 2012 12:26 pm
Projects: composed for: Sweetest Monster, AIdol, Syrup and the Ultimate Sweet
Organization: Mock Off
Soundcloud: Joshua1207
Location: Washington state
Contact:

Multiple routes

#1 Post by Joshua1207 » Sun Jan 22, 2012 8:40 pm

When I'm making a VN with multiple routes, how do I write that in the Ren'py engine? I understand how to use the flag system and the point system (more or less), but when coding all of that in the jEdit-script thing its going to get all cluttered, isn't it? So how would I make it less cluttered? I hope my question makes sense.

User avatar
redeyesblackpanda
Eileen-Class Veteran
Posts: 1006
Joined: Thu Dec 22, 2011 4:26 am
Projects: Eternal Memories, plot bunnies that won't die.
Organization: HellPanda Studios
Location: United States
Contact:

Re: Multiple routes

#2 Post by redeyesblackpanda » Sun Jan 22, 2012 9:02 pm

You can use multiple .rpy files. Just make sure to employ jumps.
One .rpy file would say this:

Code: Select all

jump flag_1
It would jump to this in another file

Code: Select all

label flag_1:
Just make sure that when you create a new file, you go and change it into a .rpy file. If you don't do that, it won't get read.

This allows you to avoid the clutter that comes from putting everything on one .rpy file.
(All projects currently on a hiatus of sorts. I blame life.)
Tsundere VN
Not really checking the forums any more due to time constraints, so if you want to contact me, PM. I'll get a notification and log in. :mrgreen:
Also, I've been hit and run posting, which means I don't see many replies. If you want to respond to something I've said, also feel free to PM me.

NOTE: if you've got questions about vnovel or things like that, it's Leon that you should be contacting. Leon's been pretty much handling everything, but due to various reasons, I've had to withdraw entirely.

User avatar
Joshua1207
Regular
Posts: 121
Joined: Tue Jan 17, 2012 12:26 pm
Projects: composed for: Sweetest Monster, AIdol, Syrup and the Ultimate Sweet
Organization: Mock Off
Soundcloud: Joshua1207
Location: Washington state
Contact:

Re: Multiple routes

#3 Post by Joshua1207 » Sun Jan 22, 2012 9:30 pm

Okay, that helps me. Thank you. Another question though, if after a certain while I want the two points to come together so that you'll be in the same scene no matter which choice you chose, how would I go about doing that? Would I have to code the same thing in each file or is there a way I could use just one file?

User avatar
redeyesblackpanda
Eileen-Class Veteran
Posts: 1006
Joined: Thu Dec 22, 2011 4:26 am
Projects: Eternal Memories, plot bunnies that won't die.
Organization: HellPanda Studios
Location: United States
Contact:

Re: Multiple routes

#4 Post by redeyesblackpanda » Sun Jan 22, 2012 9:48 pm

You simply jump back to the same spot. Two files would both lead to the same thing. As in one file saying:

Code: Select all

"Text for file one."
jump flag
and the other file saying

Code: Select all

"Text for file two."
jump flag
then having the spot where there is shared text labeled like this:

Code: Select all

label flag:
"shared text"
If you want to split from the shared file again back to the individual files, you'll probably want to use python.
(All projects currently on a hiatus of sorts. I blame life.)
Tsundere VN
Not really checking the forums any more due to time constraints, so if you want to contact me, PM. I'll get a notification and log in. :mrgreen:
Also, I've been hit and run posting, which means I don't see many replies. If you want to respond to something I've said, also feel free to PM me.

NOTE: if you've got questions about vnovel or things like that, it's Leon that you should be contacting. Leon's been pretty much handling everything, but due to various reasons, I've had to withdraw entirely.

User avatar
Joshua1207
Regular
Posts: 121
Joined: Tue Jan 17, 2012 12:26 pm
Projects: composed for: Sweetest Monster, AIdol, Syrup and the Ultimate Sweet
Organization: Mock Off
Soundcloud: Joshua1207
Location: Washington state
Contact:

Re: Multiple routes

#5 Post by Joshua1207 » Sun Jan 22, 2012 10:06 pm

Ah, alright. Thank you again. I'll look into python too.

User avatar
redeyesblackpanda
Eileen-Class Veteran
Posts: 1006
Joined: Thu Dec 22, 2011 4:26 am
Projects: Eternal Memories, plot bunnies that won't die.
Organization: HellPanda Studios
Location: United States
Contact:

Re: Multiple routes

#6 Post by redeyesblackpanda » Sun Jan 22, 2012 10:27 pm

If you're interested in learning about python, I suggest going here: http://www.renpy.org/wiki/renpy/doc/tut ... Statements

It's probably the python you'll use the most (unless you're doing a stat raising dating sim or something).

In addition to if statements you can do if not statements too which work like this:

Code: Select all

if not python_statement:
    "text, text, text"
The Wiki is a good place to check out if you're new to Ren'Py.
(All projects currently on a hiatus of sorts. I blame life.)
Tsundere VN
Not really checking the forums any more due to time constraints, so if you want to contact me, PM. I'll get a notification and log in. :mrgreen:
Also, I've been hit and run posting, which means I don't see many replies. If you want to respond to something I've said, also feel free to PM me.

NOTE: if you've got questions about vnovel or things like that, it's Leon that you should be contacting. Leon's been pretty much handling everything, but due to various reasons, I've had to withdraw entirely.

Post Reply

Who is online

Users browsing this forum: Bing [Bot]