pub struct Utt {Show 35 fields
pub tag: String,
pub name: GffLocalizedString,
pub faction_id: u32,
pub cursor_id: u8,
pub key_name: String,
pub portrait_id: u16,
pub portrait: ResRef,
pub on_heartbeat: ResRef,
pub on_enter: ResRef,
pub on_exit: ResRef,
pub on_user_defined: ResRef,
pub on_trap_triggered: ResRef,
pub on_disarm: ResRef,
pub on_click: ResRef,
pub trap_type: u8,
pub trap_one_shot: bool,
pub trap_disarmable: bool,
pub trap_detectable: bool,
pub linked_to: String,
pub linked_to_flags: u8,
pub linked_to_module: ResRef,
pub auto_remove_key: bool,
pub transition_destination: GffLocalizedString,
pub type_id: i32,
pub highlight_height: f32,
pub loadscreen_id: u16,
pub set_by_player_party: bool,
pub geometry: Vec<UttGeometryPoint>,
pub template_resref: ResRef,
pub comment: String,
pub palette_id: u8,
pub trap_detect_dc: u8,
pub trap_disarm_dc: u8,
pub is_trap: bool,
pub party_required: bool,
}Expand description
Typed UTT model built from/to Gff data.
Fields§
§tag: StringTrigger tag (Tag).
name: GffLocalizedStringLocalized trigger name (LocalizedName).
faction_id: u32Faction identifier (Faction).
cursor_id: u8Cursor identifier (Cursor).
key_name: StringKey name (KeyName).
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.
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).
on_trap_triggered: ResRefOn-trap-triggered script (OnTrapTriggered).
on_disarm: ResRefOn-disarm script (OnDisarm).
on_click: ResRefOn-click script (OnClick). Only fires for Transition triggers (Type 1). Ignored on Generic triggers.
trap_type: u8Trap type (TrapType).
trap_one_shot: boolTrap one-shot flag (TrapOneShot).
trap_disarmable: boolTrap-disarmable flag (TrapDisarmable).
trap_detectable: boolTrap-detectable flag (TrapDetectable).
linked_to: StringLinked target tag (LinkedTo).
linked_to_flags: u8Linked target flags (LinkedToFlags).
linked_to_module: ResRefLinked target module resref (LinkedToModule).
auto_remove_key: boolAuto-remove-key flag (AutoRemoveKey).
transition_destination: GffLocalizedStringLocalized transition destination text (TransitionDestin).
type_id: i32Trigger type id (Type). Type 1 (Transition) requires a linked destination. Type 2 (Trap) is required for trap flags to function.
highlight_height: f32Highlight height (HighlightHeight). Values <= 0.0 are ignored and default to 0.1.
loadscreen_id: u16Loadscreen ID (LoadScreenID).
set_by_player_party: boolSet-by-player-party flag (SetByPlayerParty).
geometry: Vec<UttGeometryPoint>Geometry polygon vertices (Geometry). Engine requires at least 3 vertices to form a valid polygon.
template_resref: ResRefTrigger template resref (TemplateResRef).
comment: StringToolset comment (Comment).
palette_id: u8Palette ID (PaletteID).
trap_detect_dc: u8Trap detect DC (TrapDetectDC). Ignored by the engine; trap DCs are derived dynamically from traps.2da.
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).
party_required: boolParty-required flag (PartyRequired). Legacy NWN data never read by the K1 engine.
Implementations§
Source§impl Utt
impl Utt
Sourcepub const PARTS: &'static [&'static [Field]]
pub const PARTS: &'static [&'static [Field]]
This type’s schema in parts, which is what a container holding it references.
Own fields first, then one part per flattened child in the order they are declared.
Sourcepub fn read_declared(root: &GffStruct) -> Self
pub fn read_declared(root: &GffStruct) -> Self
Reads every declared field off root.
Absent fields take the entry’s own answer, so a fallback is derived from the declaration rather than restated beside it.
A field declaring a hand-written read is left at that answer for the view to overwrite.
Sourcepub fn write_declared(&self, root: &mut GffStruct)
pub fn write_declared(&self, root: &mut GffStruct)
Writes every declared field onto root, leaving out the ones
their entry says the engine’s own writer leaves out.
A field declaring a hand-written write is not touched here.
Sourcepub fn read_element(structure: &GffStruct) -> Self
pub fn read_element(structure: &GffStruct) -> Self
Reads one element of a list of this type.
Sourcepub fn write_element(&self, structure: &mut GffStruct)
pub fn write_element(&self, structure: &mut GffStruct)
Writes one element of a list of this type.