is there a way to create a button inside the settings of a game that allows the player to reset the game? (aka to delete persistent data)
button to reset game
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.
- Kornyart
- Newbie
- Posts: 18
- Joined: Mon Jan 25, 2021 1:18 pm
- Projects: Mindworks: the great division
- itch: Kornyart
- Contact:
button to reset game
Hey!
is there a way to create a button inside the settings of a game that allows the player to reset the game? (aka to delete persistent data)

is there a way to create a button inside the settings of a game that allows the player to reset the game? (aka to delete persistent data)
- m_from_space
- Veteran
- Posts: 302
- Joined: Sun Feb 21, 2021 3:36 am
- Contact:
Re: button to reset game
You should be more precise about what you want. Of course you can create a button, that can delete persistent data. Or just any data. So what do you mean by "reset the game". A game is reset to default values whenever you start a new game. Every game uses its own set of data, but persistent data is shared across all games. So what is it you actually need?
Persisent data details: https://www.renpy.org/doc/html/persistent.html
Persisent data details: https://www.renpy.org/doc/html/persistent.html
- Kornyart
- Newbie
- Posts: 18
- Joined: Mon Jan 25, 2021 1:18 pm
- Projects: Mindworks: the great division
- itch: Kornyart
- Contact:
Re: button to reset game
I just saw ur replym_from_space wrote: ↑Tue May 10, 2022 6:27 amYou should be more precise about what you want. Of course you can create a button, that can delete persistent data. Or just any data. So what do you mean by "reset the game". A game is reset to default values whenever you start a new game. Every game uses its own set of data, but persistent data is shared across all games. So what is it you actually need?
Persisent data details: https://www.renpy.org/doc/html/persistent.html
you know how in some games u have a button in the option that allows u to reset the game to be able to play it all over again? it resets it to how it was when it were first downloaded
Its like the "delete persistent" option in the launcher but for players
- enaielei
- Regular
- Posts: 114
- Joined: Fri Sep 17, 2021 2:09 am
- Tumblr: enaielei
- Deviantart: enaielei
- Github: enaielei
- Skype: enaielei
- Soundcloud: enaielei
- itch: enaielei
- Discord: enaielei#7487
- Contact:
Re: button to reset game
Use the persistent._clear to reset the Persistent data.
Code: Select all
textbutton "Reset" action Function(persistent._clear, True)- Imperf3kt
- Lemma-Class Veteran
- Posts: 3636
- Joined: Mon Dec 14, 2015 5:05 am
- Location: Your monitor
- Contact:
Re: button to reset game
There is also the clear achievements action.
achievement.clear_all()
achievement.clear_all()
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Free Android GUI - Updated occasionally
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
Who is online
Users browsing this forum: Bing [Bot], Google [Bot]