Module dlg

Module dlg 

Source
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 Gff data.
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.