Chris' Tutorials
Docs/Calendar Time

Class

ClockGroupSerializer

Generated GDScript class reference for CalendarTime.ClockGroupSerializer.

StatusCurrent
Versionv2.0
UpdatedGenerated from GDScript addon source
Source note:This page rendered plugin-owned docs or generated metadata inside unified Astro docs shell.

ClockGroupSerializer — game-level "all my clocks" save/load facade. Owns a ClockGroup and produces / consumes one save dictionary that contains time + age combined per clock (single dict per clock, namespaced under the group's save_key). Drop-in replacement for host.get_calendar_time_serializer().to_dict() for multi-clock games (and for single-clock games that want the namespaced format). Per-clock dict shape (the legacy on-disk key is preserved at the top level for 1.x save migration — see TimeSnapshot): { "clock_id": , "time_state": {serialization_id, ...}, "age_states": {...}, "age_service_state": {...} } Top-level shape (id-keyed): { group.save_key: { : , ... } } Identity is clock_id, not array index (issue #42). Saves written under the index-keyed form (rare, only from very early unreleased 2.0-pre dev builds) are tolerated via a fallback that materialises positional keys ("0", "1", …) for any dict lacking clock_id. Reordering clocks between save and load is safe — saves restore each clock's state into the clock matching the id, regardless of position in host.clocks. New saves always include clock_id. See docs/notes/multi-clock-save-identity.md for the rationale.

Source: addons/calendar_time/game_time/state/clock_group_serializer.gd

Syntax

class ClockGroupSerializer extends RefCounted

Members

NameKindSummary
TIME_STATEField
AGE_STATESField
AGE_SERVICE_STATEField
WORLD_AGE_SYSTEM_STATEField
CLOCK_IDField
clock_groupPropertyThe group this serializer aggregates. Must be set before calling to_dict() / from_dict() — fail fast otherwise.
to_dictMethod
nestedProperty
duplicatesProperty
first_index_by_idProperty
clockProperty
idProperty
id_strProperty
resultProperty
from_dictMethod
nestedProperty
nested_dictProperty
clocks_by_idProperty
first_index_by_idProperty
cProperty
c_id_strProperty
positional_indexProperty
entryProperty
resolved_clockProperty
saved_idProperty
candidateProperty
dictProperty
age_serializerProperty
age_serializerProperty
entryProperty

Source

addons/calendar_time/game_time/state/clock_group_serializer.gd

Plugin docs root:gdscript/plugins/calendar_time_dev/docs