pub struct Utt {Show 35 fields
pub template_resref: ResRef,
pub tag: String,
pub name: GffLocalizedString,
pub comment: String,
pub auto_remove_key: bool,
pub faction_id: u32,
pub cursor_id: u8,
pub highlight_height: f32,
pub key_name: String,
pub type_id: i32,
pub trap_detectable: bool,
pub trap_detect_dc: u8,
pub trap_disarmable: bool,
pub trap_disarm_dc: u8,
pub is_trap: bool,
pub trap_one_shot: bool,
pub trap_type: u8,
pub on_disarm: ResRef,
pub on_trap_triggered: ResRef,
pub on_click: ResRef,
pub on_heartbeat: ResRef,
pub on_enter: ResRef,
pub on_exit: ResRef,
pub on_user_defined: ResRef,
pub linked_to: String,
pub linked_to_flags: u8,
pub linked_to_module: ResRef,
pub transition_destination: GffLocalizedString,
pub party_required: bool,
pub set_by_player_party: bool,
pub portrait_id: u16,
pub portrait: ResRef,
pub loadscreen_id: u16,
pub palette_id: u8,
pub geometry: Vec<GitTriggerPoint>,
}Expand description
Typed UTT model built from/to Gff data.
Fields§
§template_resref: ResRefTrigger template resref (TemplateResRef).
tag: StringTrigger tag (Tag).
name: GffLocalizedStringLocalized trigger name (LocalizedName).
comment: StringToolset comment (Comment).
auto_remove_key: boolAuto-remove-key flag (AutoRemoveKey).
faction_id: u32Faction identifier (Faction).
cursor_id: u8Cursor identifier (Cursor).
highlight_height: f32Highlight height (HighlightHeight). Values <= 0.0 are ignored and default to 0.1.
key_name: StringKey name (KeyName).
type_id: i32Trigger type id (Type). Type 1 (Transition) requires a linked destination. Type 2 (Trap) is required for trap flags to function.
trap_detectable: boolTrap-detectable flag (TrapDetectable).
trap_detect_dc: u8Trap detect DC (TrapDetectDC). Ignored by the engine; trap DCs are derived dynamically from traps.2da.
trap_disarmable: boolTrap-disarmable flag (TrapDisarmable).
trap_disarm_dc: u8Trap disarm DC (DisarmDC). Ignored by the engine; trap DCs are derived dynamically from traps.2da.
is_trap: boolTrap enabled flag (TrapFlag). Engine ignores this if type_id is not 2 (Trap).
trap_one_shot: boolTrap one-shot flag (TrapOneShot).
trap_type: u8Trap type (TrapType).
on_disarm: ResRefOn-disarm script (OnDisarm).
on_trap_triggered: ResRefOn-trap-triggered script (OnTrapTriggered).
on_click: ResRefOn-click script (OnClick). Only fires for Transition triggers (Type 1). Ignored on Generic triggers.
on_heartbeat: ResRefOn-heartbeat script (ScriptHeartbeat).
on_enter: ResRefOn-enter script (ScriptOnEnter).
on_exit: ResRefOn-exit script (ScriptOnExit).
on_user_defined: ResRefOn-user-defined script (ScriptUserDefine).
linked_to: StringLinked target tag (LinkedTo).
linked_to_flags: u8Linked target flags (LinkedToFlags).
linked_to_module: ResRefLinked target module resref (LinkedToModule).
transition_destination: GffLocalizedStringLocalized transition destination text (TransitionDestin).
party_required: boolParty-required flag (PartyRequired). Legacy NWN data never read by the K1 engine.
set_by_player_party: boolSet-by-player-party flag (SetByPlayerParty).
portrait_id: u16Portrait ID (PortraitId). If < 0xFFFE, the engine completely shadows and ignores the string Portrait resref field.
portrait: ResRefPortrait resref (Portrait). Ignored by the engine if portrait_id is < 0xFFFE.
loadscreen_id: u16Loadscreen ID (LoadScreenID).
palette_id: u8Palette ID (PaletteID).
geometry: Vec<GitTriggerPoint>Geometry polygon vertices (Geometry). Engine requires at least 3 vertices to form a valid polygon.
Implementations§
Source§impl Utt
impl Utt
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.