Module uti

Module uti 

Source
Expand description

Typed UTI (.uti) model and conversion helpers. UTI (.uti) typed generic wrapper.

UTI resources are GFF-backed item templates.

§Scope

  • Typed access for all engine-read and toolset item fields.
  • Typed handling for PropertiesList item-property entries.
  • Lossless typed roundtrip - all fields are written unconditionally.

§Field Layout (simplified)

UTI root struct
+-- TemplateResRef / Tag / Comment
+-- BaseItem / Charges / Cost / StackSize / AddCost
+-- MaxCharges / Upgrades
+-- LocalizedName / Description / DescIdentified
+-- ModelVariation / BodyVariation / TextureVar
+-- Plot / Stolen / Identified / UpgradeLevel
+-- Dropable / Pickpocketable / NonEquippable / NewItem / DELETING
`-- PropertiesList                 (List<Struct>)
    +-- PropertyName / Subtype
    +-- CostTable / CostValue
    +-- Param1 / Param1Value
    +-- ChanceAppear
    `-- UpgradeType (optional)

Structs§

Uti
Typed UTI model built from/to Gff data.
UtiProperty
One UTI property entry from the PropertiesList field.

Enums§

UtiError
Errors produced while reading or writing typed UTI data.

Functions§

is_armor_base_item
Returns true when base_item belongs to the canonical armor base-item set.
read_uti
Reads typed UTI data from a reader at the current stream position.
read_uti_from_bytes
Reads typed UTI data directly from bytes.
write_uti
Writes typed UTI data to an output writer.
write_uti_to_vec
Serializes typed UTI data into a byte vector.