Can I "force" the game to save like this?

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
nanashine
Regular
Posts: 129
Joined: Thu Nov 30, 2017 1:44 pm
itch: renpytom
Contact:

Can I "force" the game to save like this?

#1 Post by nanashine »

I was wondering if there's anything like:

Code: Select all

    $renpy.save(slot_1)
If I wanted to "force" the game to save a certain part at a certain save slot.

Like:

Code: Select all

label parkatnight1:
    
    scene park3
    
    $renpy.save(slot_1)
I was wondering if there's any code like this. I've been reading many things and didn't find out if there's something like that or not.

Thanks.
I can't access my other account cause I don't remember the e-mail I used *cries in emoji*.

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Can I "force" the game to save like this?

#2 Post by trooper6 »

Have you checked the documentation? Specifically the paged titled Saving, Loading, and Rollback? There is documentation on the exact command you are asking about: https://www.renpy.org/doc/html/save_loa ... renpy.save
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

nanashine
Regular
Posts: 129
Joined: Thu Nov 30, 2017 1:44 pm
itch: renpytom
Contact:

Re: Can I "force" the game to save like this?

#3 Post by nanashine »

trooper6 wrote: Wed Apr 24, 2019 2:26 pm Have you checked the documentation? Specifically the paged titled Saving, Loading, and Rollback? There is documentation on the exact command you are asking about: https://www.renpy.org/doc/html/save_loa ... renpy.save
Hello!
I saw that some time ago. But I didn't understand how to apply that :?:
I still don't have that much knowledge hah

Code: Select all

    renpy.save(filename, extra_info='')
Like, would "filename" be "slot_1"? Or should I give a name to the slot and then that name would be "filename"?
And are "extra_info='' something the game should "remember"?

My biggest challenge is that there are many custom names(imputs) in my game.
Like:

Code: Select all

    while name == "":
        $ name = renpy.input("What's your name?").strip()
Should it be something like:

Code: Select all

    $renpy.save(slot_1, extra_info='name')
*it's wrong, right?* :oops: :oops:

If there was an example, I would understand better. But I couldn't find any hah

Anyway, thanks for the link :)
I can't access my other account cause I don't remember the e-mail I used *cries in emoji*.

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Can I "force" the game to save like this?

#4 Post by trooper6 »

What I do in this situation, is create a fresh project with nothing in it, and test the one thing I want to test. So I would write the code and see if it worked. If it didn't work, I'd play around with it. Do I need to put slot_1 in quotations? Or not? What happens if I don't put any extra_info? Okay...what happens if I try putting something in extra_info?

I experiment and use that to learn the code. I don't have time right now to build a dummy project and test it out (I have to do a bunch of class prep at the moment). But I encourage you to make your own dummy project and experiment. It is one of the best ways to learn.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

nanashine
Regular
Posts: 129
Joined: Thu Nov 30, 2017 1:44 pm
itch: renpytom
Contact:

Re: Can I "force" the game to save like this?

#5 Post by nanashine »

trooper6 wrote: Wed Apr 24, 2019 10:40 pm What I do in this situation, is create a fresh project with nothing in it, and test the one thing I want to test. So I would write the code and see if it worked. If it didn't work, I'd play around with it. Do I need to put slot_1 in quotations? Or not? What happens if I don't put any extra_info? Okay...what happens if I try putting something in extra_info?

I experiment and use that to learn the code. I don't have time right now to build a dummy project and test it out (I have to do a bunch of class prep at the moment). But I encourage you to make your own dummy project and experiment. It is one of the best ways to learn.
Thank you so much! Good luck with your work :)
I can't access my other account cause I don't remember the e-mail I used *cries in emoji*.

Post Reply

Who is online

Users browsing this forum: Andredron