[Solved] Non-persistent variables are getting carried form older saves to new games.

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
KingmakerVN
Regular
Posts: 37
Joined: Sat Nov 23, 2019 7:03 pm
Projects: Kingmaker
Contact:

[Solved] Non-persistent variables are getting carried form older saves to new games.

#1 Post by KingmakerVN »

Hey, guys. I'm having an issue with renpy so I was wondering if any of you had an idea of what was going on. It's pretty much what the title says. Right now if I start a new game I'll have all the variables carry over from the last save, and these are not persistent variables so they shouldn't do that.
Last edited by KingmakerVN on Sat Jan 15, 2022 5:26 pm, edited 1 time in total.

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

Re: Non-persistent variables are getting carried form older saves to new games.

#2 Post by Ocelot »

How do you start new game? Did you change main menu screen? If so, show definition of button which starts a new game.
< < insert Rick Cook quote here > >

KingmakerVN
Regular
Posts: 37
Joined: Sat Nov 23, 2019 7:03 pm
Projects: Kingmaker
Contact:

Re: Non-persistent variables are getting carried form older saves to new games.

#3 Post by KingmakerVN »

Ocelot wrote: Sat Jan 15, 2022 3:49 pm How do you start new game? Did you change main menu screen? If so, show definition of button which starts a new game.
You mean this?

Code: Select all

if main_menu:

            textbutton _("Start") action Start()  
I don't think I've messed with that save for changing the background.

KingmakerVN
Regular
Posts: 37
Joined: Sat Nov 23, 2019 7:03 pm
Projects: Kingmaker
Contact:

Re: Non-persistent variables are getting carried form older saves to new games.

#4 Post by KingmakerVN »

It also happens when I activate auto-reload.

User avatar
Alex
Lemma-Class Veteran
Posts: 3090
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Non-persistent variables are getting carried form older saves to new games.

#5 Post by Alex »

What's that variables, how they defined, how they change their values, how did you find out that those variables are keep the values from previous gameplay?

Check this section if haven't yet - https://www.renpy.org/doc/html/save_load_rollback.html

KingmakerVN
Regular
Posts: 37
Joined: Sat Nov 23, 2019 7:03 pm
Projects: Kingmaker
Contact:

Re: Non-persistent variables are getting carried form older saves to new games.

#6 Post by KingmakerVN »

Alex wrote: Sat Jan 15, 2022 5:14 pm What's that variables, how they defined, how they change their values, how did you find out that those variables are keep the values from previous gameplay?

Check this section if haven't yet - https://www.renpy.org/doc/html/save_load_rollback.html
Yes, thank you. It seemed to be that. It somehow didn't matter when the variables were defined on the main script but since I move all the code to its own script it started acting up.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Kocker, Semrush [Bot], ZianRiyone