pub struct Utc {Show 95 fields
pub template_resref: ResRef,
pub tag: String,
pub comment: String,
pub conversation: ResRef,
pub first_name: GffLocalizedString,
pub last_name: GffLocalizedString,
pub age: i32,
pub starting_package: u8,
pub gold: u32,
pub invulnerable: bool,
pub experience: u32,
pub subrace_id: u8,
pub perception_id: u8,
pub race_id: u8,
pub color_skin: u8,
pub color_hair: u8,
pub color_tattoo1: u8,
pub color_tattoo2: u8,
pub appearance_head: u8,
pub duplicating_head: u8,
pub use_backup_head: u8,
pub appearance_id: u16,
pub gender_id: u8,
pub faction_id: u16,
pub walkrate_id: i32,
pub ai_state: u16,
pub skill_points: u16,
pub movement_rate: u8,
pub soundset_id: u16,
pub portrait_id: u16,
pub portrait_resref: ResRef,
pub save_will: u8,
pub save_fortitude: u8,
pub morale: u8,
pub morale_recovery: u8,
pub morale_breakpoint: u8,
pub palette_id: u8,
pub bodybag_id: u8,
pub body_variation: u8,
pub texture_variation: u8,
pub alignment: u8,
pub challenge_rating: f32,
pub blindspot: f32,
pub multiplier_set: u8,
pub natural_ac: u8,
pub reflex_bonus: i16,
pub willpower_bonus: i16,
pub fortitude_bonus: i16,
pub strength: u8,
pub dexterity: u8,
pub constitution: u8,
pub intelligence: u8,
pub wisdom: u8,
pub charisma: u8,
pub current_hp: i16,
pub max_hp: i16,
pub hp: i16,
pub fp: i16,
pub max_fp: i16,
pub not_reorienting: bool,
pub party_interact: bool,
pub no_perm_death: bool,
pub min1_hp: bool,
pub plot: bool,
pub interruptable: bool,
pub is_pc: bool,
pub disarmable: bool,
pub ignore_cre_path: bool,
pub hologram: bool,
pub will_not_render: bool,
pub deity: String,
pub description: GffLocalizedString,
pub lawfulness: u8,
pub phenotype_id: i32,
pub subrace_name: String,
pub on_end_dialog: ResRef,
pub on_blocked: ResRef,
pub on_heartbeat: ResRef,
pub on_notice: ResRef,
pub on_spell: ResRef,
pub on_attacked: ResRef,
pub on_damaged: ResRef,
pub on_disturbed: ResRef,
pub on_end_round: ResRef,
pub on_dialog: ResRef,
pub on_spawn: ResRef,
pub on_rested: ResRef,
pub on_death: ResRef,
pub on_user_defined: ResRef,
pub skills: UtcSkills,
pub classes: Vec<UtcClass>,
pub special_abilities: Vec<UtcSpecialAbility>,
pub feats: Vec<u16>,
pub equipment: Vec<UtcEquipmentItem>,
pub inventory: Vec<UtcInventoryItem>,
}Expand description
Typed UTC model built from/to Gff data.
Fields§
§template_resref: ResRefCreature template resref (TemplateResRef).
tag: StringCreature tag (Tag).
comment: StringToolset/comment field (Comment). Never read by the K1 engine.
conversation: ResRefConversation resref (Conversation).
first_name: GffLocalizedStringLocalized first name (FirstName).
last_name: GffLocalizedStringLocalized last name (LastName).
age: i32Age (Age).
starting_package: u8Starting package ID (StartingPackage).
gold: u32Gold carried (Gold).
invulnerable: boolInvulnerability flag (Invulnerable).
experience: u32Accumulated experience (Experience).
subrace_id: u8Subrace ID (SubraceIndex).
perception_id: u8Perception range ID (PerceptionRange).
race_id: u8Race ID (Race).
color_skin: u8Skin color index (Color_Skin).
color_hair: u8Hair color index (Color_Hair).
color_tattoo1: u8First tattoo color index (Color_Tattoo1).
color_tattoo2: u8Second tattoo color index (Color_Tattoo2).
appearance_head: u8Head appearance index (Appearance_Head). If 0, the engine forces this to 1 at runtime.
duplicating_head: u8Duplicating-head index (DuplicatingHead).
use_backup_head: u8Backup-head flag (UseBackupHead).
appearance_id: u16Appearance ID (Appearance_Type).
gender_id: u8Gender ID (Gender). Natively clamped by the engine to a maximum of 4.
faction_id: u16Faction ID (FactionID).
walkrate_id: i32Walk-rate ID (WalkRate).
ai_state: u16AI state flags (AIState).
skill_points: u16Unspent skill points (SkillPoints).
movement_rate: u8Movement rate ID (MovementRate).
soundset_id: u16Sound-set ID (SoundSetFile).
portrait_id: u16Portrait ID (PortraitId).
portrait_resref: ResRefPortrait resref override (Portrait).
save_will: u8Will save (SaveWill). Strictly ignored by the KOTOR engine; reads willbonus instead.
save_fortitude: u8Fortitude save (SaveFortitude). Strictly ignored by the KOTOR engine; reads fortbonus instead.
morale: u8Morale (Morale). Never read by the K1 engine.
morale_recovery: u8Morale recovery (MoraleRecovery). Never read by the K1 engine.
morale_breakpoint: u8Morale breakpoint (MoraleBreakpoint). Never read by the K1 engine.
palette_id: u8Palette ID (PaletteID). Never read by the K1 engine.
bodybag_id: u8Body-bag ID (BodyBag).
body_variation: u8Body variation (BodyVariation). Never read by the K1 engine.
texture_variation: u8Texture variation (TextureVar). Never read by the K1 engine.
alignment: u8Good/Evil alignment (GoodEvil). Natively clamped by the engine to a maximum of 100.
challenge_rating: f32Challenge rating (ChallengeRating).
blindspot: f32Blind-spot value (BlindSpot). Never read by the K1 engine.
multiplier_set: u8Multiplier-set ID (MultiplierSet). Never read by the K1 engine.
natural_ac: u8Natural armor class (NaturalAC).
reflex_bonus: i16Reflex save bonus (refbonus).
willpower_bonus: i16Will save bonus (willbonus).
fortitude_bonus: i16Fortitude save bonus (fortbonus).
strength: u8Strength (Str).
dexterity: u8Dexterity (Dex).
constitution: u8Constitution (Con).
intelligence: u8Intelligence (Int).
wisdom: u8Wisdom (Wis).
charisma: u8Charisma (Cha).
current_hp: i16Current hit points (CurrentHitPoints).
max_hp: i16Maximum hit points (MaxHitPoints).
hp: i16Base hit points (HitPoints).
fp: i16Current force points (CurrentForce).
max_fp: i16Maximum force points (ForcePoints).
not_reorienting: boolNon-reorienting flag (NotReorienting).
party_interact: boolParty-interact flag (PartyInteract).
no_perm_death: boolPermanent-death disabled flag (NoPermDeath). Never read by the K1 engine.
min1_hp: boolMin-1HP flag (Min1HP).
plot: boolPlot flag (Plot).
interruptable: boolInterruptable flag (Interruptable).
is_pc: boolPlayer-character flag (IsPC).
disarmable: boolDisarmable flag (Disarmable).
ignore_cre_path: boolIgnore creature pathing (IgnoreCrePath). Never read by the K1 engine.
hologram: boolHologram flag (Hologram). Never read by the K1 engine.
will_not_render: boolWill-not-render flag (WillNotRender). Never read by the K1 engine.
deity: StringDeprecated deity field (Deity).
description: GffLocalizedStringDeprecated localized description (Description).
lawfulness: u8Deprecated lawfulness alignment (LawfulChaotic). Never read by the K1 engine.
phenotype_id: i32Deprecated phenotype (Phenotype).
subrace_name: StringDeprecated textual subrace (Subrace).
on_end_dialog: ResRefOn-end-dialog script (ScriptEndDialogu).
on_blocked: ResRefOn-blocked script (ScriptOnBlocked).
on_heartbeat: ResRefOn-heartbeat script (ScriptHeartbeat).
on_notice: ResRefOn-notice script (ScriptOnNotice).
on_spell: ResRefOn-spell-at script (ScriptSpellAt).
on_attacked: ResRefOn-attacked script (ScriptAttacked).
on_damaged: ResRefOn-damaged script (ScriptDamaged).
on_disturbed: ResRefOn-disturbed script (ScriptDisturbed).
on_end_round: ResRefOn-end-round script (ScriptEndRound).
on_dialog: ResRefOn-dialogue script (ScriptDialogue).
on_spawn: ResRefOn-spawn script (ScriptSpawn).
on_rested: ResRefOn-rested script (ScriptRested).
on_death: ResRefOn-death script (ScriptDeath).
on_user_defined: ResRefOn-user-defined script (ScriptUserDefine).
skills: UtcSkillsSkill ranks from SkillList.
classes: Vec<UtcClass>Class entries from ClassList. Engine ignores classes beyond the second. Duplicate class IDs cause a fatal engine crash.
special_abilities: Vec<UtcSpecialAbility>Special abilities from SpecAbilityList.
feats: Vec<u16>Feat identifiers from FeatList (Feat).
equipment: Vec<UtcEquipmentItem>Equipped-item entries from Equip_ItemList.
inventory: Vec<UtcInventoryItem>Inventory entries from ItemList.
Implementations§
Source§impl Utc
impl Utc
Sourcepub fn project(&self) -> UtcProjection<'_>
pub fn project(&self) -> UtcProjection<'_>
Builds a UtcProjection of this UTC.
Unlike Uti::project, UTC’s
projection takes no context: typed list dispatch happens at
snapshot time against per-list 2DAs (classes.2da, feat.2da,
spells.2da) rather than against one dispatch table at
projection time. The projection stays cheap and scope-free,
ready to feed one or more snapshots.
Sourcepub fn snapshot(&self, cache: &mut TwoDaCache<'_>) -> UtcSnapshot<'_>
pub fn snapshot(&self, cache: &mut TwoDaCache<'_>) -> UtcSnapshot<'_>
Builds a UtcSnapshot of this UTC against the given 2DA
cache. Single-scope shortcut equivalent to
self.project().snapshot(cache).
For multi-scope workflows (mod conflict analysis, vanilla vs
modded diffs), call Utc::project once and
UtcProjection::snapshot per scope.