Expand description
Typed UTD (.utd) door blueprint and conversion helpers.
UTD (.utd) typed generic wrapper.
Doors are interactive pathways. Beyond acting as barriers and transitions between areas, they carry lock mechanics, trap configuration, script hooks and visual state (open, destroyed, jammed).
§Scope of this slice
- Typed access for all door identity/state/script/link fields.
- K1-aligned read defaults for door booleans observed in
LoadDoor. - Superset-correct: all fields are modeled, no passthrough needed.
§Field Layout (simplified)
UTD root struct
+-- TemplateResRef / Tag / LocName / Description
+-- GenericType / Appearance / OpenState
+-- Lock + trap + durability fields
+-- Script hooks (OnClosed/OnDamaged/...)
+-- Transition fields (LinkedTo/LinkedToFlags/LinkedToModule/TransitionDestin)§The lock and saving-throw fields are declared here, not shared
A door and a placeable carry the same seven lock labels and the same three
saving throws, and a shared block cannot carry a schema for them: every one
of those ten labels is recorded constructed on the door against stamped
on the placeable, so a single entry would state the wrong mechanism for one
of them. Across the whole audit that pattern is not confined to the
mechanism. A fifth of the paths two views share resolve to a different
value depending on the owning type.
A shared reader is still right, since the value is the same; the record of
how the engine reaches it is not shareable.
Structs§
Enums§
- UtdError
- Errors produced while reading or writing typed UTD data.
Functions§
- author_
utd - Authors the UTD file the typed view describes, into a writer.
- author_
utd_ to_ vec - Authors the UTD file the typed view describes, as bytes.
- read_
utd - Reads typed UTD data from a reader at the current stream position.
- read_
utd_ from_ bytes - Reads typed UTD data directly from bytes.