[SOLVED] Customizing Save Slot Info. HELP!

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
Post Reply
Message
Author
User avatar
CalixtheGreat
Regular
Posts: 72
Joined: Thu Jun 08, 2017 12:00 am
Projects: Zephyr Breeze Investigations
itch: calixthegreat
Location: Philippines
Contact:

[SOLVED] Customizing Save Slot Info. HELP!

#1 Post 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. 😊
Last edited by CalixtheGreat on Tue Nov 21, 2017 4:10 am, edited 1 time in total.
Image
FB PAGE:
CALIX THE GREAT

ArcialIntegra
Regular
Posts: 53
Joined: Mon Nov 13, 2017 12:10 am
Contact:

Re: Customizing Save Slot Info. HELP!

#2 Post 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.

User avatar
CalixtheGreat
Regular
Posts: 72
Joined: Thu Jun 08, 2017 12:00 am
Projects: Zephyr Breeze Investigations
itch: calixthegreat
Location: Philippines
Contact:

Re: Customizing Save Slot Info. HELP!

#3 Post 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. πŸ˜€
Image
FB PAGE:
CALIX THE GREAT

ArcialIntegra
Regular
Posts: 53
Joined: Mon Nov 13, 2017 12:10 am
Contact:

Re: Customizing Save Slot Info. HELP!

#4 Post 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. :)
Last edited by ArcialIntegra on Sun Nov 19, 2017 2:55 am, edited 1 time in total.

User avatar
CalixtheGreat
Regular
Posts: 72
Joined: Thu Jun 08, 2017 12:00 am
Projects: Zephyr Breeze Investigations
itch: calixthegreat
Location: Philippines
Contact:

Re: Customizing Save Slot Info. HELP!

#5 Post 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
Image
FB PAGE:
CALIX THE GREAT

User avatar
NineBells
Newbie
Posts: 9
Joined: Mon Jun 05, 2017 9:01 am
Projects: https://ninebells.wordpress.com/current-projects/
Location: Some place where it's GMT+8
Contact:

Re: Customizing Save Slot Info. HELP!

#6 Post 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))
Hi. I'm a programmer. I'm currently available for short or simple projects. Check out my thread here.

Want to see how I work? Check out my blog!

One of my teams also has a blog here. Check it out for updates on our game TLH: Freud Was Right.

ArcialIntegra
Regular
Posts: 53
Joined: Mon Nov 13, 2017 12:10 am
Contact:

Re: Customizing Save Slot Info. HELP!

#7 Post 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!

ArcialIntegra
Regular
Posts: 53
Joined: Mon Nov 13, 2017 12:10 am
Contact:

Re: Customizing Save Slot Info. HELP!

#8 Post 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?

User avatar
CalixtheGreat
Regular
Posts: 72
Joined: Thu Jun 08, 2017 12:00 am
Projects: Zephyr Breeze Investigations
itch: calixthegreat
Location: Philippines
Contact:

Re: Customizing Save Slot Info. HELP!

#9 Post 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!
Image
FB PAGE:
CALIX THE GREAT

ArcialIntegra
Regular
Posts: 53
Joined: Mon Nov 13, 2017 12:10 am
Contact:

Re: Customizing Save Slot Info. HELP!

#10 Post 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.

User avatar
CalixtheGreat
Regular
Posts: 72
Joined: Thu Jun 08, 2017 12:00 am
Projects: Zephyr Breeze Investigations
itch: calixthegreat
Location: Philippines
Contact:

Re: Customizing Save Slot Info. HELP!

#11 Post 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.).😁
Image
FB PAGE:
CALIX THE GREAT

ArcialIntegra
Regular
Posts: 53
Joined: Mon Nov 13, 2017 12:10 am
Contact:

Re: Customizing Save Slot Info. HELP!

#12 Post 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...

Post Reply

Who is online

Users browsing this forum: No registered users