ActorBase Script

From the CreationKit Wiki
Jump to navigation Jump to search


Extends: Form Script

Script for the manipulation of actor base objects. Actors are references of this.

Definition[edit | edit source]

ScriptName ActorBase extends Form

Properties[edit | edit source]

None

Global Functions[edit | edit source]

None

Member Functions[edit | edit source]

Class GetClass()

  • Returns this actor's class.

Int GetDeadCount()

  • Returns the number of actors that have this base that are dead.

FormList GetGiftFilter()

  • Returns this actor's formlist of keywords to use as a gift filter.

Race GetRace()

  • Returns this actor's race.

Int GetSex()

  • Returns this actor's sex.

Bool IsEssential()

  • Returns if this actor is flagged as essential or not.

Bool IsInvulnerable()

  • Returns if this actor is flagged as invulnerable or not.

Bool IsProtected()

  • Returns if this actor is flagged as protected or not.

Bool IsUnique()

  • Returns if this actor is flagged as unique.

SetEssential(Bool abEssential)

  • Flags this actor as essential or not. An actor cannot both be protected and essential.

SetInvulnerable(Bool abInvulnerable)

  • Flags this actor as invulnerable or not.

SetProtected(Bool abProtected)

  • Flags this actor as protected or not. An actor cannot both be protected and essential.

SetOutfit(Outfit akOutfit, Bool abSleepOutfit)

  • Change the default or sleep outfit. Art will be loaded next time this actor is loaded.

SKSE Member Functions[edit | edit source]

CombatStyle GetCombatStyle()

  • Returns the combat style of this actor.

SetCombatStyle(CombatStyle cs)

  • Sets the combat style of this actor.

Outfit GetOutfit(Bool bSleepOutfit)

  • Returns the default or sleep outfit of this actor.

SetClass(Class c)

  • Changes the class of this actor.

Float GetHeight()

  • Returns the height of this actor.

SetHeight(Float height)

  • Sets the height of this actor to the specified amount.

Float GetWeight()

  • Returns the weight of this actor.

SetWeight(Float weight)

  • Changes the weight of this actor.

Int GetNumHeadParts()

  • Returns the number of head parts of this actor.

HeadPart GetNthHeadPart(Int slotPart)

  • Returns the specified head part of this actor.

SetNthHeadPart(HeadPart headPart, Int slotPart)

  • Changes the specified head part of this actor.

Int GetIndexOfHeadPartByType(Int type)

  • Returns the Index of the specified type.

Int GetNumOverlayHeadParts()

  • Returns the number of overlay head parts of this actor. (Note: all overlay HeadPart functions are read only they are for accessing the HeadPart list when the ActorBase's Race has been overlayed with another race)

HeadPart GetNthOverlayHeadPart(Int slotPart)

  • Returns the specified overlay head part of this actor.

Int GetIndexOfOverlayHeadPartByType(Int type)

  • Returns the Index of the specified type.

Float GetFaceMorph(Int index)

  • Returns the specified head morph value of this actor.

SetFaceMorph(Float value, Int index)

  • Changes the specified face morph value of this actor.

Int GetFacePreset(Int index)

  • Returns the face preset of this actor.

SetFacePreset(Int value, Int index)

  • Changes the face preset of this actor.

ColorForm GetHairColor()

  • Returns the ColorForm of this actor's hair.

SetHairColor(ColorForm color)

  • Changes the ColorForm of this actor's hair.

Int GetSpellCount()

  • Returns the number of spells defined in the base actor form.

Spell GetNthSpell(Int n)

  • Returns the specified spell defined in the base actor form.

TextureSet GetFaceTextureSet()

  • Returns the face TextureSet of the actor.

SetFaceTextureSet(TextureSet textures)

  • Sets the face TextureSet of the actor.

VoiceType GetVoiceType()

  • Returns the Actor's voicetype.

SetVoiceType(VoiceType nVoice)

  • Sets the Actor's voicetype.

Armor GetSkin()

  • Returns the skin of the actorbase.

SetSkin(Armor skin)

  • Sets the skin of the actorbase.

Armor GetSkinFar()

  • Returns the far away skin of the actorbase.

SetSkinFar(Armor skin)

  • Sets the far away skin of the actorbase.

ActorBase GetTemplate()

  • Returns the root template of the actorbase.

Events[edit | edit source]

None

Notes[edit | edit source]

  • Any changes made to a leveled actor's leveled (or 'temporary') base will be lost when the actor re-levels.
  • Any changes made to a leveled actor's non-leveled (or editor) base will not show up on the actor until the actor re-levels.
  • Most SKSE "Set" functions performed on an ActorBase will not persist across gaming sessions. If you want a scripted change for a particular Actor to persist, you will need to implement the change via the OnPlayerLoadGame() event or a similar mechanism.