Ingame Date & Time - Custom calendar/timers plugin

Available now on the marketplace.

Ingame Date & Time is a plugin designed to make it easy to work with a customized in-game time system in all your Blueprint or C++ code.

You can use the standard Gregorian calendar, or define your own from scratch. Specify whatever rate you want your game clock to flow at with respect to real time. You can then create timer events in blueprint triggered at times/delays specified in your internal game time system, as opposed to having to constantly work in terms of raw seconds.

The system is suitable for any type of game with a persistent game world. It’s also ideal as a way of driving graphical time-of-day systems, or other time dependent effects such as dynamic weather or seasonal appearance changes.

For more details and links to a packaged demo and documentation, see here.

The plugin can be used in Blueprint-only projects, and comes with example blueprints showing basic usage as well as how to connect it to a simple time-of-day system. There are also examples showing how you can create your own UMG widgets to display dates and times in whatever format you like.

Plugin has been released, and there is now a packaged demo available, along with full blueprint node reference. Link added to above post.

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.