-
Notifications
You must be signed in to change notification settings - Fork 19
Actor
powerof3 edited this page Jun 9, 2025
·
15 revisions
- Gets all magiceffects currently on the actor. Filters out inactive and hideinui spells.
MagicEffect[] Function GetActiveEffects(Actor akActor, bool abShowInactive = false) global nativefloat Function GetActorAlpha(Actor akActor) global native| 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 nativefloat Function GetActorRefraction(Actor akActor) global native| 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- Gets actor soul size
int Function GetActorSoulSize(Actor akActor) global native| Type | Value |
|---|---|
| Permanent | 0 |
| Temporary | 1 |
| Damage | 2 |
float Function GetActorValueModifier(Actor akActor, int aiModifier, String asActorValue) global native- Get all spells (not abilities) on the actor
Spell[] Function GetAllActorPlayableSpells(Actor akActor) global native- See SetCriticalStage
int Function GetCriticalStage(Actor akActor) global nativeActor[] Function GetCombatAllies(Actor akActor) global nativeActor[] Function GetCombatTargets(Actor akActor) global native- Gets all summons commanded by this actor
Actor[] Function GetCommandedActors(Actor akActor) global native- Gets the owner of summoned actor
Actor Function GetCommandingActor(Actor akActor) global nativeAmmo Function GetEquippedAmmo(Actor akActor) global nativeEnchantment Function GetEquippedAmmoEnchantment(Actor akActor) global native- Checks if the equipped weapon is poisoned
bool Function GetEquippedWeaponIsPoisoned(Actor akActor, bool abLeftHand) global native Potion Function GetEquippedWeaponPoison(Actor akActor, bool abLeftHand) global native - Gets poison dose on equipped weapon
int Function GetEquippedWeaponPoisonCount(Actor akActor, bool abLeftHand) global native - Gets weight of all equipped items.
float Function GetEquippedWeight(Actor akActor) global native int[] Function GetHairRGB(Actor akActor) global nativeTextureSet Function GetHeadPartTextureSet(Actor akActor, int aiType) global native- Gets the actor's current gravity.
Float Function GetLocalGravityActor(Actor akActor) global native- Get the mount that the actor is riding
Actor Function GetMount(Actor akActor) global native- 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- Returns true if the actor is offering services (ie. barter)
bool Function GetOffersServices(Actor akActor) global native- Get the current rider of the mount
Actor Function GetRider(Actor akActor) global native- Gets actual current package on actor, including internal packages used by the game (see Package)
Package Function GetRunningPackage(Actor akActor) global nativeint[] Function GetSkinRGB(Actor akActor) global native- How long the actor has been dead for
- Returns 0.0 if actor is alive
float Function GetTimeDead(Actor akActor) global native- Returns time of death in game days passed
float Function GetTimeOfDeath(Actor akActor) global native- Get vendor faction of actor
Faction Function GetVendorFaction(Actor akActor) global native- 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- 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- Returns whether the actor is in deferred kill mode
bool Function HasDeferredKill(Actor akActor) global native- Checks if activemagiceffect with given archetype is present on actor. See Magic Effect
bool Function HasMagicEffectWithArchetype(Actor akActor, String asArchetype) global native- Returns if the actor is naked or has armor showing skin
bool Function HasSkin(Actor akActor, Armor akArmorToCheck) global native- Returns whether the actor is in cell water or lava
bool Function IsActorInWater(Actor akActor) global nativebool Function IsActorUnderwater(Actor akActor) global native| 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- Is actor power attacking?
bool Function IsPowerAttacking(Actor akActor) global native- Is actor a quadruped?
bool Function IsQuadruped(Actor akActor) global native- 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 nativeForm[] Function AddAllEquippedItemsToArray(Actor akActor) global nativeForm[] Function AddAllEquippedItemsBySlotToArray(Actor akActor, int[] aiSlotsf) global native- 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- Adds spells to actorbase
- Function serializes data to skse cosave.
bool Function AddBaseSpell(Actor akActor, Spell akSpell) global native- 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 nativeBlend 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- 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- Decapitates living and dead actors. Living actors will not die when this is called!
Function DecapitateActor(Actor akActor) global native| Type | Description |
|---|---|
| 0 | Disables AI (freeze in place) |
| 1 | Paralyze (Paralyze with stiff ragdoll) |
Function FreezeActor(Actor akActor, int type, bool abFreeze) global native- Quick and dirty hack to instantly kill the actor and set as dead.
Function KillNoWait(Actor akActor) global native| 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| 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- 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 nativeFunction RemoveArmorOfType(Actor akActor, int aiArmorType, int[] aiSlotsToSkip, bool abEquippedOnly) global native- 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- Function serializes data to skse cosave
bool Function RemoveBaseSpell(Actor akActor, Spell akSpell) global native- 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- 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- 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| 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- Ranges from 0.0 - 1.0
Function SetActorRefraction(Actor akActor, float afRefraction) global native- Set poison on equipped weapon (weapon must have poison already applied)
bool Function SetEquippedWeaponPoison(Actor akActor, Potion akPoison, bool abLeftHand) global native - Set poison dose on equipped weapon (weapon must have poison already applied)
bool Function SetEquippedWeaponPoisonCount(Actor akActor, int aiCount, bool abLeftHand) global native *Changes may persist throughout gaming session, even when reloading previous saves.
Function SetHairColor(Actor akActor, ColorForm akColor) global native- See HeadPart
- Doesn't work for some hair types and heterochromic eyes
Function SetHeadPartAlpha(Actor akActor, int aiPartType, float afAlpha) global native- See HeadPart
Function SetHeadPartTextureSet(Actor akActor, TextureSet headpartTXST, int aiType) global native- Sets actor velocity.
Function SetLinearVelocity(Actor akActor, float afX, float afY, float afZ) global native- Sets actor gravity.
- Negative values will cause them to fly.
Function SetLocalGravityActor(Actor akActor, float afValue, bool abDisableGravityOnGround) global native- 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- Sets skin color (face and body).
- Face shader is switched to
FaceGenRGBTintto 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- Sets the flag used by the game to determine soul trapped NPCs
Function SetSoulTrapped(Actor akActor, bool abTrapped) global native- Toggles any hair wigs (geometry with hair shader) found on slots Hair/LongHair
Function ToggleHairWigs(Actor akActor, bool abDisable) global native| 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- 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 nativeColorForm Function GetSkinColor(Actor akActor) global native- Gets current hair color on actor.
- Fails if hair headpart doesn't exist
ColorForm Function GetHairColor(Actor akActor) global native