Game version flag from saved files

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
dasauto1
Newbie
Posts: 21
Joined: Sun Oct 31, 2021 2:26 pm
Contact:

Game version flag from saved files

#1 Post by dasauto1 » Sat Feb 12, 2022 11:38 am

Hello, I'm trying to implement the concept of a variable changing if the saved file loaded is from an old version of the game. Like I want to check user is currently using the latest version of the game, is this possible?

User avatar
Ocelot
Eileen-Class Veteran
Posts: 1883
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Game version flag from saved files

#2 Post by Ocelot » Sat Feb 12, 2022 3:07 pm

Something like that:

Code: Select all

default save_version = config,version

label after_load:
    if save_version != config.version:
        # Update data
        # Other things to do
        $ save_version = config.version # Update save game version
    return
< < insert Rick Cook quote here > >

dasauto1
Newbie
Posts: 21
Joined: Sun Oct 31, 2021 2:26 pm
Contact:

Re: Game version flag from saved files

#3 Post by dasauto1 » Sat Feb 12, 2022 5:17 pm

Ocelot wrote:
Sat Feb 12, 2022 3:07 pm
Something like that:

Code: Select all

default save_version = config,version

label after_load:
    if save_version != config.version:
        # Update data
        # Other things to do
        $ save_version = config.version # Update save game version
    return
Thanks!

Post Reply

Who is online

Users browsing this forum: No registered users