[SOLVED] Display in-game time instead of actual time in save

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
sapiboonggames
Veteran
Posts: 299
Joined: Thu Jan 05, 2012 8:53 am
Completed: I Love You, Brother [BxB]
Contact:

[SOLVED] Display in-game time instead of actual time in save

#1 Post by sapiboonggames »

Hello guys,

I'm making a dating sim in which the game has variables that keep track of the date, month, and weekname (Monday, Tuesday, etc).
Previously, I use this code below:

Code: Select all

text FileTime(number, empty=_("???"))
This record the time player save game and display it in save screen.

My question is, how do we display in-game time (the game variables "Date", "Month", "Weekname" when the player save the game) in the save screen?
I tried this code below:

Code: Select all

text "[weekname], [day]/[month]"
But obviously it didn't work. The text in save files keep changing determined on current value of those variables.

In summary, what I want is:
Let's say in-game time is Wednesday, 13 April. When player saves the game, the time displayed is "Wednesday, 13 April."
Even if the day in-game changes to Thursday, 14 April, the time in file slot is still Wednesday, 13 April as long as player didn't overwrite the save file.

Is something like this possible?
Thank you! :)
Last edited by sapiboonggames on Thu Feb 16, 2017 3:31 am, edited 1 time in total.
Visit my website: http://www.sapiboong.com

philat
Eileen-Class Veteran
Posts: 1912
Joined: Wed Dec 04, 2013 12:33 pm
Contact:

Re: Display in-game time instead of actual time in save scre

#2 Post by philat »

Not exactly what you're looking for, but probably close enough to give you an idea of how to go about it. viewtopic.php?f=8&t=30905

User avatar
sapiboonggames
Veteran
Posts: 299
Joined: Thu Jan 05, 2012 8:53 am
Completed: I Love You, Brother [BxB]
Contact:

Re: Display in-game time instead of actual time in save scre

#3 Post by sapiboonggames »

philat wrote:Not exactly what you're looking for, but probably close enough to give you an idea of how to go about it. viewtopic.php?f=8&t=30905
Thanks! I'll take a look :D
Visit my website: http://www.sapiboong.com

User avatar
sapiboonggames
Veteran
Posts: 299
Joined: Thu Jan 05, 2012 8:53 am
Completed: I Love You, Brother [BxB]
Contact:

Re: Display in-game time instead of actual time in save scre

#4 Post by sapiboonggames »

philat wrote:Not exactly what you're looking for, but probably close enough to give you an idea of how to go about it. viewtopic.php?f=8&t=30905
EDIT: Nevermind. I got it to work after trial and error, the code in the thread you mentioned works!
Visit my website: http://www.sapiboong.com

Post Reply

Who is online

Users browsing this forum: Ocelot, Toma