TimeHost: Node and engine→game bridge. Drives every clock in clocks each frame via drive_mode, and composes the save/load facade (ClockGroupSerializer) plus one DayNightCycleService per clock in _ready. No clock ownership, no primary-clock concept. Drive modes (see DriveMode and addons/calendar_time/guides/timescale-and-drive-modes.md):
PROCESS(default):_process(delta)advances every clock from engine delta ×time_scale.delta_multiplierwith fractional-µs carry.PHYSICS_PROCESS: the same on the physics tick, for game-time calibration locked to the physics frame rate (e.g. 60 Hz).MANUAL: no auto-advance; the game callsdrive_microseconds()/drive_seconds()itself (tests, replays, fixed-step simulations).
Source: addons/calendar_time/game_time/state/time_host.gd
Syntax
class TimeHost extends NodeMembers
| Name | Kind | Summary |
|---|---|---|
clocks | Property | Drive mode for automatic clock advancement; `PROCESS` is the default and matches prior behaviour. `MANUAL` is the documented manual path (see `addons/calendar_time/guides/timescale-and-drive-modes.md`). The clocks this host advances. Drag `GameClock` `.tres` resources here; this list drives advancement, save/load, and day/night services. Replacing it at runtime rebuilds the clock group. Ships preassigned to the bundled Four Seasons clock in `default_time_host.tscn`. |
time_scale | Property | Game time per real time: `delta_multiplier` multiplies each engine frame's delta in PROCESS and PHYSICS_PROCESS modes (1000.0 = 1000 game seconds per real second). This is the host-wide rate; it does not change the calendar's unit schema. Distinct from `GameCalendar.time_scale`. |
drive_mode | Property | How the clocks advance. PROCESS (default) advances from engine delta each frame; PHYSICS_PROCESS on the physics tick; MANUAL never auto-advances and expects `drive_microseconds()` / `drive_seconds()` calls. |
auto_increment_time | Property | Backward-compatible boolean alias for `drive_mode`: true ≡ PROCESS, false ≡ MANUAL. Kept for pre-rename scenes and tests. |
group_serializer | Property | Save/load facade composing time + age per clock, namespaced under the group's `save_key`. See `ClockGroupSerializer`. |
day_night_cycle_services | Property | One DayNightCycleService per clock, composed by the host in `_ready`. Each reads `times_of_day` from its own clock's calendar. |
get_clock_group | Method | |
get_group_serializer | Method | |
load_state | Method | |
drive_microseconds | Method | |
drive_seconds | Method |