How To Make Something Unlock And Stay Unlocked In Later Playthroughs

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
Dollarluigi
Regular
Posts: 63
Joined: Mon Aug 15, 2016 10:06 pm
Completed: Winter Dream, School For The Friendless
Tumblr: Rehnchoro
Deviantart: Dollarluigi
Skype: Dollarluigi
Soundcloud: Dollarluigi
Location: Probably Earth
Contact:

How To Make Something Unlock And Stay Unlocked In Later Playthroughs

#1 Post by Dollarluigi »

I've been using Ren'py for a while and I've figured out how to make it so you can set an action to have events trigger much later. You make a choice, a certain variable is set to true or false, or it could be set to numbers with a "+=" or a "-=". When this happens, it can trigger something for the current playthrough. However, that only lasts for that playthrough. If you go back and start a new game all of these variables will go back to their default settings. Is there a way I can make a variable stay on no matter what?

Example: You finish a route in a visual novel and there's another one, but you can only access it after you finish that other route. Some visual novels have some kind of true route that unlocks after you complete the main ones. What I'm trying to do is something like that.
Suffering a rare condition is one of the worst things you could ever experience because no one understands a thing.

YouTube Twitter Tumblr Reddit deviantArt

User avatar
emz911
Regular
Posts: 103
Joined: Fri Jun 23, 2017 2:23 pm
Contact:

Re: How To Make Something Unlock And Stay Unlocked In Later Playthroughs

#2 Post by emz911 »

Persistent variable is what you are looking for: https://www.renpy.org/doc/html/persistent.html

Post Reply

Who is online

Users browsing this forum: Google [Bot], Semrush [Bot]