Is there a way to name saves? [ANSWERED]
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.
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.
- pyopyon
- Veteran
- Posts: 451
- Joined: Thu Aug 29, 2013 4:35 am
- Completed: https://chouette.itch.io/
- Projects: Ocean Pearls, Catching the Fox [NaNo16], Singles
- Organization: Jellyfish Parade
- Tumblr: jelpiparade
- Skype: miss.chouette
- Soundcloud: pyopyon
- itch: chouette
- Contact:
Is there a way to name saves? [ANSWERED]
Instead of having saves organized by date, is there a way to name them manually?
Last edited by pyopyon on Fri Feb 19, 2016 3:44 pm, edited 1 time in total.
- Donmai
- Eileen-Class Veteran
- Posts: 1960
- Joined: Sun Jun 10, 2012 1:45 am
- Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
- Projects: Slumberland
- Location: Brazil
- Contact:
Re: Is there a way to name saves?
Use save_name variable: http://www.renpy.org/doc/html/save_load ... -variables
You can pass a string to save_name from time to time in your code.
You can pass a string to save_name from time to time in your code.
Code: Select all
$ save_name = "Dancing with the enemy"
scene ballroom
"While we were dancing, I could notice an evil smile in Jeremy's face."
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)
TOIRE NO HANAKO (A Story About Fear)
- pyopyon
- Veteran
- Posts: 451
- Joined: Thu Aug 29, 2013 4:35 am
- Completed: https://chouette.itch.io/
- Projects: Ocean Pearls, Catching the Fox [NaNo16], Singles
- Organization: Jellyfish Parade
- Tumblr: jelpiparade
- Skype: miss.chouette
- Soundcloud: pyopyon
- itch: chouette
- Contact:
Re: Is there a way to name saves?
Oh, that's a good solution!
But I think I should've been more clear in my question;
what I mean is there a way for a player to type in the name of a save themselves?
But I think I should've been more clear in my question;
what I mean is there a way for a player to type in the name of a save themselves?
Re: Is there a way to name saves?
Assuming you have the save name variable above, all you would have to do is set it to be = renpy.input('Please enter a name for this specific saved game')
more on that input function and its equally helpful parameters here:
http://www.renpy.org/doc/html/input.html
The saves as the files they are listed in the saves folder, don't actually have the date attached to them; only the save screen pulls that information out of the file to list. So if you're asking about how the saves are named in the save screen, you just have to edit that screen code to only display the information you want.
This is the relevant code you need to edit in your save screen (in the screens.rpy file):
Specifically the FileTime() area. You'll still have to study the screen language documentation to get a better idea of how you can put what specifically you want to place there.
That saves/loads/rollback page posted above is also really helpful, it's got some stuff on renaming saves, and setting file pages, which help you further customize your saving options.
more on that input function and its equally helpful parameters here:
http://www.renpy.org/doc/html/input.html
The saves as the files they are listed in the saves folder, don't actually have the date attached to them; only the save screen pulls that information out of the file to list. So if you're asking about how the saves are named in the save screen, you just have to edit that screen code to only display the information you want.
This is the relevant code you need to edit in your save screen (in the screens.rpy file):
Code: Select all
# Add the screenshot and the description to thebutton.
add FileScreenshot(i)
text ( " %2d. " % i
+ FileTime(i, empty=_("Empty Slot."))
+ "\n"
+ FileSaveName(i)) style "large_button_text"
That saves/loads/rollback page posted above is also really helpful, it's got some stuff on renaming saves, and setting file pages, which help you further customize your saving options.
- pyopyon
- Veteran
- Posts: 451
- Joined: Thu Aug 29, 2013 4:35 am
- Completed: https://chouette.itch.io/
- Projects: Ocean Pearls, Catching the Fox [NaNo16], Singles
- Organization: Jellyfish Parade
- Tumblr: jelpiparade
- Skype: miss.chouette
- Soundcloud: pyopyon
- itch: chouette
- Contact:
Re: Is there a way to name saves?
Okay, I'll see if I can play around with it. Thanks a lot y'all!
Re: Is there a way to name saves? [ANSWERED]
If you have issues breaking down that screen to do what you want, come on back and we'll figure them out out together
most of those file functions like the FileTime() one in the default save screen:
...are broken down on this particular doc page: http://www.renpy.org/doc/html/screen_ac ... le-actions
most of those file functions like the FileTime() one in the default save screen:
Code: Select all
FileTime(name, format='%b %d, %H:%M', empty='', page=None)
Returns the time the file was saved, formatted according to the supplied format. If the file is not found, empty is returned.
The return value is a string.
Re: Is there a way to name saves? [ANSWERED]
Hi! Have you figured out how to make a custom $ save_name from user? I've tried using renpy.input but i got an error.
Who is online
Users browsing this forum: Bing [Bot], Majestic-12 [Bot]