The Wayback Machine - https://web.archive.org/web/20201016082532/http://github.com/evennia/evennia/issues/1753
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gametime w/ Custom Calendar tutorial questions #1753

Open
thenomain opened this issue Dec 6, 2018 · 2 comments
Open

Gametime w/ Custom Calendar tutorial questions #1753

thenomain opened this issue Dec 6, 2018 · 2 comments

Comments

@thenomain
Copy link

@thenomain thenomain commented Dec 6, 2018

Brief summary of issue / Description of requested feature:

https://github.com/evennia/evennia/wiki/Gametime-Tutorial#a-game-time-with-a-custom-calendar

"In our case the game time starts at year 0, month 0, day 0, and at midnight."

This raises one big question to me: Is there a 'Month 0' and 'Day 0' that will come up every year/month? If so, why?

If not, I think the tutorial would be better if the game starts on 'month 1, day 1' (Even though the real world calendar has no 'year 0', that also looks out of place.) Even if the reason for this is normal code logic, the players will probably not have exposure to this logic.

Thanks.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@chainsol
Copy link
Member

@chainsol chainsol commented Dec 6, 2018

Now I could be mistaken...but I think that the month / day / year 0 thing only applies in that tutorial due to the epoch of 0.

Edit: Nope, I'm totally off-the-mark. Tests show that we're zero-indexing essentially, haha.

@Griatch
Copy link
Member

@Griatch Griatch commented Dec 7, 2018

The custom_gametime module is adopted and broken out of the original gametime code which had this functionality in-built for a long time (making it a contrib made it more modular). It works with 0 simply because it made for a homogenous API for all different units in the realtime_to_gametime function:

realtime_to_gametime(secs=0, mins=0, hrs=0, days=0, weeks=0,
                     months=0, yrs=0, format=False):
    ...

These days however, the default gametime module is actually using Python's datetime` module that that does not accept month=0 and day=0, making the custom behavior inconsistent with the default, as mentioned.

So I think it makes sense to change the custom time module to be consistent with the default behavior and start counting month and day from 1 rather than 0 (raising an error if giving 0).

@Griatch Griatch added this to To do in Evennia 0.9 via automation Mar 31, 2019
@Griatch Griatch moved this from To do to Postponed until after 0.9 release in Evennia 0.9 May 20, 2019
@Griatch Griatch added this to To do in Evennia 1.0 Sep 9, 2019
@Griatch Griatch removed the Hacktoberfest label Oct 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Evennia 1.0
  
To do
Evennia 0.9
  
Postponed until after 0.9 release
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.