Module utp

Module utp 

Source
Expand description

Typed UTP (.utp) model and conversion helpers. UTP (.utp) typed generic wrapper.

UTP resources are GFF-backed placeable templates.

§Field Layout (simplified)

UTP root struct
+-- TemplateResRef / Tag / LocName / Description
+-- Appearance / Faction / Plot / Invulnerable / Min1HP
+-- Lockable / Locked / KeyRequired / OpenLockDC / CloseLockDC / KeyName
+-- Useable / Static / PartyInteract
+-- HP / CurrentHP / Hardness / Fort / Ref / Will
+-- Script hooks (OnClosed/OnDamaged/...)
+-- ItemList                         (List<Struct>)
|   +-- InventoryRes / Dropable
|   `-- Repos_PosX / Repos_PosY

Structs§

Utp
Typed UTP model built from/to Gff data.
UtpInventoryItem
One UTP inventory item entry from the ItemList field.

Enums§

UtpError
Errors produced while reading or writing typed UTP data.

Functions§

read_utp
Reads typed UTP data from a reader at the current stream position.
read_utp_from_bytes
Reads typed UTP data directly from bytes.
write_utp
Writes typed UTP data to an output writer.
write_utp_to_vec
Serializes typed UTP data into a byte vector.