How about a text/image button that does this automatically?
(I didn't write the code myself just gathered it, it's all here in the forum).
Use this function with caution, if you hit the button all saves are lost aswell as persistent data.
Here's the python function which can be called by an action from a menu screen.
Code: Select all
init python:
def reset_data():
## deletes all persistent data use with caution
for attr in dir(persistent):
if not callable(attr) and not attr.startswith("_"):
setattr(persistent, attr, None)
## deletes all save games use with caution!
for slot in renpy.list_saved_games(fast=True):
renpy.unlink_save(slot)
## a Ren'Py relaunch is nessesary
renpy.quit(relaunch=True)
Code: Select all
textbutton _("Delete Save Games And Persistent Data") action Confirm("Are you sure to delete all persistent data?\nThis also deletes ALL saved games and cannot be undone.\nNotice: The Game will restart!", Function(reset_data))