pub struct Utp {Show 70 fields
pub template_resref: ResRef,
pub tag: String,
pub name: GffLocalizedString,
pub description: GffLocalizedString,
pub comment: String,
pub conversation: ResRef,
pub faction_id: u32,
pub appearance_id: u32,
pub animation_state: u8,
pub animation: i32,
pub open: bool,
pub auto_remove_key: bool,
pub key_name: String,
pub key_required: bool,
pub lockable: bool,
pub locked: bool,
pub open_lock_dc: u8,
pub close_lock_dc: u8,
pub open_lock_diff: u8,
pub open_lock_diff_mod: i8,
pub current_hp: i16,
pub maximum_hp: i16,
pub hardness: u8,
pub fortitude: u8,
pub reflex: u8,
pub will: u8,
pub plot: bool,
pub invulnerable: bool,
pub min1_hp: bool,
pub not_blastable: bool,
pub is_static: bool,
pub useable: bool,
pub party_interact: bool,
pub has_inventory: bool,
pub die_when_empty: bool,
pub ground_pile: bool,
pub light_state: bool,
pub interruptable: bool,
pub portrait_id: u16,
pub portrait: ResRef,
pub palette_id: u8,
pub bodybag_id: u8,
pub type_id: u8,
pub is_body_bag: bool,
pub is_corpse: bool,
pub trap_detectable: bool,
pub trap_detect_dc: u8,
pub trap_disarmable: bool,
pub trap_disarm_dc: u8,
pub trap_flag: u8,
pub trap_one_shot: bool,
pub trap_type: u8,
pub on_closed: ResRef,
pub on_damaged: ResRef,
pub on_death: ResRef,
pub on_disarm: ResRef,
pub on_heartbeat: ResRef,
pub on_inventory: ResRef,
pub on_lock: ResRef,
pub on_melee_attacked: ResRef,
pub on_open: ResRef,
pub on_spell_cast_at: ResRef,
pub on_unlock: ResRef,
pub on_used: ResRef,
pub on_user_defined: ResRef,
pub on_dialog: ResRef,
pub on_end_dialogue: ResRef,
pub on_trap_triggered: ResRef,
pub on_fail_to_open: ResRef,
pub inventory: Vec<UtpInventoryItem>,
}Expand description
Typed UTP model built from/to Gff data.
Fields§
§template_resref: ResRefPlaceable template resref (TemplateResRef).
tag: StringPlaceable tag (Tag).
name: GffLocalizedStringLocalized placeable name (LocName).
description: GffLocalizedStringLocalized description (Description).
comment: StringToolset comment (Comment).
conversation: ResRefConversation resref (Conversation).
faction_id: u32Faction identifier (Faction).
appearance_id: u32Appearance identifier (Appearance).
animation_state: u8Animation state (AnimationState).
animation: i32Animation id (Animation).
open: boolOpen-state flag (Open).
auto_remove_key: boolAuto-remove-key flag (AutoRemoveKey).
key_name: StringKey name (KeyName).
key_required: boolKey-required flag (KeyRequired).
lockable: boolLockable flag (Lockable).
locked: boolLocked flag (Locked).
open_lock_dc: u8Open lock DC (OpenLockDC).
close_lock_dc: u8Close lock DC (CloseLockDC).
open_lock_diff: u8Open-lock diff (OpenLockDiff, K2-oriented field).
open_lock_diff_mod: i8Open-lock diff modifier (OpenLockDiffMod, K2-oriented field).
current_hp: i16Current hit points (CurrentHP).
maximum_hp: i16Maximum hit points (HP).
hardness: u8Hardness (Hardness).
fortitude: u8Fortitude save (Fort).
reflex: u8Reflex save (Ref).
will: u8Will save (Will).
plot: boolPlot flag (Plot).
invulnerable: boolInvulnerable flag (Invulnerable).
min1_hp: boolMin-1HP flag (Min1HP).
not_blastable: boolNot-blastable flag (NotBlastable, K2-oriented field).
is_static: boolStatic flag (Static).
useable: boolUseable flag (Useable).
party_interact: boolParty-interact flag (PartyInteract).
has_inventory: boolHas-inventory flag (HasInventory).
die_when_empty: boolDie-when-empty flag (DieWhenEmpty).
ground_pile: boolGround-pile flag (GroundPile).
light_state: boolLight-state flag (LightState).
interruptable: boolInterruptable flag (Interruptable).
portrait_id: u16Portrait ID (PortraitId).
portrait: ResRefPortrait resref (Portrait).
palette_id: u8Palette ID (PaletteID).
bodybag_id: u8Body-bag type (BodyBag).
type_id: u8Type ID (Type).
is_body_bag: boolIs-body-bag flag (IsBodyBag).
is_corpse: boolIs-corpse flag (IsCorpse).
trap_detectable: boolTrap-detectable flag (TrapDetectable).
trap_detect_dc: u8Trap detect DC (TrapDetectDC).
trap_disarmable: boolTrap-disarmable flag (TrapDisarmable).
trap_disarm_dc: u8Trap disarm DC (DisarmDC).
trap_flag: u8Trap flag (TrapFlag).
trap_one_shot: boolTrap one-shot flag (TrapOneShot).
trap_type: u8Trap type (TrapType).
on_closed: ResRefOn-closed script (OnClosed).
on_damaged: ResRefOn-damaged script (OnDamaged).
on_death: ResRefOn-death script (OnDeath).
on_disarm: ResRefOn-disarm script (OnDisarm).
on_heartbeat: ResRefOn-heartbeat script (OnHeartbeat).
on_inventory: ResRefOn-inventory-disturbed script (OnInvDisturbed).
on_lock: ResRefOn-lock script (OnLock).
on_melee_attacked: ResRefOn-melee-attacked script (OnMeleeAttacked).
on_open: ResRefOn-open script (OnOpen).
on_spell_cast_at: ResRefOn-spell-cast-at script (OnSpellCastAt).
on_unlock: ResRefOn-unlock script (OnUnlock).
on_used: ResRefOn-used script (OnUsed).
on_user_defined: ResRefOn-user-defined script (OnUserDefined).
on_dialog: ResRefOn-dialog script (OnDialog).
on_end_dialogue: ResRefOn-end-dialogue script (OnEndDialogue).
on_trap_triggered: ResRefOn-trap-triggered script (OnTrapTriggered).
on_fail_to_open: ResRefOn-fail-to-open script (OnFailToOpen).
inventory: Vec<UtpInventoryItem>Inventory entries (ItemList).
Implementations§
Source§impl Utp
impl Utp
Sourcepub fn trap_settings(&self) -> TrapSettings
pub fn trap_settings(&self) -> TrapSettings
Returns trap-related settings as a shared typed block.
Sourcepub fn set_trap_settings(&mut self, trap: TrapSettings)
pub fn set_trap_settings(&mut self, trap: TrapSettings)
Applies trap-related settings from a shared typed block.
Sourcepub fn common_trap_scripts(&self) -> CommonTrapScripts
pub fn common_trap_scripts(&self) -> CommonTrapScripts
Returns the common trap-script hooks as a shared typed bundle.
Sourcepub fn set_common_trap_scripts(&mut self, scripts: CommonTrapScripts)
pub fn set_common_trap_scripts(&mut self, scripts: CommonTrapScripts)
Applies the common trap-script hooks from a shared typed bundle.