Making the Continue button load last save

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
Nicckonator
Regular
Posts: 35
Joined: Tue May 08, 2018 12:07 pm
Projects: Ochiba - Falling Leaves
Deviantart: Nicckonator
Contact:

Making the Continue button load last save

#1 Post by Nicckonator »

Hoping someone has a piece of code that makes my main menu's continue button auto-load the last known save file, would be much appreciated.

hotspot (452,946,146,49) action ShowMenu('continue')

Doesn't work obviously xD
GD - Game Developer, and owner of NK Productions,
the company currently making Ochiba - Falling Leaves (Visual Novel).

User avatar
Qlara
Regular
Posts: 80
Joined: Fri Nov 28, 2014 10:22 am
Completed: Carmilla
Skype: kantonija
itch: visualgothic
Location: Berlin
Contact:

Re: Making the Continue button load last save

#2 Post by Qlara »

Perhaps you will find this thread helpful:
viewtopic.php?t=34420

User avatar
Nicckonator
Regular
Posts: 35
Joined: Tue May 08, 2018 12:07 pm
Projects: Ochiba - Falling Leaves
Deviantart: Nicckonator
Contact:

Re: Making the Continue button load last save

#3 Post by Nicckonator »

already fixed it in my own way since there is no proper coding for 'continue', but thankyou :D
GD - Game Developer, and owner of NK Productions,
the company currently making Ochiba - Falling Leaves (Visual Novel).

User avatar
Qlara
Regular
Posts: 80
Joined: Fri Nov 28, 2014 10:22 am
Completed: Carmilla
Skype: kantonija
itch: visualgothic
Location: Berlin
Contact:

Re: Making the Continue button load last save

#4 Post by Qlara »

Care to share your results? I'm sure a lot of readers would appreciate it.

User avatar
Nicckonator
Regular
Posts: 35
Joined: Tue May 08, 2018 12:07 pm
Projects: Ochiba - Falling Leaves
Deviantart: Nicckonator
Contact:

Re: Making the Continue button load last save

#5 Post by Nicckonator »

What i did in my case though is remove the continue button entirely,

i made a custom overlay and added hotspots for those then removed the standard ren'py default buttons on the left-hand side, so i'm using an overlay with hotspots as my main menu keys.

Originally i had: continue, load, new game, settings, credits, quit

There was/is? no proper code for a continue button on the main menu and i had the "start" command assigned to my 'new game' button, which is ofcourse, what it does, it starts a new game, since i couldnt get it working though i removed the continue button and made this:

start, load, settings, credits, quit

added the start command to start button, so if you want to continue you have to go to load and click ur save file, i've seen it in multiple games/VN's and it's not a dealbreaker for me :)
GD - Game Developer, and owner of NK Productions,
the company currently making Ochiba - Falling Leaves (Visual Novel).

User avatar
Qlara
Regular
Posts: 80
Joined: Fri Nov 28, 2014 10:22 am
Completed: Carmilla
Skype: kantonija
itch: visualgothic
Location: Berlin
Contact:

Re: Making the Continue button load last save

#6 Post by Qlara »

I know you no longer need it, but the link I posted does have the code for continue, and perhaps someone else might benefit from it.
It checks whether a save file is present and loads it if so.

Code: Select all

$lastsave=renpy.newest_slot(r"\d+")
if lastsave is not None:
    $ name, page = lastsave.split("-")
    textbutton _("Continue") action FileLoad(name, page)

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]