pub enum DecodedProperty {
Show 41 variants
AbilityBonus {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
},
SaveBonus {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
},
SaveBonusSpecific {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
},
SavePenalty {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
},
SavePenaltySpecific {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
},
DamageBonus {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
},
DamageImmunity {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
},
DamageResistance {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
},
DamageRacialGroup {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
},
DamageAlignmentGroup {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
},
EnhancementRacialGroup {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
},
EnhancementAlignmentGroup {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
},
AttackBonusAlignmentGroup {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
},
TrueSeeing {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
},
Light {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
param1: u8,
param1_value: u8,
},
AcBonus {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
},
EnhancementBonus {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
},
AttackBonus {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
},
Keen {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
},
MassiveCriticals {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
},
BlasterBoltDeflectIncrease {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
},
MonsterDamage {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
},
BonusFeats {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
},
Immunity {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
},
Skill {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
},
AttackPenalty {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
},
DamagePenalty {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
},
MagicResistBonus {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
},
DamageNone {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
},
Regeneration {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
},
RegenerationForcePoints {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
},
Disguise {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
},
UseLimitationFeat {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
},
UseLimitationRacial {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
},
UseLimitationAlignmentGroup {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
},
CastSpell {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
useable: bool,
uses_per_day: Option<u8>,
},
Trap {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
useable: bool,
uses_per_day: Option<u8>,
},
ThievesTools {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
useable: bool,
uses_per_day: Option<u8>,
},
ComputerSpike {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
useable: bool,
uses_per_day: Option<u8>,
},
OnHit {
property_id: u16,
subtype_id: u16,
cost_table: u8,
cost_value: u16,
param1: u8,
param1_value: u8,
},
Unknown {
property_id: u16,
property_label: Option<String>,
subtype: u16,
cost_table: u8,
cost_value: u16,
param1: u8,
param1_value: u8,
},
}Expand description
One decoded item-property entry.
The shape grows variants as more property kinds get typed; until
a variant exists for a given engine kind, callers receive
DecodedProperty::Unknown carrying every raw field plus the
human-readable property label resolved from itempropdef.2da
when reachable.
§Subtype dispatch
The per-property subtype id is preserved as a raw u16 on every
variant. To resolve it to a human-readable label, call
DecodedProperty::subtype_label, which walks the dispatch
chain documented under “Property Table Dispatch” in the UTI
engine audit (itempropdef.SubTypeResRef -> per-property
iprp_*.2da -> label column at the subtype row).
Variants§
AbilityBonus
Ability-score bonus property (vanilla itempropdef.2da label
Ability, row 0). The subtype identifies which ability score
the bonus targets; the cost fields carry the magnitude
reference into the cost-table dispatch chain.
Fields
property_id: u16Raw PropertyName (the row in itempropdef.2da whose
label matched Ability at decode time).
SaveBonus
Universal saving-throw bonus property (vanilla
itempropdef.2da label ImprovedSavingThrows, row 26). The
subtype identifies which save element (Universal, Acid, Cold,
…) the bonus applies to; the cost fields carry the magnitude
reference into the cost-table dispatch chain.
This variant covers ImprovedSavingThrows only. The narrower
ImprovedSavingThrowsSpecific (Fortitude/Reflex/Will) and the
matching ReducedSavingThrows / ReducedSpecificSavingThrow
kinds remain in Unknown until they get their own typed
variants.
Fields
SaveBonusSpecific
Specific saving-throw bonus property (vanilla
itempropdef.2da label ImprovedSavingThrowsSpecific, row
27). Narrower sibling of Self::SaveBonus: the subtype
identifies which specific saving throw (Fortitude, Reflex,
Will) the bonus applies to, indexed into
iprp_savingthrow.2da rather than the element-based
iprp_saveelement.2da.
Fields
SavePenalty
Universal saving-throw penalty property (vanilla
itempropdef.2da label ReducedSavingThrows, row 33).
Negative mirror of Self::SaveBonus: same subtype 2DA
(iprp_saveelement) but the cost fields carry a penalty
magnitude rather than a bonus.
Fields
SavePenaltySpecific
Specific saving-throw penalty property (vanilla
itempropdef.2da label ReducedSpecificSavingThrow, row 34).
Negative mirror of Self::SaveBonusSpecific: same subtype
2DA (iprp_savingthrow) but the cost fields carry a penalty
magnitude rather than a bonus.
The vanilla label uses singular Throw (where the bonus
counterpart uses plural Throws); the dispatch matches the
exact vanilla spelling.
Fields
DamageBonus
Damage bonus property (vanilla itempropdef.2da label
Damage, row 11). The subtype identifies which damage type
(Bludgeoning, Slashing, Acid, Cold, …) the bonus applies to;
the cost fields carry the magnitude reference into the
cost-table dispatch chain.
Distinct from Damage_Vulnerability (row 18) and the
alignment/race-conditional DamageAlignmentGroup /
DamageRacialGroup kinds, which remain in Unknown.
Fields
DamageImmunity
Damage immunity property (vanilla itempropdef.2da label
DamageImmunity, row 14). The subtype identifies which damage
type the immunity applies to; the cost fields carry the
percentage reference into the cost-table dispatch chain.
Fields
DamageResistance
Damage resistance property (vanilla itempropdef.2da label
DamageResist, row 17). The subtype identifies which damage
type the resistance applies to; the cost fields carry the
soak-amount reference into the cost-table dispatch chain.
Distinct from DamageReduced (row 16, backed by
iprp_protection.2da rather than iprp_damagetype.2da),
which remains in Unknown.
Fields
DamageRacialGroup
Conditional damage bonus against a racial group (vanilla
itempropdef.2da label DamageRacialGroup, row 13). The
subtype identifies which row of racialtypes.2da the bonus
applies against; the cost fields carry the magnitude.
Fields
DamageAlignmentGroup
Conditional damage bonus against an alignment group (vanilla
itempropdef.2da label DamageAlignmentGroup, row 12). The
subtype identifies which row of iprp_aligngrp.2da the bonus
applies against; the cost fields carry the magnitude.
Fields
EnhancementRacialGroup
Conditional enhancement bonus against a racial group (vanilla
itempropdef.2da label EnhancementRacialGroup, row 7). The
subtype identifies which row of racialtypes.2da the bonus
applies against; the cost fields carry the magnitude.
Sibling of DamageRacialGroup and shares the racialtypes.2da
dispatch chain. The alignment-group equivalent is
Self::EnhancementAlignmentGroup.
Fields
EnhancementAlignmentGroup
Conditional enhancement bonus against an alignment group
(vanilla itempropdef.2da label EnhancementAlignmentGroup,
row 6). The subtype identifies which row of
iprp_aligngrp.2da the bonus applies against; the cost
fields carry the magnitude. Sibling of
Self::EnhancementRacialGroup and Self::DamageAlignmentGroup.
Fields
AttackBonusAlignmentGroup
Conditional attack-bonus against an alignment group (vanilla
itempropdef.2da label AttackBonusAlignmentGroup, row 39).
The subtype identifies which row of iprp_aligngrp.2da the
bonus applies against; the cost fields carry the magnitude.
Fields
TrueSeeing
True-seeing property (vanilla itempropdef.2da label
True_Seeing, row 47). Grants the wearer the ability to see
through invisibility / stealth. No subtype dimension; the
cost fields carry the engine-side magnitude reference.
Fields
property_id: u16Raw PropertyName (the row in itempropdef.2da whose
label matched True_Seeing at decode time).
Light
Light-source property (vanilla itempropdef.2da label
Light, row 29). Makes the item emit light when equipped or
dropped. No subtype dimension, but row 29 in itempropdef.2da
declares a param1resref, so the engine consumes param1 /
param1_value to convey brightness or colour parameters.
Both param fields are preserved on the typed variant so
consumers do not have to fall back to the raw UtiProperty
to read them.
Fields
property_id: u16Raw PropertyName (the row in itempropdef.2da whose
label matched Light at decode time).
AcBonus
Armour-class bonus property (vanilla itempropdef.2da label
Armor, row 1). No subtype dimension; the cost fields carry
the bonus magnitude reference.
subtype_id is preserved for shape parity across variants
even though the engine ignores it for this kind. Vanilla
content writes 0 here.
Fields
property_id: u16Raw PropertyName (the row in itempropdef.2da whose
label matched Armor at decode time).
EnhancementBonus
Enhancement bonus property (vanilla itempropdef.2da label
Enhancement, row 5). No subtype dimension; the cost fields
carry the bonus magnitude reference.
Fields
property_id: u16Raw PropertyName (the row in itempropdef.2da whose
label matched Enhancement at decode time).
AttackBonus
Flat attack bonus property (vanilla itempropdef.2da label
AttackBonus, row 38). No subtype dimension; the cost fields
carry the bonus magnitude reference. Heavily used in vanilla
across weapons and accessories.
Fields
property_id: u16Raw PropertyName (the row in itempropdef.2da whose
label matched AttackBonus at decode time).
Keen
Keen property (vanilla itempropdef.2da label Keen, row
28). Widens the critical-hit threat range on the weapon. No
subtype dimension; the cost fields carry the magnitude.
Fields
property_id: u16Raw PropertyName (the row in itempropdef.2da whose
label matched Keen at decode time).
MassiveCriticals
Massive criticals property (vanilla itempropdef.2da label
Massive_Criticals, row 49). Adds extra damage on a critical
hit. No subtype dimension; the cost fields carry the damage
magnitude.
Fields
property_id: u16Raw PropertyName (the row in itempropdef.2da whose
label matched Massive_Criticals at decode time).
BlasterBoltDeflectIncrease
Blaster-bolt deflection bonus (vanilla itempropdef.2da label
Blaster_Bolt_Deflect_Increase, row 55). Improves the deflect
chance on a lightsaber. No subtype dimension; the cost fields
carry the magnitude.
Distinct from Blaster_Bolt_Defect_Decrease (row 56, vanilla
typo with Defect), which has near-zero corpus usage and
stays in Unknown.
Fields
property_id: u16Raw PropertyName (the row in itempropdef.2da whose
label matched Blaster_Bolt_Deflect_Increase at decode
time).
MonsterDamage
Monster damage property (vanilla itempropdef.2da label
Monster_damage, row 51). Engine uses this on monster claws,
bites, and similar natural weapons. No subtype dimension; the
cost fields carry the damage magnitude.
The vanilla label uses lowercase d in damage; the dispatch
match arm matches that spelling verbatim.
Fields
property_id: u16Raw PropertyName (the row in itempropdef.2da whose
label matched Monster_damage at decode time).
BonusFeats
Bonus-feat property (vanilla itempropdef.2da label
BonusFeats, row 9). The subtype identifies which row of
feat.2da the item grants while equipped. The cost fields
are usually unused for this property kind (the engine grants
the feat directly rather than scaling by magnitude).
Fields
Immunity
Immunity property (vanilla itempropdef.2da label Immunity,
row 24). The subtype identifies which row of iprp_immunity.2da
the item grants immunity to (e.g. Mind-Affecting, Paralysis).
The cost fields carry the immunity strength reference.
Fields
Skill
Skill bonus property (vanilla itempropdef.2da label Skill,
row 36). The subtype identifies which row of skills.2da
(Persuade, Demolitions, …) gets the bonus; the cost fields
carry the magnitude.
Distinct from DecreasedSkill (row 21, also backed by
skills.2da), which has zero corpus usage in vanilla items
and stays in Unknown.
Fields
AttackPenalty
Flat attack penalty property (vanilla itempropdef.2da label
AttackPenalty, row 8). Mirror of Self::AttackBonus: same
subtypeless shape, cost fields carry the magnitude of the
penalty rather than the bonus.
Fields
property_id: u16Raw PropertyName (the row in itempropdef.2da whose
label matched AttackPenalty at decode time).
DamagePenalty
Flat damage penalty property (vanilla itempropdef.2da label
DamagePenalty, row 15). Subtypeless mirror of
Self::DamageBonus: cost fields carry the penalty
magnitude.
Fields
property_id: u16Raw PropertyName (the row in itempropdef.2da whose
label matched DamagePenalty at decode time).
MagicResistBonus
Magic-resistance bonus (vanilla itempropdef.2da label
ImprovedMagicResist, row 25). No subtype dimension; the cost
fields carry the resist magnitude.
Fields
property_id: u16Raw PropertyName (the row in itempropdef.2da whose
label matched ImprovedMagicResist at decode time).
DamageNone
No-damage marker property (vanilla itempropdef.2da label
DamageNone, row 31). Flags a weapon as dealing no
damage on hit (used on unarmed strikes, training weapons,
and similar). No subtype dimension and no meaningful cost
payload; the fields are preserved for round-trip fidelity.
Fields
property_id: u16Raw PropertyName (the row in itempropdef.2da whose
label matched DamageNone at decode time).
Regeneration
Hit-point regeneration property (vanilla itempropdef.2da
label Regeneration, row 35). Restores HP per round while
equipped. No subtype dimension; the cost fields carry the
magnitude.
The force-points counterpart Self::RegenerationForcePoints
applies to FP rather than HP.
Fields
property_id: u16Raw PropertyName (the row in itempropdef.2da whose
label matched Regeneration at decode time).
RegenerationForcePoints
Force-point regeneration property (vanilla itempropdef.2da
label Regeneration_Force_Points, row 54). Restores FP per
round while equipped. No subtype dimension; the cost fields
carry the magnitude.
Fields
property_id: u16Raw PropertyName (the row in itempropdef.2da whose
label matched Regeneration_Force_Points at decode time).
Disguise
Disguise property (vanilla itempropdef.2da label Disguise,
row 59). The subtype identifies which row of appearance.2da
the wearer takes on while the item is equipped (used by mask
items that change the player’s apparent species).
Fields
UseLimitationFeat
Feat-restricted use property (vanilla itempropdef.2da label
Use_Limitation_Feat, row 57). The subtype identifies which
feat from feat.2da the wielder must possess to equip or
activate the item.
Passive property: the engine consults the subtype at equip
time and rejects use if the wielder lacks the feat. useable
and uses_per_day are not consumed for this kind.
Fields
UseLimitationRacial
Race-restricted use property (vanilla itempropdef.2da label
UseLimitationRacial, row 45). The subtype identifies which
row of racialtypes.2da the wielder must match.
Fields
UseLimitationAlignmentGroup
Alignment-restricted use property (vanilla itempropdef.2da
label UseLimitationAlignmentGroup, row 43). The subtype
identifies which row of iprp_aligngrp.2da the wielder’s
alignment must satisfy.
Fields
CastSpell
Cast-spell active property (vanilla itempropdef.2da label
CastSpell, row 10). The engine routes this property into
the per-character usable-ability table (one of four
hardcoded “active” rows alongside ThievesTools, Trap, and
Computer_Spike). The subtype identifies which spell from
spells.2da the item casts.
Active properties differ from passive ones in that the
useable and uses_per_day fields are load-bearing rather
than ignored. Both are decoded with the engine’s defaults
applied:
useabledefaults totruefor active properties when absent from the GFF;falseonly when explicitly set.uses_per_daydecodes the0xFFengine sentinel intoNone(meaning “unlimited / not constrained”); explicit non-sentinel values come through asSome(N).
Fields
property_id: u16Raw PropertyName (the row in itempropdef.2da whose
label matched CastSpell at decode time).
Trap
Trap active property (vanilla itempropdef.2da label
Trap, row 46). Routed into the active-property table
alongside CastSpell. The subtype identifies which trap
from traps.2da deploys.
useable and uses_per_day follow the same active-property
decoding rules documented on Self::CastSpell.
Fields
property_id: u16Raw PropertyName (the row in itempropdef.2da whose
label matched Trap at decode time).
useable: boolWhether the item can be activated. See Self::CastSpell.
uses_per_day: Option<u8>Daily-use cap. See Self::CastSpell.
ThievesTools
Thieves-tools active property (vanilla itempropdef.2da
label ThievesTools, row 37). Routed into the active-property
table alongside CastSpell. No subtype dimension; the cost
fields carry the magnitude (the security-skill bonus the
tool grants while equipped).
subtype_id is preserved for shape parity even though the
engine ignores it. useable and uses_per_day follow the
same active-property decoding rules documented on
Self::CastSpell.
Fields
property_id: u16Raw PropertyName (the row in itempropdef.2da whose
label matched ThievesTools at decode time).
subtype_id: u16Raw Subtype id. Not consumed by the engine for this
property kind; surfaced for round-trip fidelity.
useable: boolWhether the item can be activated. See Self::CastSpell.
uses_per_day: Option<u8>Daily-use cap. See Self::CastSpell.
ComputerSpike
Computer-spike active property (vanilla itempropdef.2da
label Computer_Spike, row 53). Routed into the
active-property table alongside CastSpell. No subtype
dimension; the cost fields carry the magnitude (the
computer-use skill bonus the spike grants).
subtype_id is preserved for shape parity even though the
engine ignores it. useable and uses_per_day follow the
same active-property decoding rules documented on
Self::CastSpell.
Fields
property_id: u16Raw PropertyName (the row in itempropdef.2da whose
label matched Computer_Spike at decode time).
subtype_id: u16Raw Subtype id. Not consumed by the engine for this
property kind; surfaced for round-trip fidelity.
useable: boolWhether the item can be activated. See Self::CastSpell.
uses_per_day: Option<u8>Daily-use cap. See Self::CastSpell.
OnHit
On-hit effect property (vanilla itempropdef.2da label
OnHit, row 32). The subtype identifies which on-hit effect
(Daze, Stun, Wound, …) fires when the weapon connects.
Unlike the other passive variants, OnHit’s param1 /
param1_value fields are load-bearing: they convey the
effect’s magnitude / DC / duration through the
iprp_paramtable.2da dispatch chain. Both fields are
preserved on the typed variant so consumers do not have to
fall back to the raw UtiProperty to read them.
Fields
property_id: u16Raw PropertyName (the row in itempropdef.2da whose
label matched OnHit at decode time).
Unknown
Property kind for which no typed variant exists yet, or whose
PropertyName does not resolve in itempropdef.2da. Carries
every raw field so consumers can still introspect or
round-trip.
Implementations§
Source§impl DecodedProperty
impl DecodedProperty
Sourcepub fn subtype_label(&self, cache: &mut TwoDaCache<'_>) -> Option<String>
pub fn subtype_label(&self, cache: &mut TwoDaCache<'_>) -> Option<String>
Resolves a developer-readable label for this property’s subtype by walking the engine’s per-property subtype dispatch chain.
Returns None when any step of the chain fails to resolve:
- the source
PropertyNamerow is absent fromitempropdef.2da, - the row’s
SubTypeResRefcell is empty (the property has no subtype dimension at all), - the per-property subtype 2DA cannot be loaded,
- the
Subtyperow is past the loaded subtype 2DA’s row count, or - any 2DA in the chain is missing or malformed.
The returned string is the developer-readable label column
(e.g. "Acid" from iprp_damagecost.2da), not a TLK-resolved
display name. Tooling that needs the localized display name
must resolve the Name column against a talktable separately.
Trait Implementations§
Source§impl Clone for DecodedProperty
impl Clone for DecodedProperty
Source§fn clone(&self) -> DecodedProperty
fn clone(&self) -> DecodedProperty
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more