Save Files That Can Be Named

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
Suru
Regular
Posts: 112
Joined: Wed Aug 31, 2016 10:27 pm
Contact:

Save Files That Can Be Named

#1 Post by Suru »

Is there a way to alter the save files in Renpy so you can name them yourself whatever you would like? I know sometimes I have a hard time not having a customization save file for some renpy games and wish I could name them myself. Would there be some sort of code to alter what's already there or would it need to be completely crafted from scratch? Thanks.

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3785
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Save Files That Can Be Named

#2 Post by Imperf3kt »

I assume the character naming code and save_name variable could be used together?

Sorry I cannot give examples right now
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2384
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Save Files That Can Be Named

#3 Post by Ocelot »

You can add and retrieve arbitrary data to saves: viewtopic.php?p=445160#p445160
< < insert Rick Cook quote here > >

User avatar
xavimat
Eileen-Class Veteran
Posts: 1460
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love, unknown
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Contact:

Re: Save Files That Can Be Named

#4 Post by xavimat »

I'm a bit confused for your question, when you say "alter what's already there".

Do you really need to change the actual names of the files? (the .save files that nobody needs to see?).
Do you need a save_name or other info to display on the load screen? (see the post linked by Ocelot)

You can indeed name your save files:
$ renpy.save('whatevernamefloatsyourboat') will produce the file: whatevernamefloatsyourboat-LT1.save

And then, you can load that saved file:
$ renpy.load('whatevernamefloatsyourboat')

You can, also, retrieve the list of saved games:
renpy.list_saved_games(fast=True)

I use a "user system" that stores a user-code in a persistent.users dictionary, and then loads the correct save file using that name.
That said, I'm not using at all the save/load screens already built in Ren'Py.
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

User avatar
Suru
Regular
Posts: 112
Joined: Wed Aug 31, 2016 10:27 pm
Contact:

Re: Save Files That Can Be Named

#5 Post by Suru »

Sorry if I was unclear. I am looking for a method to allow players to name their own save files whatever they would like. Basically allowing any player to enter what they like as the name of the save.

User avatar
xavimat
Eileen-Class Veteran
Posts: 1460
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love, unknown
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Contact:

Re: Save Files That Can Be Named

#6 Post by xavimat »

Suru wrote: Sat Dec 16, 2017 12:29 pm Sorry if I was unclear. I am looking for a method to allow players to name their own save files whatever they would like. Basically allowing any player to enter what they like as the name of the save.
Ok. Then my post is useless for you. IIRC there was a post asking the same thing, it should be here, in the forums, somewhere...
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

Errilhl
Regular
Posts: 164
Joined: Wed Nov 08, 2017 4:32 pm
Projects: HSS
Deviantart: studioerrilhl
Github: studioerrilhl
Contact:

Re: Save Files That Can Be Named

#7 Post by Errilhl »

Haven't looked into this, but wouldn't that just involve using a renpy.input() where the user can input his/her choice for name of the savefile, and if no name is input, use a default name? Shouldn't be very hard to figure out, I think...
Currently working on: Image

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Majestic-12 [Bot]