Utc

Struct Utc 

Source
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: ResRef

Creature template resref (TemplateResRef).

§tag: String

Creature tag (Tag).

§comment: String

Toolset/comment field (Comment).

§conversation: ResRef

Conversation resref (Conversation).

§first_name: GffLocalizedString

Localized first name (FirstName).

§last_name: GffLocalizedString

Localized last name (LastName).

§age: i32

Age (Age).

§starting_package: u8

Starting package ID (StartingPackage).

§gold: u32

Gold carried (Gold).

§invulnerable: bool

Invulnerability flag (Invulnerable).

§experience: u32

Accumulated experience (Experience).

§subrace_id: u8

Subrace ID (SubraceIndex).

§perception_id: u8

Perception range ID (PerceptionRange).

§race_id: u8

Race ID (Race).

§color_skin: u8

Skin color index (Color_Skin).

§color_hair: u8

Hair color index (Color_Hair).

§color_tattoo1: u8

First tattoo color index (Color_Tattoo1).

§color_tattoo2: u8

Second tattoo color index (Color_Tattoo2).

§appearance_head: u8

Head appearance index (Appearance_Head).

§duplicating_head: u8

Duplicating-head index (DuplicatingHead).

§use_backup_head: u8

Backup-head flag (UseBackupHead).

§appearance_id: u16

Appearance ID (Appearance_Type).

§gender_id: u8

Gender ID (Gender).

§faction_id: u16

Faction ID (FactionID).

§walkrate_id: i32

Walk-rate ID (WalkRate).

§ai_state: u16

AI state flags (AIState).

§skill_points: u16

Unspent skill points (SkillPoints).

§movement_rate: u8

Movement rate ID (MovementRate).

§soundset_id: u16

Sound-set ID (SoundSetFile).

§portrait_id: u16

Portrait ID (PortraitId).

§portrait_resref: ResRef

Portrait resref override (Portrait).

§save_will: u8

Will save (SaveWill).

§save_fortitude: u8

Fortitude save (SaveFortitude).

§morale: u8

Morale (Morale).

§morale_recovery: u8

Morale recovery (MoraleRecovery).

§morale_breakpoint: u8

Morale breakpoint (MoraleBreakpoint).

§palette_id: u8

Palette ID (PaletteID).

§bodybag_id: u8

Body-bag ID (BodyBag).

§body_variation: u8

Body variation (BodyVariation).

§texture_variation: u8

Texture variation (TextureVar).

§alignment: u8

Good/Evil alignment (GoodEvil).

§challenge_rating: f32

Challenge rating (ChallengeRating).

§blindspot: f32

Blind-spot value (BlindSpot).

§multiplier_set: u8

Multiplier-set ID (MultiplierSet).

§natural_ac: u8

Natural armor class (NaturalAC).

§reflex_bonus: i16

Reflex save bonus (refbonus).

§willpower_bonus: i16

Will save bonus (willbonus).

§fortitude_bonus: i16

Fortitude save bonus (fortbonus).

§strength: u8

Strength (Str).

§dexterity: u8

Dexterity (Dex).

§constitution: u8

Constitution (Con).

§intelligence: u8

Intelligence (Int).

§wisdom: u8

Wisdom (Wis).

§charisma: u8

Charisma (Cha).

§current_hp: i16

Current hit points (CurrentHitPoints).

§max_hp: i16

Maximum hit points (MaxHitPoints).

§hp: i16

Base hit points (HitPoints).

§fp: i16

Current force points (CurrentForce).

§max_fp: i16

Maximum force points (ForcePoints).

§not_reorienting: bool

Non-reorienting flag (NotReorienting).

§party_interact: bool

Party-interact flag (PartyInteract).

§no_perm_death: bool

Permanent-death disabled flag (NoPermDeath).

§min1_hp: bool

Min-1HP flag (Min1HP).

§plot: bool

Plot flag (Plot).

§interruptable: bool

Interruptable flag (Interruptable).

§is_pc: bool

Player-character flag (IsPC).

§disarmable: bool

Disarmable flag (Disarmable).

§ignore_cre_path: bool

Ignore creature pathing (IgnoreCrePath).

§hologram: bool

Hologram flag (Hologram).

§will_not_render: bool

Will-not-render flag (WillNotRender).

§deity: String

Deprecated deity field (Deity).

§description: GffLocalizedString

Deprecated localized description (Description).

§lawfulness: u8

Deprecated lawfulness alignment (LawfulChaotic).

§phenotype_id: i32

Deprecated phenotype (Phenotype).

§subrace_name: String

Deprecated textual subrace (Subrace).

§on_end_dialog: ResRef

On-end-dialog script (ScriptEndDialogu).

§on_blocked: ResRef

On-blocked script (ScriptOnBlocked).

§on_heartbeat: ResRef

On-heartbeat script (ScriptHeartbeat).

§on_notice: ResRef

On-notice script (ScriptOnNotice).

§on_spell: ResRef

On-spell-at script (ScriptSpellAt).

§on_attacked: ResRef

On-attacked script (ScriptAttacked).

§on_damaged: ResRef

On-damaged script (ScriptDamaged).

§on_disturbed: ResRef

On-disturbed script (ScriptDisturbed).

§on_end_round: ResRef

On-end-round script (ScriptEndRound).

§on_dialog: ResRef

On-dialogue script (ScriptDialogue).

§on_spawn: ResRef

On-spawn script (ScriptSpawn).

§on_rested: ResRef

On-rested script (ScriptRested).

§on_death: ResRef

On-death script (ScriptDeath).

§on_user_defined: ResRef

On-user-defined script (ScriptUserDefine).

§skills: UtcSkills

Skill ranks from SkillList.

§classes: Vec<UtcClass>

Class entries from ClassList.

§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

Source

pub fn new() -> Self

Creates an empty UTC value.

Source

pub fn from_gff(gff: &Gff) -> Result<Self, UtcError>

Builds typed UTC data from a parsed GFF container.

Source

pub fn to_gff(&self) -> Gff

Converts this typed UTC value into a GFF container.

Trait Implementations§

Source§

impl Clone for Utc

Source§

fn clone(&self) -> Utc

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Utc

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Utc

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl GffSchema for Utc

Source§

fn schema() -> &'static [FieldSchema]

Returns the root field schema for this GFF resource type.
Source§

impl PartialEq for Utc

Source§

fn eq(&self, other: &Utc) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for Utc

Auto Trait Implementations§

§

impl Freeze for Utc

§

impl RefUnwindSafe for Utc

§

impl Send for Utc

§

impl Sync for Utc

§

impl Unpin for Utc

§

impl UnwindSafe for Utc

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Az for T

Source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

Source§

fn cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> CheckedAs for T

Source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

Source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> OverflowingAs for T

Source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

Source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
Source§

impl<T> SaturatingAs for T

Source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

Source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> StrictAs for T

Source§

fn strict_as<Dst>(self) -> Dst
where T: StrictCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> StrictCastFrom<Src> for Dst
where Src: StrictCast<Dst>,

Source§

fn strict_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> UnwrappedAs for T

Source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

Source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> WrappingAs for T

Source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

Source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.