Ingame Date & Time - Custom calendar/timers plugin

Hey there.

So yes, you can define a completely custom calendar with whatever named periods you like, and specify how many of each period make up another period. The only restriction with custom calendars (there is a special built in case for the Gregorian calendar) is that the subperiods need to be fixed. So you cannot for example, if using a custom calendar, have months with varying numbers of days - it would have to fixed to, say, 30, for all months. The reason is that it would be impractical to calculate time differences if this were allowed. What this also implies is that you could only include the era in the calendar if the number of years per era was predetermined. If you need to advance the era at arbitrary times, then you’d have to manage the era number yourself independently of the time system. This shouldn’t really be a problem, since by definition if eras are not fixed in advance, then you shouldn’t have a need to set up timers outside of the current era anyway.

As for day/night or seasonal effects, this isn’t actually a part of the plugin, but the functionality is there to drive such systems very easily. You essentially can query for how far through a given time period you currently are. Say, ask the clock '“Proportion through ‘Year’”, and it will return a value in the range [0, 1], from which you can smoothly drive seasonal changes, maybe via a curve asset. Likewise for time of day, you just map the [0, 1] value proportionally to [0, 24] or however many hours you’ve defined to be in a day.
Alternatively, if you don’t need continuous, smooth changes, you can just register timers to trigger at a certain time of day/year/whatever, and update your effects then.