pub struct GitDoor {
pub template_resref: ResRef,
pub bearing: f32,
pub x: f32,
pub y: f32,
pub z: f32,
pub linked_to_module: ResRef,
pub linked_to: String,
pub linked_to_flags: u8,
pub transition_destination: GffLocalizedString,
pub appearance: u32,
pub object_id: ObjectId,
}Expand description
A door instance placed in the area (struct type 8).
Doors use Bearing for orientation and X/Y/Z for position (not
XPosition/YPosition/ZPosition).
Unlike GitWaypoint, a static door placement genuinely does resolve its
TemplateResRef against a .utd blueprint, and it carries the same
transition group a trigger does. This type modelled neither for a while,
which meant round-tripping any vanilla module returned doors with no
blueprint to instantiate from and no tag to reference. See
docs/src/formats/gff/utd.md’s “Save versus Template Load Paths”.
§Tag is dead here, and deliberately unmodelled
Every door placement in a real install carries a Tag, with a real value,
and the engine does not read it. A templated door takes its tag from the
.utd blueprint, and there is no overlay: the placement’s copy has no way
to win. Same label and same concept as the blueprint’s live one, which is
exactly why it needs saying. A field being read somewhere is not evidence
about this copy.
That makes it a modder trap rather than a harmless leftover. Set it on a placement expecting that door to answer to the new tag and nothing happens, silently. It belongs in a Phase 1 rule on the raw tree, which is where a dead field can be reported instead of quietly dropped.
A consequence worth its own rule: two placements sharing a blueprint get the same tag, so a tag-based script reference to either breaks. Vanilla gives every door its own blueprint and never trips it. Filed as #46.
Fields§
§template_resref: ResRefTemplate resref (TemplateResRef), resolved against a .utd.
bearing: f32Facing angle in radians (Bearing).
x: f32X position (X).
y: f32Y position (Y).
z: f32Z position (Z).
linked_to_module: ResRefDestination module for a transition door (LinkedToModule).
linked_to: StringDestination object tag within that module (LinkedTo).
linked_to_flags: u8What Self::linked_to names (LinkedToFlags).
transition_destination: GffLocalizedStringPlayer-facing name of the destination (TransitionDestin).
appearance: u32Visual model override (Appearance).
Read on a sparse placement as well as a saved one: LoadDoor and
LoadPlaceable are the same field readers whichever path calls them,
so a template-referencing placement carrying its own Appearance has
that value read as an override on top of the blueprint’s. Read as a
DWORD and truncated to a byte, which for a door keys doortypes.2da’s
model columns. Defaults to 0 when absent.
object_id: ObjectIdRuntime object ID (ObjectId). Save-game only.