Easier Calendar???
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.
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.
Easier Calendar???
I'm trying, without success, to write a calender that only counts the days and months. I was using the code from the "slightly-complicated Digital Calendar" that Ren'Py has out, but I don't want the minutes. I hoping I could just use the day count that comes with the DSE. Has anyone seem something out there like this?
- Viobli
- Regular
- Posts: 66
- Joined: Fri Jun 07, 2013 2:25 am
- Projects: *Truly, Friends *Lady Eun-mi
- Contact:
Re: Easier Calendar???
I did a bit of searching and here are some codes used by other people:
http://lemmasoft.renai.us/forums/viewto ... t=calendar //this includes season.
http://lemmasoft.renai.us/forums/viewto ... t=calendar //this includes location.
http://lemmasoft.renai.us/forums/viewto ... t=calendar //this seems to only include the day&month
http://lemmasoft.renai.us/forums/viewto ... t=calendar //this includes season.
http://lemmasoft.renai.us/forums/viewto ... t=calendar //this includes location.
http://lemmasoft.renai.us/forums/viewto ... t=calendar //this seems to only include the day&month
Re: Easier Calendar???
What's wrong with simply removing the clock from that calendar?dc19dc wrote:I'm trying, without success, to write a calender that only counts the days and months. I was using the code from the "slightly-complicated Digital Calendar" that Ren'Py has out, but I don't want the minutes. I hoping I could just use the day count that comes with the DSE. Has anyone seem something out there like this?
Re: Easier Calendar???
Thank you Viobli, I like the 3 option best but now my day is always day 2 with no way to get past it. Elmiwisa I like the "slightly-complicated Digital Calendar" but when I tried removing the minutes it just broke the code.
Here is what I'm using now, and i'm stuck. It always shows day 2.
Here is what I'm using now, and i'm stuck. It always shows day 2.
Code: Select all
jump day
label day:
$ month = 1
$ day = 1
$ day_max = 31
if month == 2:
$ day_max = 28
elif month == 4 or month == 6 or month == 9 or month == 11:
$ day_max = 30
else:
$ day_max = 31
if day == day_max:
$ day = 1
if month == 12:
$ month = 1
else:
$ month += 1
else:
$ day += 1
"It's day %(day)d, month %(month)d."
Re: Easier Calendar???
No no no, removing the Clock, not the minutes.
Look at the end:
To advance to the next day, add 60*24=1440 to minutes:
Look at the end:
Code: Select all
screen say:
if(clock):
$ Calendar()
$ Clocks() #<---remove this line
Code: Select all
$minutes+=1440
Re: Easier Calendar???
Elmiwisa, if I remove that will it allow me to work within 5 dp_period (6 if you count the night period)? I just want the day to advance after the 6 periods to end. I didn't see the need for minutes or the clock. Sorry for being confusing:(Elmiwisa wrote:No no no, removing the Clock, not the minutes.
Look at the end:To advance to the next day, add 60*24=1440 to minutes:Code: Select all
screen say: if(clock): $ Calendar() $ Clocks() #<---remove this line
Code: Select all
$minutes+=1440
Re: Easier Calendar???
The purpose of that Clock() line is to show the hours and minutes. Removing it make them make the hours and minutes no longer get shown.dc19dc wrote:Elmiwisa, if I remove that will it allow me to work within 5 dp_period (6 if you count the night period)? I just want the day to advance after the 6 periods to end. I didn't see the need for minutes or the clock. Sorry for being confusing:(Elmiwisa wrote:No no no, removing the Clock, not the minutes.
Look at the end:To advance to the next day, add 60*24=1440 to minutes:Code: Select all
screen say: if(clock): $ Calendar() $ Clocks() #<---remove this line
Code: Select all
$minutes+=1440
There are a lot of way to fix thing really. I am just telling you the way that involve the least amount of modification to the original code.
Remember that 1440/6=240. So to advance by 1 period, just do
Code: Select all
minutes+=240
Re: Easier Calendar???
Hi Elmiwisa, thank you for the option!
Who is online
Users browsing this forum: Kia, Sirifys-Al