Autolabelling for Save and Restore?

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
EwanG
Miko-Class Veteran
Posts: 711
Joined: Thu Oct 26, 2006 5:37 pm
Location: San Antonio, TX
Contact:

Autolabelling for Save and Restore?

#1 Post by EwanG » Mon Oct 30, 2006 9:03 am

On the commerical VN's I've read/played, there is usually an ability to save a file at a particular page so you can start right back where you left off. In Ren'Py (at least from what I've seen in the demo code), it appears you have to set a label for a section to be able to restore to that point.

Is there something I'm missing (probably, which is why I'm asking here)?

User avatar
mikey
Lemma-Class Veteran
Posts: 3249
Joined: Sat Jan 10, 2004 6:03 am
itch: atpprojects
Contact:

#2 Post by mikey » Mon Oct 30, 2006 9:11 am

You can save at any place (any line of dialogue), the name label only indicates the save name of the section - if that's what you asked.

User avatar
DaFool
Lemma-Class Veteran
Posts: 4171
Joined: Tue Aug 01, 2006 12:39 pm
Contact:

#3 Post by DaFool » Mon Oct 30, 2006 9:26 am

Yup, it automatically saves the screenshot, and save date.

Since its just a label, don't forget to change it once you start a new section in your game.

User avatar
EwanG
Miko-Class Veteran
Posts: 711
Joined: Thu Oct 26, 2006 5:37 pm
Location: San Antonio, TX
Contact:

#4 Post by EwanG » Mon Oct 30, 2006 11:11 am

OK, so when they go to restart, how do I get them back to that point that was saved? That's what I thought the label was used for, but there's obviously something I'm still not understanding :D

Thanks for the help!

User avatar
dizzcity
Veteran
Posts: 311
Joined: Thu Aug 17, 2006 10:51 am
Projects: Lakeside Sunset, Wedding Vows, Working Woman
Location: Singapore
Contact:

#5 Post by dizzcity » Mon Oct 30, 2006 11:48 am

Save and Load are used for returning to the exact spot in the game/novel. You have no worries there. It's already integrated. However, the name by which that save point will be called in the Saved Files menu is defined by the $ save_name=" " variable.

labels are used to divide your script up into sections for navigation. You can think of them as separate blocks to jump to after making choices in a menu. They're like different pages on a website. Everything under one label will be done in sequence.

(pseudocode)

Code: Select all

For example, if you have a menu choice like:

What do I do today?
> Sleep and Eat (goes to label sleep_and_eat)
> Go out on a Date (goes to label go_on_date)

then each of those answers will take you to a separate section with their own labels.

label sleep_and_eat:
<everything that follows after the user has chosen to sleep and eat>

label go_on_date:
<everything that happens after the user has chosen to go on the date>
-Dizzy-
A smart man follows the rules, a dumb man breaks them. A great man bends the rules and thus creates them.
Fanfiction.net Profile.
Writer and director of Working Woman (NaNoRenO March 2010)
Writer and director of Wedding Vows (finished 2009).
Creator of Lakeside Sunset (finished 2006).

User avatar
EwanG
Miko-Class Veteran
Posts: 711
Joined: Thu Oct 26, 2006 5:37 pm
Location: San Antonio, TX
Contact:

#6 Post by EwanG » Mon Oct 30, 2006 12:25 pm

Got it. I was learning the wrong "lesson" about how labels were being used.

Thanks!

Post Reply

Who is online

Users browsing this forum: No registered users