Commands for keeping track of in-game date
Closed this issue · 2 comments
While we're thinking about times in #45, it might be nice to also think about similar commands to keep track of the in-game date.
This is a little trickier because not all campaign settings use the same calendars. We could start with supporting Forgotten Realms and the Gregorian calendar. Perhaps we'd think about having some kind of plaintext DSL in toml for defining a calendar so that a DM could just pick one when starting up the shell and wouldn't otherwise need to know anything about programming. A fun wrinkle there is that the FR calendar has special holidays in between months every so often, and sometimes a bonus one in certain years.
It would be neat if incrementing or decrementing time would also affect the date. Explicitly setting the time should not affect the date.
Rough sketch:
$ python dndme/shell.py --calendar=calendars/forgotten_realms.toml
> date 15 Tarsakh 1489
The date is now 15 Tarsakh, 1489.
> date 16 Tarsakh
The date is now 16 Tarsakh, 1489.
> date +1
The date is now 17 Tarsakh, 1489.
> date +2
The date is now 19 Tarsakh, 1489.
> date 30 Flamerule
The date is now 30 Flamerule, 1489.
> date +1
The date is now Midsummer, 1489.
> date +1
The date is now 1 Eleasis, 1489.
> date -1
The date is now Midsummer, 1489.
> time 23:59
The time is now 23:59.
> time +0:01
The time is now 00:00.
The date is now 1 Eleasis, 1489.
> time -0:01
The time is now 23:59.
The date is now Midsummer, 1489.
Potentially it would be nice to be able to log the current date; this could be either a thing that the date command does (talking into the log command) or that log does (formatting a log message and inserting the game date). This would make it easier to set up in a subsequent session (since we'd have it logged to refer to) as well as recording when events took place in-game.
> log {date}
> log
Session started ...
* The date is Midsummer, 1489
> date +1
> date log
> log
Session started ...
* The date is Midsummer, 1489
* The date is 1 Eleasis, 1489
I've started sketching out a data-driven approach to defining custom calendars. I've modeled the Forgotten Realms and Gregorian calendars in TOML and plan to write some code to handle knowing and manipulating the date based on the loaded data.
Useful info: https://en.wikipedia.org/wiki/Calendars_in_the_Forgotten_Realms#Calendar_of_Harptos
FWIW I think it's reasonable to punt and only support Dale Reckoning for the FR setting for now since that's the most common.
I didn't get to the logging aspect of this; I can live with it for now (copy and paste still work) but it could be a nice convenience feature if I can decide where it will live.