1) I simply don't understand how to add in-game variables to the default naming of save files. By default, it uses the FileTime(name, format=u'%b %d, %H:%M', empty=u'', page=None) to take the time the file was saved and you can use the same function to add other text, right? Like, I have a new one that says FileTime(slot, format=_"words.", empty=_"") and that shows up fine. However, I want to add the route chosen and the entered player name when the player saves. When I use something like FileTime(slot, format=_"[name]") it says "Maximum recursion depth reached". For some context: I'm kind of new to coding (just finishing up my very first coding class on Javascript and HTML) and pretty unfamiliar with Python. Also, I'm setting up my save screen like this because I rather like the way I save otome games on my PSVita.
2) Can you customize text separately from each other on this screen? For example, let's say I want the time and date to be a different size and color than the size and color of the chapter name and I want the character name to be different from those size and colors. Can I do that within the FileTime() function, or would I need to make different styles for each different kind of text I want? So would style slot_button_time, style slot_button_chapter, and style slot_button_character would all need to be separate or not?
3) Also, as a side note, I just want to make sure I'm understanding these other functions correctly: FileSlotName() only keeps track of the number of slots, correct? Ex. I have 100 slots, so I use this function to count from 1 to 100 in the top right corner of all my slots. And FileSaveName() only goes in and keeps track of the name the slot was saved under. Is that right?
Here's the code I've been working on if it's needed and a screenshot for reference:
Code: Select all
screen save():
tag menu
use file_slots(_("Save"))
screen load():
tag menu
use file_slots(_("Load"))
screen file_slots(title):
default page_name_value = FilePageNameInputValue(pattern=_("Saves"), auto=_("Automatic saves"), quick=_("Quick saves"))
use game_menu(title, scroll="viewport"):
fixed:
order_reverse True
grid gui.file_slot_cols gui.file_slot_rows:
style_prefix "slot"
xalign 0.01
yalign 0.36
spacing gui.slot_spacing
for i in range(gui.file_slot_cols * gui.file_slot_rows):
$ slot = i + 1
button:
action FileAction(slot)
has hbox
add FileScreenshot(slot) xpos 93
text ( " %d. " % slot
+ FileTime(slot, format=_("{#file_time}%A, %B %d %Y, %H:%M \n"), empty=_("Empty Slot."))
+ FileTime(slot, format=_("Words."), empty=_(""))
+ FileSaveName(slot)) style "slot_name_text" align (0.01, 0.0)
key "save_delete" action FileDelete(slot)
style page_label is gui_label
style page_label_text is gui_label_text
style page_button is gui_button
style page_button_text is gui_button_text
style slot_button is gui_button
style slot_button_text is gui_button_text
style slot_time_text is slot_button_text
style slot_name_text is slot_button_text
style page_label:
xpadding 50
ypadding 3
style page_label_text:
text_align 0.5
layout "subtitle"
hover_color gui.hover_color
style page_button:
properties gui.button_properties("page_button")
style page_button_text:
properties gui.button_text_properties("page_button")
style slot_button:
properties gui.button_properties("slot_button")
style slot_button_text:
color ("#800000")
size 14
first_indent 95
newline_indent True