did you know you can name save files? i break up my longer stories into chapters, so i like to add the chapter name in there... it's a nice little touch that makes save files easier to navigate at a glance, especially if it's hard to tell where in the story you are from just the screenshot.
and the good news is, it's just a single line! write something like this in your script any time you want to update the save name:
$ save_name = _("Chapter 1 - First Date")
if u wanna do more than this, tho... READ ON...
ok let's talk about how this works!!! look for these lines in screens.rpy, under the file_slots screen:
text FileTime(slot, format=_("{#file_time}%A, %B %d %Y, %H:%M"), empty=_("empty slot")):
style "slot_time_text"
text FileSaveName(slot):
style "slot_name_text"
this is the text for the save file button. it shows in a vbox (vertical box) underneath the screenshot taken when the save is created... wait i can just show you with css
(save name goes here)
it looks like that!
special thanks to @lexyeevee for her css for css babies posts, and @blep for making prechoster!
FileSaveName() is where your save_name variable gets shown. if you don't set one, it just shows an empty line :)
now let's talk about the first part: FileTime(). all that % nonsense in there is string formatting stuff... there's a full list here but i'll explain the ones included in the default code from above:
| code | what it shows |
|---|---|
| %A | day of the week |
| %B | month (full name) |
| %d | day (2 digit number) |
| %Y | year (all 4 digits) |
| %H | hour (00-23) |
| %M | minute (00-59) |
sometimes when you change your font, the save slot text gets a little crowded... i think it's kinda unnecessary to have the weekday in there, so sometimes i change it to a more simplified version like {#file_time}%m/%d/%Y - %H:%M
(save name goes here)
you can move these elements around however you want. it's easy to swap out the button art in the game/gui/button folder, but you can also change the button size in gui.rpy
this is the xysize of the file slot button:
define gui.slot_button_width = 276
define gui.slot_button_height = 206
the size of the thumbnail (aka the screenshot renpy takes when saving):
define config.thumbnail_width = 256
define config.thumbnail_height = 144
and the grid layout which shows 6 slots by default:
define gui.file_slot_cols = 3
define gui.file_slot_rows = 2
you can change all these things to make your save files look however you want! but honestly i tend to stop at just drawing different art for them... i wanted to mention all this stuff though, because sometimes your save name gets a little long, and it's nice to be able to add more space when you need it.
one last note...
keep in mind if you translate your game to other languages, you'll need to change the date format to look how a player speaking that language would expect. there's a list by country on wikipedia! i'm american so i use month/day/year, but we're kinda the odd ones out... it's usually day/month/year! it's a small thing, but worth keeping in mind when localizing stuff :) ask your translator if you're not sure how to write it!
