Adding new game modes after first completion

A place to discuss things that aren't specific to any one creator or game.
Forum rules
Ren'Py specific questions should be posted in the Ren'Py Questions and Annoucements forum, not here.
Post Reply
Message
Author
User avatar
thirstyoctopus
Newbie
Posts: 17
Joined: Mon Aug 27, 2018 12:04 pm
Projects: Romance Visual Novel story
Organization: Thirsty Octopus
Contact:

Adding new game modes after first completion

#1 Post by thirstyoctopus » Thu Oct 11, 2018 4:50 am

I apologise if this has been asked before but it's difficult to search for exactly what I want and get the right results.

Currently my VN is in production, but I would like to offer the player an opportunity to replay the game but with the characters dressed in different outfits. However, I am unsure as to how to determine if the game has already been completed - so I don't know how to show the new mode link on the start menu (i.e. under what conditions). My guess would be some kind of variable that monitors game progress and once at 100% it would then be classed as "complete"?

I guess, in pseudo code, I mean something like this:

Code: Select all

if game complete:

show menu item "Outfit mode"
This is my first Ren'py game so apologies if this is a really simple thing and I'm just being dumb (!)

Thanks in advance

Zelan
Eileen-Class Veteran
Posts: 1964
Joined: Tue Mar 01, 2016 7:23 pm
Completed: The Dark
Projects: bookSLEEPer, Stalker & Yandere
Tumblr: evns
itch: Zelan
Contact:

Re: Adding new game modes after first completion

#2 Post by Zelan » Thu Oct 11, 2018 9:46 am

I also know next to nothing about coding, but I feel like the easiest thing would just be to have some kind of code that classifies the game as "complete" once you reach the end of the route.

If by "complete" you just mean one route has to be finished, I would just put something like "Complete = True" at the end of each one. (Possibly True/False is not what should be used for this, but I hope this gets across the general idea.)

If by "complete" you mean that every route/ending is completed once, you'll need something different. For this I would code it so that the FIRST time a route/ending is completed, the "complete counter" goes up by one. Once it reaches a certain point the outfit mode is unlocked.

You'll definitely need to find someone else who actually knows their way around Ren'Py for help on the specific code that you need to accomplish this, but I hope what I said above was clear and helpful!

User avatar
thirstyoctopus
Newbie
Posts: 17
Joined: Mon Aug 27, 2018 12:04 pm
Projects: Romance Visual Novel story
Organization: Thirsty Octopus
Contact:

Re: Adding new game modes after first completion

#3 Post by thirstyoctopus » Thu Oct 11, 2018 10:24 am

Yes, I thought about that, but would a variable instantiated within the game still be recognisable in the menu and after completion of one route? I wonder if there is some kind of persistent variable which is saved somewhere outside of the 'walls' of the game itself and can be referenced literally anywhere, including in the menu / config etc.

User avatar
parttimestorier
Regular
Posts: 181
Joined: Thu Feb 09, 2017 10:29 pm
Completed: No Other Medicine, Well Met By Moonlight
Projects: DemiDato, The Light at the End of the Ocean
itch: janetitor
Location: Canada
Contact:

Re: Adding new game modes after first completion

#4 Post by parttimestorier » Thu Oct 11, 2018 10:52 am

thirstyoctopus wrote:
Thu Oct 11, 2018 10:24 am
I wonder if there is some kind of persistent variable which is saved somewhere outside of the 'walls' of the game itself and can be referenced literally anywhere, including in the menu / config etc.
There is! Here's the documentation on persistent variables. Just set one of those to true at the end of your game, and you should be able to set whatever else you want to unlock only once it's true.
ImageImageImage

User avatar
thirstyoctopus
Newbie
Posts: 17
Joined: Mon Aug 27, 2018 12:04 pm
Projects: Romance Visual Novel story
Organization: Thirsty Octopus
Contact:

Re: Adding new game modes after first completion

#5 Post by thirstyoctopus » Thu Oct 11, 2018 11:12 am

parttimestorier wrote:
Thu Oct 11, 2018 10:52 am
thirstyoctopus wrote:
Thu Oct 11, 2018 10:24 am
I wonder if there is some kind of persistent variable which is saved somewhere outside of the 'walls' of the game itself and can be referenced literally anywhere, including in the menu / config etc.
There is! Here's the documentation on persistent variables. Just set one of those to true at the end of your game, and you should be able to set whatever else you want to unlock only once it's true.
Aha, perfect thank you so much!

KouhaiChan
Newbie
Posts: 24
Joined: Thu Feb 22, 2018 2:33 am
Projects: Project Mercurial
Deviantart: KouhaiChan1
Soundcloud: KouhaiChan
Contact:

Re: Adding new game modes after first completion

#6 Post by KouhaiChan » Mon Nov 05, 2018 1:22 pm

gonna bookmark this real quick lol

Post Reply

Who is online

Users browsing this forum: No registered users