Deleting the saves

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
000
Regular
Posts: 94
Joined: Mon Dec 24, 2007 11:09 am
Projects: Ren'Py Russian distributive
Location: Уфа, РБ, Россия
Contact:

Deleting the saves

#1 Post by 000 »

I think, easy way for VN-readers to delete the saves would be nice addition for the engine, as it is a standart feature in games. Do you agree with me?

Perhaps the easiest way would be adding new menu screen similar to the save and load screens, but instead of saving / loading, it would delete picked save.
Something like:

Code: Select all

init:
    $ config.main_menu.insert(2, ('Delete Saves', _intra_jumps("delete_screen", "main_game_transition"), "True"))
    $ config.game_menu.insert(4, ("delete", 'Delete Saves', _intra_jumps("delete_screen", "main_game_transition"), "True"))
    

label delete_screen:
    python hide:
        while True:
            fn = _file_picker("delete", False)
           
            if not layout.yesno_prompt("delete",  u"Are you sure you want to delete this?"):
                continue

            renpy.unlink_save(fn)
Treat this thread as feature request (more people says "We need this feature!" = more likely it would be implemented) / how-to tread. Better codes / another ways to do so are welcomed.

If this feature is already there and I was blind of it, then sorry.
<feels sowwy for his Engrish>

chikotsukino
Regular
Posts: 58
Joined: Sun May 31, 2009 8:28 pm
Projects: Angels
Contact:

Re: Deleting the saves

#2 Post by chikotsukino »

I've always wondered how to delete the saves :\

delta
Epitome of Generic
Posts: 525
Joined: Sat Dec 22, 2007 12:59 pm
Projects: yes
Contact:

Re: Deleting the saves

#3 Post by delta »

KS has a custom file picker that already includes a delete button on both load and save screens.
Ren'Py LauncherSchnappschuss001.jpg
The code is fairly trivial. This way, you don't have to add yet another menu screen.
The rest is left as an exercise for the reader.

chikotsukino
Regular
Posts: 58
Joined: Sun May 31, 2009 8:28 pm
Projects: Angels
Contact:

Re: Deleting the saves

#4 Post by chikotsukino »

whats KS?

User avatar
MaiMai
Yandere
Posts: 1757
Joined: Sat Mar 21, 2009 6:04 pm
Completed: [Phase Shift]
Projects: [ None ]
Organization: Paper Stars
Tumblr: maiscribbles
Deviantart: maiscribble
Location: USA, Southern California
Contact:

Re: Deleting the saves

#5 Post by MaiMai »

Katawa Shoujo o_O
Image COMMISSIONS AVAILABLE (check Tumblr sidebar)

chikotsukino
Regular
Posts: 58
Joined: Sun May 31, 2009 8:28 pm
Projects: Angels
Contact:

Re: Deleting the saves

#6 Post by chikotsukino »

MaiMai wrote:Katawa Shoujo o_O
no need for the "o_O"
i didnt know

but how do you get the little x's to delete the saves?

delta
Epitome of Generic
Posts: 525
Joined: Sat Dec 22, 2007 12:59 pm
Projects: yes
Contact:

Re: Deleting the saves

#7 Post by delta »

renpy.unlink_save()?
The rest is left as an exercise for the reader.

000
Regular
Posts: 94
Joined: Mon Dec 24, 2007 11:09 am
Projects: Ren'Py Russian distributive
Location: Уфа, РБ, Россия
Contact:

Re: Deleting the saves

#8 Post by 000 »

delta wrote:The code is fairly trivial.
Then be my guest an share this piece of fairly trivial code with the rest of us.
Imagemap layout extentions won't count as "fairly trivial", however. But useful, yes.
<feels sowwy for his Engrish>

delta
Epitome of Generic
Posts: 525
Joined: Sat Dec 22, 2007 12:59 pm
Projects: yes
Contact:

Re: Deleting the saves

#9 Post by delta »

Wouldn't be of any use to you, this is not a stock layout anyway.
The rest is left as an exercise for the reader.

Post Reply

Who is online

Users browsing this forum: Ocelot