Page 1 of 1
Save Files That Can Be Named
Posted: Fri Dec 15, 2017 12:01 am
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.
Re: Save Files That Can Be Named
Posted: Fri Dec 15, 2017 12:39 am
by Imperf3kt
I assume the character naming code and save_name variable could be used together?
Sorry I cannot give examples right now
Re: Save Files That Can Be Named
Posted: Fri Dec 15, 2017 11:03 am
by Ocelot
You can add and retrieve arbitrary data to saves:
viewtopic.php?p=445160#p445160
Re: Save Files That Can Be Named
Posted: Sat Dec 16, 2017 7:22 am
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.
Re: Save Files That Can Be Named
Posted: Sat Dec 16, 2017 12:29 pm
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.
Re: Save Files That Can Be Named
Posted: Sat Dec 16, 2017 1:05 pm
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...
Re: Save Files That Can Be Named
Posted: Tue Dec 19, 2017 8:03 am
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...