Actor - powerof3/PapyrusExtenderSSE GitHub Wiki

Getters

GetActiveEffects

  • Gets all magiceffects currently on the actor. Filters out inactive and hideinui spells.
MagicEffect[] Function GetActiveEffects(Actor akActor, bool abShowInactive = false) global native

GetActorAlpha

float Function GetActorAlpha(Actor akActor) global native

GetActorKnockState

Type Value
Normal 0
Explode 1
ExplodeLeadIn 2
Out 3
OutLeadIn 4
Queued 5
GetUp 6
Down 7
  • Gets actor knock down state
int Function GetActorKnockState(Actor akActor) global native

GetActorRefraction

float Function GetActorRefraction(Actor akActor) global native

GetActorState

Type Value
Alive 0
Dying 1
Dead 2
Unconscious 3
Reanimate 4
Recycle 5
Restrained 6
EssentialDown 7
Bleedout 8
  • Gets actor life state
int Function GetActorState(Actor akActor) global native

GetActorSoulSize

  • Gets actor soul size
int Function GetActorSoulSize(Actor akActor) global native

GetActorValueModifier

Type Value
Permanent 0
Temporary 1
Damage 2
float Function GetActorValueModifier(Actor akActor, int aiModifier, String asActorValue) global native

GetAllActorPlayableSpells

  • Get all spells (not abilities) on the actor
Spell[] Function GetAllActorPlayableSpells(Actor akActor) global native

GetCriticalStage

int Function GetCriticalStage(Actor akActor) global native

GetCombatAllies

Actor[] Function GetCombatAllies(Actor akActor) global native

GetCombatTargets

Actor[] Function GetCombatTargets(Actor akActor) global native

GetCommandedActors

  • Gets all summons commanded by this actor
Actor[] Function GetCommandedActors(Actor akActor) global native

GetCommandingActor

  • Gets the owner of summoned actor
Actor Function GetCommandingActor(Actor akActor) global native

GetEquippedAmmo

Ammo Function GetEquippedAmmo(Actor akActor) global native

GetEquippedEnchantment

Enchantment Function GetEquippedAmmoEnchantment(Actor akActor) global native

GetEquippedWeaponIsPoisoned

  • Checks if the equipped weapon is poisoned
bool Function GetEquippedWeaponIsPoisoned(Actor akActor, bool abLeftHand) global native	

GetEquippedWeaponPoison

Potion Function GetEquippedWeaponPoison(Actor akActor, bool abLeftHand) global native	

GetEquippedWeaponPoisonCount

  • Gets poison dose on equipped weapon
int Function GetEquippedWeaponPoisonCount(Actor akActor, bool abLeftHand) global native	

GetEquippedWeight

  • Gets weight of all equipped items.
float Function GetEquippedWeight(Actor akActor) global native	

GetHairRGB

int[] Function GetHairRGB(Actor akActor) global native

GetHeadPartTextureSet

TextureSet Function GetHeadPartTextureSet(Actor akActor, int aiType) global native

GetLocalGravityActor

  • Gets the actor's current gravity.
Float Function GetLocalGravityActor(Actor akActor) global native

GetMount

  • Get the mount that the actor is riding
Actor Function GetMount(Actor akActor) global native

GetObjectUnderFeet

  • Gets object under actor's feet (eg. table).
  • Does not work if the player is standing on the ground.
ObjectReference Function GetObjectUnderFeet(Actor akActor) global native

GetOffersServices

  • Returns true if the actor is offering services (ie. barter)
bool Function GetOffersServices(Actor akActor) global native

GetRider

  • Get the current rider of the mount
Actor Function GetRider(Actor akActor) global native

GetRunningPackage

  • Gets actual current package on actor, including internal packages used by the game (see Package)
Package Function GetRunningPackage(Actor akActor) global native

GetSkinRGB

int[] Function GetSkinRGB(Actor akActor) global native

GetTimeDead

  • How long the actor has been dead for
  • Returns 0.0 if actor is alive
float Function GetTimeDead(Actor akActor) global native

GetTimeOfDeath

  • Returns time of death in game days passed
float Function GetTimeOfDeath(Actor akActor) global native

GetVendorFaction

  • Get vendor faction of actor
Faction Function GetVendorFaction(Actor akActor) global native

HasActiveMagicEffect

  • HasMagicEffect but checks if the mgef is present on the actor (i.e active and not dispelled)
bool Function HasActiveMagicEffect(Actor akActor, MagicEffect akEffect) global native

HasActiveSpell

  • HasSpell but checks if the spell is present on the actor (i.e active and not dispelled)
bool Function HasActiveSpell(Actor akActor, Spell akSpell) global native

HasDeferredKill

  • Returns whether the actor is in deferred kill mode
bool Function HasDeferredKill(Actor akActor) global native

HasMagicEffectWithArchetype

  • Checks if activemagiceffect with given archetype is present on actor. See Magic Effect
bool Function HasMagicEffectWithArchetype(Actor akActor, String asArchetype) global native

HasSkin

  • Returns if the actor is naked or has armor showing skin
bool Function HasSkin(Actor akActor, Armor akArmorToCheck) global native

IsActorInWater

  • Returns whether the actor is in cell water or lava
bool Function IsActorInWater(Actor akActor) global native

IsActorUnderwater

bool Function IsActorUnderwater(Actor akActor) global native

IsLimbGone

Limb Value
None -1
Torso 0
Head 1
  • Returns whether limb is gone (i.e, the head)
bool Function IsLimbGone(Actor akActor, int aiLimb) global native

IsPowerAttacking

  • Is actor power attacking?
bool Function IsPowerAttacking(Actor akActor) global native

IsQuadruped

  • Is actor a quadruped?
bool Function IsQuadruped(Actor akActor) global native

IsSoulTrapped

  • Returns whether target is soul trapped / capable of being soul trapped successfully (if using mods that bypass vanilla soul trap system).
bool Function IsSoulTrapped(Actor akActor) global native

Setters

AddAllEquippedItemsToArray

Form[] Function AddAllEquippedItemsToArray(Actor akActor) global native

AddAllEquippedItemsBySlotToArray

Form[] Function AddAllEquippedItemsBySlotToArray(Actor akActor, int[] aiSlotsf) global native

AddBasePerk

  • Adds perks to the actorbase, works on leveled actors/unique NPCs.
  • Function serializes data to skse cosave, so perks are applied correctly on loading/reloading saves.
bool Function AddBasePerk(Actor akActor, Perk akPerk) global native

AddBaseSpell

  • Adds spells to actorbase
  • Function serializes data to skse cosave.
bool Function AddBaseSpell(Actor akActor, Spell akSpell) global native

ApplyPoisonToEquippedWeapon

  • Applies poison with specified dose to the equipped weapon. Weapon must not have poison applied (to modify existing poisons, see SetEquippedWeaponPoison)
bool Function ApplyPoisonToEquippedWeapon(Actor akActor, Potion akPoison, int aiCount, bool abLeftHand) global native

BlendColorWithSkinTone

Blend Modes
Mode Value
Darken 0
Multiply 1
ColorBurn 2
LinearBurn 3
DarkerColor 4
Lighten 5
Screen 6
ColorDodge 7
LinearDodge 8
LighterColor 9
Overlay 10
SoftLight 11
HardLight 12
VividLight 13
LinearLight 14
PinLight 15
HardMix 16
Difference 17
Exclusion 18
Subtract 19
Divide 20
  • Blends existing skin color with specified color, using photoshop blend formulas, with alpha (opacity).
  • If true, autoLuminance calculates skin tone relative luminance. The opacity value is then used as a multiplier on top of that, final value is clamped to 0-1
  • If false, only opacity will be used. Recommend to use autoluminance because colors will not blend well for all skin tones using flat values.
Function BlendColorWithSkinTone(Actor akActor, ColorForm akColor, int aiBlendMode, bool abAutoLuminance, float afOpacity) global native

DamageActorHealth

  • Damage actor health, passing an optional actor to blame.
  • Returns if the actor was damaged successfully.
Bool Function DamageActorHealth(Actor akActor, float afHealthDamage, Actor akSource) global native

DecapitateActor

  • Decapitates living and dead actors. Living actors will not die when this is called!
Function DecapitateActor(Actor akActor) global native

FreezeActor

Type Description
0 Disables AI (freeze in place)
1 Paralyze (Paralyze with stiff ragdoll)
Function FreezeActor(Actor akActor, int type, bool abFreeze) global native

KillNoWait

  • Quick and dirty hack to instantly kill the actor and set as dead.
Function KillNoWait(Actor akActor) global native

LaunchArrow

Type Description
-1 Uses node name or default weapon node if empty
0 Left hand node
1 Right hand node
2 Head node
  • Launch arrow from given node (with optional target and poison applied)
Function LaunchArrow(Actor akActor, Ammo akAmmo, Weapon akWeapon, String asNodeName = "", int aiSource = -1, ObjectReference akTarget = None, Potion akPoison = None) global native

LaunchSpell

Type Description
0 Left hand
1 Right hand
2 Voice
3 Instant
  • Launch spell projectile from casting source
Function LaunchSpell(Actor akActor, Spell akSpell, int aiSource) global native

RemovedAddedSpells

  • Batch added spell removal, filtered by optional mod name, and keyword array (matching any keyword or all of them)
Function RemoveAddedSpells(Actor akActor, String modName, Keyword[] keywords, bool abMatchAll) global native

RemoveArmorOfType

Function RemoveArmorOfType(Actor akActor, int aiArmorType, int[] aiSlotsToSkip, bool abEquippedOnly) global native

RemoveBasePerk

  • Perk effects may not be removed from unique actors, more testing required.
  • Function serializes data to skse cosave
bool Function RemoveBasePerk(Actor akActor, Perk akPerk) global native

RemoveBaseSpell

  • Function serializes data to skse cosave
bool Function RemoveBaseSpell(Actor akActor, Spell akSpell) global native

ReplaceArmorTextureSet

  • Replaces specified source textureset on worn armor with target textureset.
  • If texture type is -1, the entire textureset is replaced.
  • Otherwise the texture map specified at [textureType] index is replaced (diffuse is 0, normal is 1...)
Function ReplaceArmorTextureSet(Actor akActor, Armor akArmor, TextureSet akSourceTXST, TextureSet akTargetTXST, int aiTextureType = -1) global native

ReplaceFaceTextureset

  • Replaces face textureset. Can be applied to non-unique actors.
  • If texture type is -1, the entire textureset is replaced
  • Otherwise the texture map specified at [textureType] index is replaced.
  • Replacing the entire textureset may cause a visible neckseam.
Function ReplaceFaceTextureSet(Actor akActor, TextureSet akMaleTXST, TextureSet akFemaleTXST, int aiTextureType = -1) global native

ReplaceSkinTextureSet

  • Replaces skin textureset for given slotmask (ie. body/hand).
  • Has to be reapplied when re-equipping armor.
  • If texture type is -1, the entire textureset is replaced, otherwise the texture map specified at [textureType] index is replaced.
Function ReplaceSkinTextureSet(Actor akActor, TextureSet akMaleTXST, TextureSet akFemaleTXST, int aiSlotMask, int aiTextureType = -1) global native

ResetActor3DData

ExtraData Description
PO3_TINT resets tint, rebuilds facegen if actor is player
PO3_ALPHA resets skin alpha
PO3_TXST resets texture-sets with texturepaths containing folderName
PO3_TOGGLE unhides all children of nodes that were written to the extraData
PO3_SHADER recreates the original shader type (as close as possible, projectedUV params are not restored)
  • Checks if the following NiExtraData is present on the actor, and if so, resets it
  • Effect Shaders are also cleared
bool Function ResetActor3D(Actor akActor, String asFolderName) global native

SetActorRefraction

  • Ranges from 0.0 - 1.0
Function SetActorRefraction(Actor akActor, float afRefraction) global native

SetEquippedWeaponPoison

  • Set poison on equipped weapon (weapon must have poison already applied)
bool Function SetEquippedWeaponPoison(Actor akActor, Potion akPoison, bool abLeftHand) global native	

SetEquippedWeaponPoisonCount

  • Set poison dose on equipped weapon (weapon must have poison already applied)
bool Function SetEquippedWeaponPoisonCount(Actor akActor, int aiCount, bool abLeftHand) global native	

SetHairColor

*Changes may persist throughout gaming session, even when reloading previous saves.

Function SetHairColor(Actor akActor, ColorForm akColor) global native

SetHeadPartAlpha

  • See HeadPart
  • Doesn't work for some hair types and heterochromic eyes
Function SetHeadPartAlpha(Actor akActor, int aiPartType, float afAlpha) global native

SetHeadPartTextureSet

Function SetHeadPartTextureSet(Actor akActor, TextureSet headpartTXST, int aiType) global native

SetLinearVelocity

  • Sets actor velocity.
Function SetLinearVelocity(Actor akActor, float afX, float afY, float afZ) global native

SetLocalGravityActor

  • Sets actor gravity.
  • Negative values will cause them to fly.
Function SetLocalGravityActor(Actor akActor, float afValue, bool abDisableGravityOnGround) global native

SetSkinAlpha

  • Sets alpha on face, base skin form and armor meshes with visible skin.
  • Has to be re-applied when armor is un/re-equipped.
Function SetSkinAlpha(Actor akActor, float afAlpha) global native

SetSkinColor

  • Sets skin color (face and body).
  • Face shader is switched to FaceGenRGBTint to allow tint changes. Tintmasks will no longer work.
  • Has to be re-applied when armor is un/re-equipped.
Function SetSkinColor(Actor akActor, ColorForm akColor) global native

SetSoulTrapped

  • Sets the flag used by the game to determine soul trapped NPCs
Function SetSoulTrapped(Actor akActor, bool abTrapped) global native

ToggleHairWigs

  • Toggles any hair wigs (geometry with hair shader) found on slots Hair/LongHair
Function ToggleHairWigs(Actor akActor, bool abDisable) global native

UnequipAllOfType

Types Value
Light 0
Heavy 1
Clothing 2
  • Unequips all armor of type, optionally skipping biped slots.
Function UnequipAllOfType(Actor akActor, int afArmorType, int[] aiSlotsToSkip) global native

Deprecated

MixColorWithSkinTone (use BlendColorWithSkinTone)

  • Blends existing skin color with specified color.
  • True - intensity is manually calculated using percentage 0-1.0, False - automatically calculated using skin tone luminance
Function MixColorWithSkinTone(Actor akActor, ColorForm akColor, bool abManualMode, float afPercentage) global native

GetSkinColor (use GetSkinRGB)

ColorForm Function GetSkinColor(Actor akActor) global native

GetHairColor (use GetHairRGB)

  • Gets current hair color on actor.
  • Fails if hair headpart doesn't exist
ColorForm Function GetHairColor(Actor akActor) global native
⚠️ **GitHub.com Fallback** ⚠️