Expand description
Typed DLG (.dlg) model and conversion helpers.
DLG (.dlg) typed generic wrapper.
DLG resources are GFF-backed dialogue trees. The structure is a directed graph of entry nodes (NPC lines) and reply nodes (PC choices), connected by indexed links.
§Scope
- Typed access for conversation config, stunt list, and all node fields.
- Typed entry/reply node arrays with per-node text, scripts, camera, and animation data.
- Typed links (condition script + target index + display-inactive flag).
- Full serialization from scratch - all modeled fields are written explicitly without relying on source struct passthrough.
§Field Layout (simplified)
DLG root struct
+-- CameraModel / DelayEntry / DelayReply / Skippable / ConversationType
+-- EndConversation / EndConverAbort / ComputerType / AmbientTrack
+-- UnequipItems / UnequipHItem / AnimatedCut / OldHitCheck
+-- StartingList[] (links -> EntryList by index)
+-- EntryList[] (NPC lines, each with RepliesList[])
+-- ReplyList[] (PC choices, each with EntriesList[])
`-- StuntList[] (cutscene actor models)Structs§
- Dlg
- Typed DLG model built from/to
Gffdata. - DlgAnimation
- A per-node animation entry.
- DlgLink
- A link between dialogue nodes (condition + target index).
- DlgNode
- A dialogue node (entry = NPC line, reply = PC choice).
- DlgStunt
- A cutscene stunt actor entry.
Enums§
- DlgError
- Errors produced while reading or writing typed DLG data.
Functions§
- read_
dlg - Reads typed DLG data from a reader at the current stream position.
- read_
dlg_ from_ bytes - Reads typed DLG data directly from bytes.
- write_
dlg - Writes typed DLG data to an output writer.
- write_
dlg_ to_ vec - Serializes typed DLG data into a byte vector.