Page 1 of 1

[SOLVED] Customizing Save Slot Info. HELP!

Posted: Mon Nov 13, 2017 8:05 am
by CalixtheGreat
Good day! Just want to ask if it's possible to have a custom save slot. I'm talking about the info shown when the player saves the game. Instead of the Date and time of the game, I want to change it into episode title (like "EPISODE 01: THE BLAH BLAH.") And then have the second line below it to show the date and time.

Sorry for my grammar. Hahaha. Thanks in advance. 😊

Re: Customizing Save Slot Info. HELP!

Posted: Mon Nov 13, 2017 1:43 pm
by ArcialIntegra
Okay, so what you'll want to do is use this bit of Code whenever you have a name you want for your save slot.

Code: Select all

    $ save_name = "EPISODE 01: The Blah Blah."
Here's an example of how you would use it.

Code: Select all

label start:
	    $ save_name = "Episode 01: The Road to Germany"
	    scene bg road.jpg
	    ## other important stuff
	    a "So, you see, this is how we get to Germany from our present location."
When you want a new Save Name, just use the save name variable again later on and use a new name like '$ save_name = "Episode 02: The Blah Blah Strikes Back"' or something.

Re: Customizing Save Slot Info. HELP!

Posted: Thu Nov 16, 2017 3:19 am
by CalixtheGreat
ArcialIntegra wrote: Mon Nov 13, 2017 1:43 pm Okay, so what you'll want to do is use this bit of Code whenever you have a name you want for your save slot.

Code: Select all

    $ save_name = "EPISODE 01: The Blah Blah."
Here's an example of how you would use it.

Code: Select all

label start:
	    $ save_name = "Episode 01: The Road to Germany"
	    scene bg road.jpg
	    ## other important stuff
	    a "So, you see, this is how we get to Germany from our present location."
When you want a new Save Name, just use the save name variable again later on and use a new name like '$ save_name = "Episode 02: The Blah Blah Strikes Back"' or something.
Thanks for the response. Will going to try these once I'm home and if it worked, I will going to tag this post as SOLVED. 😀

Re: Customizing Save Slot Info. HELP!

Posted: Thu Nov 16, 2017 1:23 pm
by ArcialIntegra
CalixtheGreat wrote: Thu Nov 16, 2017 3:19 am
ArcialIntegra wrote: Mon Nov 13, 2017 1:43 pm Okay, so what you'll want to do is use this bit of Code whenever you have a name you want for your save slot.

Code: Select all

    $ save_name = "EPISODE 01: The Blah Blah."
Here's an example of how you would use it.

Code: Select all

label start:
	$ save_name = "Episode 01: The Road to Germany"
	scene bg road.jpg
	## other important stuff
	a "So, you see, this is how we get to Germany from our present location."
When you want a new Save Name, just use the save name variable again later on and use a new name like '$ save_name = "Episode 02: The Blah Blah Strikes Back"' or something.
Thanks for the response. Will going to try these once I'm home and if it worked, I will going to tag this post as SOLVED. 😀
Well, "these" is unnecessary. It's one code. The first just shows you how to do it with the sample name you gave us. The second shows an example of its use if you were to put it at the beginning of your game. That said, if this helps you, I am glad. :)

Re: Customizing Save Slot Info. HELP!

Posted: Fri Nov 17, 2017 11:37 am
by CalixtheGreat
ArcialIntegra wrote: Thu Nov 16, 2017 1:23 pm
CalixtheGreat wrote: Thu Nov 16, 2017 3:19 am
ArcialIntegra wrote: Mon Nov 13, 2017 1:43 pm Okay, so what you'll want to do is use this bit of Code whenever you have a name you want for your save slot.

Code: Select all

    $ save_name = "EPISODE 01: The Blah Blah."
Here's an example of how you would use it.

Code: Select all

label start:
	    $ save_name = "Episode 01: The Road to Germany"
	    scene bg road.jpg
	    ## other important stuff
	    a "So, you see, this is how we get to Germany from our present location."
When you want a new Save Name, just use the save name variable again later on and use a new name like '$ save_name = "Episode 02: The Blah Blah Strikes Back"' or something.
Thanks for the response. Will going to try these once I'm home and if it worked, I will going to tag this post as SOLVED. 😀
Well, "these" is unnecessary. It's one code. The first just shows you how to do it with the sample name you gave us. The second shows an example of its use if you were to put it at the beginning of your game. That said, if this helps you, I am glad. :)
It doesn't work.
I'm sure there's just one thing missing and it's on the screens.rpy but I don't know how and what to add on the save screen. Sorry for my dumb question and grammar. Haha

Re: Customizing Save Slot Info. HELP!

Posted: Fri Nov 17, 2017 11:53 am
by NineBells
Hi po. I'm not sure about this but try adding FileSaveName to the file picker screen like so:

Code: Select all

$ file_text = "{b}%s\n %2s. %s\n  %s{/b}" % (
                        FileSaveName(save_name),
                        FileSlotName(number, 6),
                        FileTime(number, empty=_("Empty Slot.")),
                        FileSaveName(number))

Re: Customizing Save Slot Info. HELP!

Posted: Fri Nov 17, 2017 3:50 pm
by ArcialIntegra
CalixtheGreat wrote: Fri Nov 17, 2017 11:37 am
ArcialIntegra wrote: Thu Nov 16, 2017 1:23 pm
CalixtheGreat wrote: Thu Nov 16, 2017 3:19 am

Thanks for the response. Will going to try these once I'm home and if it worked, I will going to tag this post as SOLVED. 😀
Well, "these" is unnecessary. It's one code. The first just shows you how to do it with the sample name you gave us. The second shows an example of its use if you were to put it at the beginning of your game. That said, if this helps you, I am glad. :)
It doesn't work.
I'm sure there's just one thing missing and it's on the screens.rpy but I don't know how and what to add on the save screen. Sorry for my dumb question and grammar. Haha
It should function properly if you're using a "Factory Fresh" version of Ren'Py. You may need to update if you're using an old version, but I don't think that's the issue. Did you test saving the game and checking what the save file name appears as? I've used this code and received the desired result as I was able to understand your question. If you're receiving an error when using the code, please share the error and your exact use of the script.

EDIT: Okay, this is IMPORTANT. If you copy-and-pasted my example code verbatim, it turns out my example code had incorrect indentation. This would cause an error if you implemented it as is. I fixed the indentation, so it should be fine now as it is. Sorry about that!

Re: Customizing Save Slot Info. HELP!

Posted: Sun Nov 19, 2017 2:57 am
by ArcialIntegra
Huh... No clue why I had another comment post that was just a quote... Um... Sorry about that. Anyhow, any update on your success?

Re: Customizing Save Slot Info. HELP!

Posted: Tue Nov 21, 2017 4:09 am
by CalixtheGreat
ArcialIntegra wrote: Sun Nov 19, 2017 2:57 am Huh... No clue why I had another comment post that was just a quote... Um... Sorry about that. Anyhow, any update on your success?

It's working now! Thanks buddy. Haha. 😁 This case is SOLVED!

Re: Customizing Save Slot Info. HELP!

Posted: Tue Nov 21, 2017 10:41 pm
by ArcialIntegra
CalixtheGreat wrote: Tue Nov 21, 2017 4:09 am
ArcialIntegra wrote: Sun Nov 19, 2017 2:57 am Huh... No clue why I had another comment post that was just a quote... Um... Sorry about that. Anyhow, any update on your success?

It's working now! Thanks buddy. Haha. 😁 This case is SOLVED!
Mind if I ask what ended up being the solution? This way, people can look at your example and figure out where they may be going wrong.

Re: Customizing Save Slot Info. HELP!

Posted: Wed Nov 22, 2017 1:14 am
by CalixtheGreat
ArcialIntegra wrote: Tue Nov 21, 2017 10:41 pm
CalixtheGreat wrote: Tue Nov 21, 2017 4:09 am
ArcialIntegra wrote: Sun Nov 19, 2017 2:57 am Huh... No clue why I had another comment post that was just a quote... Um... Sorry about that. Anyhow, any update on your success?

It's working now! Thanks buddy. Haha. 😁 This case is SOLVED!
Mind if I ask what ended up being the solution? This way, people can look at your example and figure out where they may be going wrong.
Your code worked perfectly after I tried using it on the default save screen (I modified my previous save screen code, maybe that's the reason if why the save name doesn't worked.).😁

Re: Customizing Save Slot Info. HELP!

Posted: Wed Nov 22, 2017 1:45 am
by ArcialIntegra
CalixtheGreat wrote: Wed Nov 22, 2017 1:14 am
ArcialIntegra wrote: Tue Nov 21, 2017 10:41 pm
CalixtheGreat wrote: Tue Nov 21, 2017 4:09 am


It's working now! Thanks buddy. Haha. 😁 This case is SOLVED!
Mind if I ask what ended up being the solution? This way, people can look at your example and figure out where they may be going wrong.
Your code worked perfectly after I tried using it on the default save screen (I modified my previous save screen code, maybe that's the reason if why the save name doesn't worked.).😁
On the "Save Screen"? I'm... I'm not sure how it would work that way unless you had a single static name you wanted to apply to all save files. As far as I know, that should only function properly if used in the script...

Golly gosh... now I'm really confused and questioning if I understand that code's functionality...