Page 1 of 1

christmas calendar Tips

Posted: Fri Oct 07, 2016 3:17 pm
by Live
Hey all game makers.. hoping for some tips:)

So the idea is to make a christmas calendar, where i each day come up with some new storie or something.. one thing I'm wondering about is that i want to have it so you only play one chapter every day... like 1 desember, 2 desember and so on.

Any tips on how to make that work?

Re: christmas calendar Tips

Posted: Sat Oct 08, 2016 12:07 am
by PyTom
You can generally use the datetime to get the current date, and act on it.

Code: Select all

init python:
    import datetime

python:
    today = datetime.date.today()

    if today < datetime.date(2016, 12, 25):
        "It's before christmas."
    else:
        "Merry christmas."

Re: christmas calendar Tips

Posted: Sat Oct 08, 2016 4:22 am
by Live
OK thx:) ill get working and try it out:D

Re: christmas calendar Tips

Posted: Fri Jun 08, 2018 4:20 am
by kalesco
Thank you for this thread.

I used it for adding the current date to my build name. :) (in options.rpy)

Code: Select all

## A short name for the game used for executables and directories in the built
## distribution. This must be ASCII-only, and must not contain spaces, colons,
## or semicolons.

#define build.name = "KuKuRisk"
init python:
    import datetime
define build.name = datetime.datetime.today().strftime('%Y-%m-%d')+"-KuKuRisk"