[SOLVED] Autosave and Quicksave Slots in One Page

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
User avatar
KnotUntied
Newbie
Posts: 23
Joined: Mon Jan 04, 2016 5:36 am
Projects: Acheron
IRC Nick: Knot
Contact:

[SOLVED] Autosave and Quicksave Slots in One Page

#1 Post by KnotUntied »

Is it possible to design the filepicker so that it will display normal slots, autosave slots, and quicksave slots in a single page? If so, how?

Something like:
[NSlot 1][NSlot 3]
[NSlot 2][NSlot 4]
[ASlot 1][QSlot 1]
Last edited by KnotUntied on Sun Feb 28, 2016 4:56 am, edited 1 time in total.

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: Autosave and Quicksave Slots in One Page

#2 Post by xela »

I am not quite sure that I can follow your sorting logic but it should be perfectly possible...
Like what we're doing? Support us at:
Image

User avatar
KnotUntied
Newbie
Posts: 23
Joined: Mon Jan 04, 2016 5:36 am
Projects: Acheron
IRC Nick: Knot
Contact:

Re: Autosave and Quicksave Slots in One Page

#3 Post by KnotUntied »

Disregarding the anomalous arrangement of the normal saveslots, can I have some sample code as to how it's done?

philat
Eileen-Class Veteran
Posts: 1909
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: Autosave and Quicksave Slots in One Page

#4 Post by philat »

Saves are accessed via page / number (e.g., auto-1, quick-5, 2-1, etc.) so all you have to do is set the appropriate file action for your buttons. http://www.renpy.org/doc/html/screen_ac ... le-actions

User avatar
KnotUntied
Newbie
Posts: 23
Joined: Mon Jan 04, 2016 5:36 am
Projects: Acheron
IRC Nick: Knot
Contact:

Re: Autosave and Quicksave Slots in One Page

#5 Post by KnotUntied »

While I do comprehend the configurations of FileAction, my further experiments proved to be disastrous, and I was hoping for a small sample code to derive from.

philat
Eileen-Class Veteran
Posts: 1909
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: Autosave and Quicksave Slots in One Page

#6 Post by philat »

Well, what did you do? Most of the time it's more efficient to troubleshoot existing code.

Code: Select all

button:
    action FileSave(1, page="auto") #Use FileAction / FileLoad / FileSave as needed

    has hbox

    # Add the screenshot.
    add FileScreenshot(1, page="auto")

    text "auto 1"

    key "save_delete" action FileDelete(1, page="auto")

User avatar
KuroOneHalf
Regular
Posts: 129
Joined: Fri Apr 25, 2014 6:18 pm
Completed: Cuttlebone
Projects: Somewhere In The Shade
Deviantart: KuroOneHalf
itch: kuroonehalf
Contact:

Re: Autosave and Quicksave Slots in One Page

#7 Post by KuroOneHalf »

philat wrote:

Code: Select all

action FileSave(1, page="auto") 
As far as I know, this doesn't work. Normally you have to first change file page with FilePage(), then access the slots normally with FileSave() and FileLoad(). But even that I'm not being able to get working here - it's retaining the first FilePage() you initially do for the normal slots, and displaying another "regular slot 1" instead of "quick/auto slot 1".

I'm really curious to see what a working solution for this problem looks like.

philat
Eileen-Class Veteran
Posts: 1909
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: Autosave and Quicksave Slots in One Page

#8 Post by philat »

Well, I used FileSave as an example, but quicksave and autosave aren't really done from the save screen and shouldn't be. Load works fine.

User avatar
KnotUntied
Newbie
Posts: 23
Joined: Mon Jan 04, 2016 5:36 am
Projects: Acheron
IRC Nick: Knot
Contact:

Re: Autosave and Quicksave Slots in One Page

#9 Post by KnotUntied »

Using "i" in multiple ranges was causing the trouble. After separating one button from the range, the autosave slot I used for testing was functional. Many thanks!

Post Reply

Who is online

Users browsing this forum: No registered users