Expand description
Table-backed decoded views over typed generic models.
Typed generic structs (Uti, Utc, …) expose engine integers
verbatim because the on-disk format does. This module layers a
decoded view on top: callers hand in a [TwoDaSource] and ask
for view = thing.resolve(&mut tables), then query the view with
semantics-bearing methods (e.g. view.is_weapon(),
view.damage_bonuses()). The resolved view is built by composing a
cheap projection with a per-scope resolution step; see
UtiProjection / UtiResolved and Uti::project for the
multi-scope path.
§Mod-friendliness
Decoding reads against whatever tables the caller hands in, which
against a live install means the user’s actually-loaded 2DAs.
Properties whose PropertyName does not resolve in
itempropdef.2da round-trip into DecodedProperty::Unknown
with property_label = None; properties whose row exists but
whose label is not yet typed surface as Unknown carrying the
resolved label so consumers can still display something useful.
Subtype u16 ids stay raw on every variant so mods that extend
an existing property’s iprp_*.2da subtype range do not get
downgraded to Unknown.
Structs§
- UtiProjection
- File-native projection of a
Uti. - UtiResolved
- Snapshot view over a
Uti, resolved against a per-scope context.
Enums§
- Decoded
Property - One decoded item-property entry.
- Property
Kind Filter - Categorical filter for
UtiResolved::has_property_kind.