Difference between revisions of "ActorBase Script"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>DreamKing
(Added note to mention that most SKSE "Set" functions performed on an ActorBase do not persist across gaming sessions.)
imported>CraftySentinel
m (Left a "]]" where it shouldn't be.)
 
(One intermediate revision by the same user not shown)
Line 19: Line 19:
== Global Functions ==
== Global Functions ==
None
None


== Member Functions ==
== Member Functions ==


{|class="wikitable" width =100%
'''Class [[GetClass - ActorBase|GetClass]]()'''
!style="text-align:left;" width=25%|Function
*Returns this actor's class.
!style="text-align:left;"|Description
|-
|[[GetClass - ActorBase|Class '''GetClass'''()]]
|Returns this actor's class.
|-


|[[GetDeadCount - ActorBase|Int '''GetDeadCount'''()]]
'''Int [[GetDeadCount - ActorBase|GetDeadCount]]()'''
|Returns the number of actors that have this base that are dead.
*Returns the number of actors that have this base that are dead.
|-


|[[GetGiftFilter - ActorBase|FormList '''GetGiftFilter'''()]]
'''FormList [[GetGiftFilter - ActorBase|GetGiftFilter]]()'''
|Returns this actor's formlist of keywords to use as a gift filter.
*Returns this actor's formlist of keywords to use as a gift filter.
|-


|[[GetRace - ActorBase|Race '''GetRace'''()]]
'''Race [[GetRace - ActorBase|GetRace]]()'''
|Returns this actor's race.
*Returns this actor's race.
|-


|[[GetSex - ActorBase|Int '''GetSex'''()]]
'''Int [[GetSex - ActorBase|GetSex]]()'''
|Returns this actor's sex.
*Returns this actor's sex.
|-


|[[IsEssential - ActorBase|Bool '''IsEssential'''()]]
'''Bool [[IsEssential - ActorBase|IsEssential]]()'''
|Returns if this actor is flagged as essential or not.
*Returns if this actor is flagged as essential or not.
|-


|[[IsInvulnerable - ActorBase|Bool '''IsInvulnerable'''()]]
'''Bool [[IsInvulnerable - ActorBase|IsInvulnerable]]()'''
|Returns if this actor is flagged as invulnerable or not.
*Returns if this actor is flagged as invulnerable or not.
|-


|[[IsProtected - ActorBase|Bool '''IsProtected'''()]]
'''Bool [[IsProtected - ActorBase|IsProtected]]()'''
|Returns if this actor is flagged as protected or not.
*Returns if this actor is flagged as protected or not.
|-


|[[IsUnique - ActorBase|Bool '''IsUnique'''()]]
'''Bool [[IsUnique - ActorBase|IsUnique]]()'''
|Returns if this actor is flagged as unique.
*Returns if this actor is flagged as unique.
|-


|[[SetEssential - ActorBase|'''SetEssential'''(Bool ''abEssential'')]]
'''[[SetEssential - ActorBase|SetEssential]](Bool ''abEssential'')'''
|Flags this actor as essential or not. An actor cannot both be protected and essential.
*Flags this actor as essential or not. An actor cannot both be protected and essential.
|-


|[[SetInvulnerable - ActorBase|'''SetInvulnerable'''(Bool ''abInvulnerable'')]]
'''[[SetInvulnerable - ActorBase|SetInvulnerable]](Bool ''abInvulnerable'')'''
|Flags this actor as invulnerable or not.
*Flags this actor as invulnerable or not.
|-


|[[SetProtected - ActorBase|'''SetProtected'''(Bool ''abProtected'')]]
'''[[SetProtected - ActorBase|SetProtected]](Bool ''abProtected'')'''
|Flags this actor as protected or not. An actor cannot both be protected and essential.
*Flags this actor as protected or not. An actor cannot both be protected and essential.
|-


|[[SetOutfit - ActorBase|'''SetOutfit'''(Outfit ''akOutfit'', Bool ''abSleepOutfit'')]]
'''[[SetOutfit - ActorBase|SetOutfit]](Outfit ''akOutfit'', Bool ''abSleepOutfit'')'''
|Change the default or sleep outfit. Art will be loaded next time this actor is loaded.
*Change the default or sleep outfit. Art will be loaded next time this actor is loaded.
|-


|}
== SKSE Member Functions ==
'''CombatStyle [[GetCombatStyle - ActorBase|GetCombatStyle]]()'''
*Returns the combat style of this actor.


== SKSE Member Functions ==
'''[[SetCombatStyle - ActorBase|SetCombatStyle]](CombatStyle ''cs'')'''
*Sets the combat style of this actor.


{|class="wikitable" width =100%
'''Outfit [[GetOutfit - ActorBase|GetOutfit]](Bool ''bSleepOutfit'')'''
!style="text-align:left;" width=25%|Function
*Returns the default or sleep outfit of this actor.
!style="text-align:left;"|Description
|-
|[[GetCombatStyle - ActorBase|CombatStyle '''GetCombatStyle'''()]]
|Returns the combat style of this actor.
|-


|[[SetCombatStyle - ActorBase|'''SetCombatStyle'''(CombatStyle ''cs'')]]
'''[[SetClass - ActorBase|SetClass]](Class ''c'')'''
|Sets the combat style of this actor.
*Changes the class of this actor.
|-


|[[GetOutfit - ActorBase|Outfit '''GetOutfit'''(Bool ''bSleepOutfit'')]]
'''Float [[GetHeight - ActorBase|GetHeight]]()'''
|Returns the default or sleep outfit of this actor.
*Returns the height of this actor.
|-


|[[SetClass - ActorBase|'''SetClass'''(Class ''c'')]]
'''[[SetHeight - ActorBase|SetHeight]](Float ''height'')'''
|Changes the class of this actor.
*Sets the height of this actor to the specified amount.
|-


|[[GetHeight - ActorBase|Float '''GetHeight'''()]]
'''Float [[GetWeight - ActorBase|GetWeight]]()'''
|Returns the height of this actor.
*Returns the weight of this actor.
|-


|[[SetHeight - ActorBase|'''SetHeight'''(Float ''height'')]]
'''[[SetWeight - ActorBase|SetWeight]](Float ''weight'')'''
|Sets the height of this actor to the specified amount.
*Changes the weight of this actor.
|-


|[[GetWeight - ActorBase|Float '''GetWeight'''()]]
'''Int [[GetNumHeadParts - ActorBase|GetNumHeadParts]]()'''
|Returns the weight of this actor.
*Returns the number of head parts of this actor.
|-


|[[SetWeight - ActorBase|'''SetWeight'''(Float ''weight'')]]
'''HeadPart [[GetNthHeadPart - ActorBase|GetNthHeadPart]](Int ''slotPart'')'''
|Changes the weight of this actor.
*Returns the specified head part of this actor.
|-


|[[GetNumHeadParts - ActorBase|Int '''GetNumHeadParts'''()]]
'''[[SetNthHeadPart - ActorBase|SetNthHeadPart]](HeadPart ''headPart'', Int ''slotPart'')'''
|Returns the number of head parts of this actor.
*Changes the specified head part of this actor.
|-


|[[GetNthHeadPart - ActorBase|HeadPart '''GetNthHeadPart'''(Int ''slotPart'')]]
'''Int [[GetIndexOfHeadPartByType - ActorBase|GetIndexOfHeadPartByType]](Int ''type'')'''
|Returns the specified head part of this actor.
*Returns the Index of the specified type.
|-


|[[SetNthHeadPart - ActorBase|'''SetNthHeadPart'''(HeadPart ''headPart'', Int ''slotPart'')]]
'''Int [[GetNumOverlayHeadParts - ActorBase|GetNumOverlayHeadParts]]()'''
|Changes the specified head part of this actor.
*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)
|-


|[[GetIndexOfHeadPartByType - ActorBase|Int '''GetIndexOfHeadPartByType'''(Int ''type'')]]
'''HeadPart [[GetNthOverlayHeadPart - ActorBase|GetNthOverlayHeadPart]](Int ''slotPart'')'''
|Returns the Index of the specified type.
*Returns the specified overlay head part of this actor.
|-


|[[GetFaceMorph - ActorBase|Float '''GetFaceMorph'''(Int ''index'')]]
'''Int [[GetIndexOfOverlayHeadPartByType - ActorBase|GetIndexOfOverlayHeadPartByType]](Int ''type'')'''
| Returns the specified head morph value of this actor.
*Returns the Index of the specified type.
|-


|[[SetFaceMorph - ActorBase|'''SetFaceMorph'''(Float ''value'', Int ''index'')]]
'''Float [[GetFaceMorph - ActorBase|GetFaceMorph]](Int ''index'')'''
| Changes the specified face morph value of this actor.
*Returns the specified head morph value of this actor.
|-


|[[GetFacePreset - ActorBase|Int '''GetFacePreset'''(Int ''index'')]]
'''[[SetFaceMorph - ActorBase|SetFaceMorph]](Float ''value'', Int ''index'')'''
|Returns the face preset of this actor.
*Changes the specified face morph value of this actor.
|-


|[[SetFacePreset - ActorBase|'''SetFacePreset'''(Int ''value'', Int ''index'')]]
'''Int [[GetFacePreset - ActorBase|GetFacePreset]](Int ''index'')'''
|Changes the face preset of this actor.
*Returns the face preset of this actor.
|-


|[[GetHairColor - ActorBase|ColorForm '''GetHairColor'''()]]
'''[[SetFacePreset - ActorBase|SetFacePreset]](Int ''value'', Int ''index'')'''
|Returns the ColorForm of this actor's hair.
*Changes the face preset of this actor.
|-


|[[SetHairColor - ActorBase|'''SetHairColor'''(ColorForm ''color'')]]
'''ColorForm [[GetHairColor - ActorBase|GetHairColor]]()'''
|Changes the ColorForm of this actor's hair.
*Returns the ColorForm of this actor's hair.
|-


|[[GetSpellCount - ActorBase|Int '''GetSpellCount'''()]]
'''[[SetHairColor - ActorBase|SetHairColor]](ColorForm ''color'')'''
|Returns the number of spells defined in the base actor form.
*Changes the ColorForm of this actor's hair.
|-


|[[GetNthSpell - ActorBase|Spell '''GetNthSpell'''(Int ''n'')]]
'''Int [[GetSpellCount - ActorBase|GetSpellCount]]()'''
|Returns the specified spell defined in the base actor form.
*Returns the number of spells defined in the base actor form.
|-


|[[GetFaceTextureSet - ActorBase|TextureSet '''GetFaceTextureSet'''()]]
'''Spell [[GetNthSpell - ActorBase|GetNthSpell]](Int ''n'')'''
|Returns the face TextureSet of the actor.
*Returns the specified spell defined in the base actor form.
|-


|[[SetFaceTextureSet - ActorBase|'''SetFaceTextureSet'''(TextureSet ''textures'')]]
'''TextureSet [[GetFaceTextureSet - ActorBase|GetFaceTextureSet]]()'''
|Sets the face TextureSet of the actor.
*Returns the face TextureSet of the actor.
|-


|[[GetVoiceType - ActorBase|VoiceType '''GetVoiceType'''()]]
'''[[SetFaceTextureSet - ActorBase|SetFaceTextureSet]](TextureSet ''textures'')'''
|Returns the Actor's voicetype.
*Sets the face TextureSet of the actor.
|-


|[[SetVoiceType - ActorBase|'''SetVoiceType'''(VoiceType ''nVoice'')]]
'''VoiceType [[GetVoiceType - ActorBase|GetVoiceType]]()'''
|Sets the Actor's voicetype.
*Returns the Actor's voicetype.
|-


|[[GetSkin - ActorBase|Armor '''GetSkin'''()]]
'''[[SetVoiceType - ActorBase|SetVoiceType]](VoiceType ''nVoice'')'''
|Returns the skin of the actorbase.
*Sets the Actor's voicetype.
|-


|[[SetSkin - ActorBase|'''SetSkin'''(Armor ''skin'')]]
'''Armor [[GetSkin - ActorBase|GetSkin]]()'''
|Sets the skin of the actorbase.
*Returns the skin of the actorbase.
|-


|[[GetSkinFar - ActorBase|Armor '''GetSkinFar'''()]]
'''[[SetSkin - ActorBase|SetSkin]](Armor ''skin'')'''
|Returns the far away skin of the actorbase.
*Sets the skin of the actorbase.
|-


|[[SetSkinFar - ActorBase|'''SetSkinFar'''(Armor ''skin'')]]
'''Armor [[GetSkinFar - ActorBase|GetSkinFar]]()'''
|Sets the far away skin of the actorbase.
*Returns the far away skin of the actorbase.
|-


|[[GetTemplate - ActorBase|ActorBase '''GetTemplate'''()]]
'''[[SetSkinFar - ActorBase|SetSkinFar]](Armor ''skin'')'''
|Returns the root template of the actorbase.
*Sets the far away skin of the actorbase.
|-


|}
'''ActorBase [[GetTemplate - ActorBase|GetTemplate]]()'''
*Returns the root template of the actorbase.


== Events ==
== Events ==
Line 212: Line 164:
* 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 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.
* 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 - Actor|OnPlayerLoadGame()]] event or a similar mechanism.
* 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 - Actor|OnPlayerLoadGame]]() event or a similar mechanism.

Latest revision as of 08:41, 1 February 2014


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.