Changing storyline on second playthrough?
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.
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.
Changing storyline on second playthrough?
What I'm trying to do is add options that only appear after the player has completed the game once already, that lead into a deeper "secret" storyline on the second runthrough. A lofty goal, to be certain - is there some way I can make this work (without just copy-pasting the entire first section of the game into a different place)?
- Obscura
- Eileen-Class Veteran
- Posts: 1431
- Joined: Fri Mar 09, 2012 6:58 pm
- Projects: Coming Out On Top
- Location: United States
- Contact:
Re: Changing storyline on second playthrough?
-deleted and corrected below-
Last edited by Obscura on Wed Jan 30, 2019 11:12 am, edited 1 time in total.
- Obscura
- Eileen-Class Veteran
- Posts: 1431
- Joined: Fri Mar 09, 2012 6:58 pm
- Projects: Coming Out On Top
- Location: United States
- Contact:
Re: Changing storyline on second playthrough?
Ugh, sorry, DON'T use default! Instead use persistent:
Before your game starts:
.....
At the end of your game, and before the "return", put this:
.....
Now go through your game and whenever parts of the secret storyline appears you can put things like:
Sorry about the goof, I was getting flummoxed over trying to figure out some other code last night so my mind was on default.
Before your game starts:
Code: Select all
init python:
if persistent.first_playthrough_completed is None:
persistent.first_playthrough_completed = False
At the end of your game, and before the "return", put this:
Code: Select all
$ persistent.first_playthrough_completed=True
Now go through your game and whenever parts of the secret storyline appears you can put things like:
Code: Select all
"I walked along the road."
if persistent.first_playthrough_completed: #this part and whatever is indented underneath it will only show up if the variable is true
"I saw a secret path appear."
menu:
"Walk along the secret path.":
jump take_secret_path # if you wish, you can add a label with this name and put the rest of this branch of the story underneath it somewhere else in your code
"Stay on the road.":
pass
# continue rest of the main storyline
Who is online
Users browsing this forum: No registered users