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.
-
Dylan_Bain
- Regular
- Posts: 101
- Joined: Mon Mar 09, 2015 2:05 pm
- Organization: Dylan Bain Games
- Location: Scotland
-
Contact:
#1
Post
by Dylan_Bain » Wed Mar 11, 2015 2:34 pm
Hello!
I was wondering how you make individual character stories like they have in SADX or something like that. By this I mean different chapter-like things but they don't restart everytime you load new chapter.
For example- Different characters are 'Man' and 'Woman'.
From somewhere in the menu you can access each characters story.
Each time characters story is loaded, it returns to where they last were.
If this means creating multiple Ren'Py games and somehow bundling them, that's ok.
Thanks!
Dylan

-
Riverbird
- Newbie
- Posts: 21
- Joined: Wed Feb 11, 2015 2:41 pm
- Deviantart: RiverbirdAlpha
-
Contact:
#2
Post
by Riverbird » Wed Mar 11, 2015 4:37 pm
Simplest way is to have each chapter end with setting a variable to the name of the next label in that story arc, and then having the menu use that:
Code: Select all
label start:
#Set the initial variables for each route.
$ MAN_ROUTE = "MAN_1"
$ WOMAN_ROUTE = "WOMAN_1"
jump Game_Menu
return
label Game_Menu: #This label is the character choice menu and loops indefinitely unless Quit is chosen.
#If you wanted to test for the game being over, put it here. In this case we simply see if all variables are set to "none"
if MAN_ROUTE == "NONE" and WOMAN_ROUTE == "NONE":
jump GAME_OVER
else:
menu:
"Choose A Route"
"MAN" if MAN_ROUTE !="NONE": #N.b. Only is an option if MAN_ROUTE not set to "NONE"
call expression MAN_ROUTE
"WOMAN" if WOMAN_ROUTE !="NONE":
call expression WOMAN_ROUTE
"QUIT":
return
jump Game_Menu
label MAN_1:
e "This is the first manly chapter"
$ MAN_ROUTE = "MAN_2" #before we return, we set the name of the next label to go to in this arc.
return
label MAN_2:
e "This is the second and final manly chapter"
$ MAN_ROUTE = "NONE" #Setting this to None means this is no longer selectable.
return
label WOMAN_1:
e "This is the first womanly chapter"
$ WOMAN_ROUTE = "WOMAN_2"
return
label WOMAN_2:
e "This is the second and final womanly chapter"
$ WOMAN_ROUTE = "NONE"
return
label GAME_OVER:
e "You won!"
return
If you've got more characters you could use more variables or a dictionary to keep track, but the above framework might work for you.
-
Dylan_Bain
- Regular
- Posts: 101
- Joined: Mon Mar 09, 2015 2:05 pm
- Organization: Dylan Bain Games
- Location: Scotland
-
Contact:
#3
Post
by Dylan_Bain » Wed Mar 11, 2015 5:19 pm
Riverbird wrote:Simplest way is to have each chapter end with setting a variable to the name of the next label in that story arc, and then having the menu use that:
Code: Select all
label start:
#Set the initial variables for each route.
$ MAN_ROUTE = "MAN_1"
$ WOMAN_ROUTE = "WOMAN_1"
jump Game_Menu
return
label Game_Menu: #This label is the character choice menu and loops indefinitely unless Quit is chosen.
#If you wanted to test for the game being over, put it here. In this case we simply see if all variables are set to "none"
if MAN_ROUTE == "NONE" and WOMAN_ROUTE == "NONE":
jump GAME_OVER
else:
menu:
"Choose A Route"
"MAN" if MAN_ROUTE !="NONE": #N.b. Only is an option if MAN_ROUTE not set to "NONE"
call expression MAN_ROUTE
"WOMAN" if WOMAN_ROUTE !="NONE":
call expression WOMAN_ROUTE
"QUIT":
return
jump Game_Menu
label MAN_1:
e "This is the first manly chapter"
$ MAN_ROUTE = "MAN_2" #before we return, we set the name of the next label to go to in this arc.
return
label MAN_2:
e "This is the second and final manly chapter"
$ MAN_ROUTE = "NONE" #Setting this to None means this is no longer selectable.
return
label WOMAN_1:
e "This is the first womanly chapter"
$ WOMAN_ROUTE = "WOMAN_2"
return
label WOMAN_2:
e "This is the second and final womanly chapter"
$ WOMAN_ROUTE = "NONE"
return
label GAME_OVER:
e "You won!"
return
If you've got more characters you could use more variables or a dictionary to keep track, but the above framework might work for you.
Sorry, that doesn't help me!
Have you played Sonic Adventure before? If so do you remember how that each character would have a storyline? For example you could select Sonic and play Sonic's storyline, but to play as Amy or Tales or any other character, you would have to select theirs. They would also have their own save files.
Do you know how I could do something like that?
-
philat
- Eileen-Class Veteran
- Posts: 1853
- Joined: Wed Dec 04, 2013 12:33 pm
-
Contact:
#4
Post
by philat » Wed Mar 11, 2015 5:28 pm
Why wouldn't the basic structure suggested work for what you want? Riverbird was being nice in setting it up to loop so you could see how the flow control works, but why would there be any difference if the choice doesn't loop and you can only choose once? And what's the hang-up with having different save files? If your multiple character routes do not overlap, by definition, every time you choose a particular character route the save file for that playthrough is tied to the chosen route.
-
Dylan_Bain
- Regular
- Posts: 101
- Joined: Mon Mar 09, 2015 2:05 pm
- Organization: Dylan Bain Games
- Location: Scotland
-
Contact:
#5
Post
by Dylan_Bain » Wed Mar 11, 2015 5:33 pm
philat wrote:Why wouldn't the basic structure suggested work for what you want? Riverbird was being nice in setting it up to loop so you could see how the flow control works, but why would there be any difference if the choice doesn't loop and you can only choose once? And what's the hang-up with having different save files? If your multiple character routes do not overlap, by definition, every time you choose a particular character route the save file for that playthrough is tied to the chosen route.
I see what you mean now, like if I have this code at the start of my game and then have a different start label for each answer, and using then have each story stemming from that?
Ok, I think I understand now.

The reason I was wondering if you could have different save menus was because I was wondering if you could have a different save menu per character. It isn't needed but I thought it would be a cool idea.
I appreciate the help

-
philat
- Eileen-Class Veteran
- Posts: 1853
- Joined: Wed Dec 04, 2013 12:33 pm
-
Contact:
#6
Post
by philat » Wed Mar 11, 2015 5:41 pm
You probably could if you really want, but I'm pretty sure it would involve editing renpy common files and would be generally more trouble than it's worth. What I would do is just customize the save file to say clearly: Character Name, saved at date/time, or something like that.
-
Dylan_Bain
- Regular
- Posts: 101
- Joined: Mon Mar 09, 2015 2:05 pm
- Organization: Dylan Bain Games
- Location: Scotland
-
Contact:
#7
Post
by Dylan_Bain » Wed Mar 11, 2015 6:13 pm
philat wrote:You probably could if you really want, but I'm pretty sure it would involve editing renpy common files and would be generally more trouble than it's worth. What I would do is just customize the save file to say clearly: Character Name, saved at date/time, or something like that.
Thanks very much for your help!
Users browsing this forum: Bing [Bot]