Expand description
Typed UTP (.utp) placeable blueprint and conversion helpers.
UTP (.utp) typed generic wrapper.
Placeables are interactive scenery and containers, from footlockers to command consoles to destructible barricades. They mix static physical properties such as structural HP and lock difficulty with script bindings.
§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§The lock and saving-throw fields are declared here, not shared
A placeable and a door carry the same seven lock labels and the same three
saving throws. Every one of those ten is recorded stamped here against
constructed on the door, so one shared entry would state the wrong
mechanism for one of them. A shared reader is still right, since the value
is the same; the record of how the engine reaches it is not shareable.
Structs§
- Utp
- Typed UTP model built from/to
Gffdata. - UtpInventory
Item - One UTP inventory item entry from the
ItemListfield.
Enums§
- UtpError
- Errors produced while reading or writing typed UTP data.
Functions§
- author_
utp - Authors the UTP file the typed view describes, into a writer.
- author_
utp_ to_ vec - Authors the UTP file the typed view describes, as bytes.
- 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.