-
Notifications
You must be signed in to change notification settings - Fork 24
Active Effect
powerof3 edited this page Jun 13, 2025
·
14 revisions
- Returns the spell or form responsible for this active effect
Form Function GetActiveEffectSpell(ActiveMagicEffect akActiveEffect) global native- Returns all scripts attached to this active effect.
String[] Function GetScriptsAttachedToActiveEffect(ActiveMagicEffect akActiveEffect) global native- Returns whether the activeEffect has script attached. If scriptName is empty, it will return if the activeEffect has any non-base scripts attached
bool Function IsScriptAttachedToActiveEffect(ActiveMagicEffect akActiveEffect, String asScriptName) global nativeCalled from PO3_Events_AME script. Script using these events must extend ActiveMagicEffect
- Fires when the actor falls enough distance to take fall damage
Function RegisterForActorFallLongDistance(ActiveMagicEffect akActiveEffect) global native
Function UnregisterForActorFallLongDistance(ActiveMagicEffect akActiveEffect) global native
Event OnActorFallLongDistance(Actor akTarget, float afFallDistance, float afFallDamage)
EndEventFunction RegisterForActorKilled(ActiveMagicEffect akActiveEffect) global native
Function UnregisterForActorKilled(ActiveMagicEffect akActiveEffect) global native
Event OnActorKilled(Actor akVictim, Actor akKiller)
EndEvent-
Startfires when actor is reanimated andStopwhen the reanimate effect is dispelled
Function RegisterForActorReanimateStart(ActiveMagicEffect akActiveEffect) global native
Function UnregisterForActorReanimateStart(ActiveMagicEffect akActiveEffect) global native
Function RegisterForActorReanimateStop(ActiveMagicEffect akActiveEffect) global native
Function UnregisterForActorReanimateStop(ActiveMagicEffect akActiveEffect) global native
Event OnActorReanimateStart(Actor akTarget, Actor akCaster)
EndEvent
Event OnActorReanimateStop(Actor akTarget, Actor akCaster)
EndEvent- Fires when the target has been resurrected via script or console command
Function RegisterForActorResurrected(ActiveMagicEffect akActiveEffect) global native
Function UnregisterForActorResurrected(ActiveMagicEffect akActiveEffect) global native
Event OnActorResurrected(Actor akTarget, bool abResetInventory)
EndEventFunction RegisterForBookRead(ActiveMagicEffect akActiveEffect) global native
Function UnregisterForBookRead(ActiveMagicEffect akActiveEffect) global native
Event OnBookRead(Book akBook)
EndEvent- Can fire multiple times in exteriors, for each cell that is fully loaded.
Function RegisterForCellFullyLoaded(ActiveMagicEffect akActiveEffect) global native
Function UnregisterForCellFullyLoaded(ActiveMagicEffect akActiveEffect) global native
Event OnCellFullyLoaded(Cell akCell)
EndEvent- Player only event
Function RegisterForCriticalHit(ActiveMagicEffect akActiveEffect) global native
Function UnregisterForCriticalHit(ActiveMagicEffect akActiveEffect) global native
Event OnCriticalHit(Actor akAggressor, Weapon akWeapon, bool abSneakHit)
EndEventFunction RegisterForDisarmed(ActiveMagicEffect akActiveEffect) global native
Function UnregisterForDisarmed(ActiveMagicEffect akActiveEffect) global native
Event OnDisarmed(Actor akSource, Weapon akTarget)
EndEventFunction RegisterForDragonSoulGained(ActiveMagicEffect akActiveEffect) global native
Function UnregisterForDragonSoulGained(ActiveMagicEffect akActiveEffect) global native
Event OnDragonSoulGained(float afSouls)
EndEvent- Registers for hit events provided they match the filters (or not)
- See Fallout 4's RegisterForHitEvent for parameter definitions (Aliases are not allowed, only forms)
-
akAggressorFilteralso accepts race
Function RegisterForHitEventEx(ActiveMagicEffect akActiveEffect, Form akAggressorFilter = None, Form akSourceFilter = None, Form akProjectileFilter = None, int aiPowerFilter = -1, int aiSneakFilter = -1, int aiBashFilter = -1, int aiBlockFilter = -1, bool abMatch = true) global native
Function UnregisterForHitEventEx(ActiveMagicEffect akActiveEffect, Form akAggressorFilter = None, Form akSourceFilter = None, Form akProjectileFilter = None, int aiPowerFilter = -1, int aiSneakFilter = -1, int aiBashFilter = -1, int aiBlockFilter = -1, bool abMatch = true) global native
Function UnregisterForAllHitEventsEx(ActiveMagicEffect akActiveEffect) global native
Event OnHitEx(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
EndEvent- Player only event
Function RegisterForItemCrafted(ActiveMagicEffect akActiveEffect) global native
Function UnregisterForItemCrafted(ActiveMagicEffect akActiveEffect) global native
Event OnItemCrafted(ObjectReference akBench, Location akLocation, Form akCreatedItem)
EndEvent- Player only event
Function RegisterForItemHarvested(ActiveMagicEffect akActiveEffect) global native
Function UnregisterForItemHarvested(ActiveMagicEffect akActiveEffect) global native
Event OnItemHarvested(Form akProduce)
EndEventFunction RegisterForLevelIncrease(ActiveMagicEffect akActiveEffect) global native
Function UnregisterForLevelIncrease(ActiveMagicEffect akActiveEffect) global native
Event OnLevelIncrease(int aiLevel)
EndEventFunction RegisterForLocationDiscovery(ActiveMagicEffect akActiveEffect) global native
Function UnregisterForLocationDiscovery(ActiveMagicEffect akActiveEffect) global native
Event OnLocationDiscovery(String asRegionName, String asWorldspaceName)
EndEvent-
akEffectFilter: matching magic effect, keyword, or a formlist containing keywords/magic effects. Filter can be NONE (but then it'll be the same as a regular OnMagicApply event) -
abMatch: if true, the filter must match the hit, if false it must NOT match it (inverted filter) -
bAppliedwill return if the magic effect was successfully applied or not
Function RegisterForMagicEffectApplyEx(ActiveMagicEffect akActiveEffect, Form akEffectFilter, bool abMatch) global native
Function UnregisterForMagicEffectApplyEx(ActiveMagicEffect akActiveEffect, Form akEffectFilter, bool abMatch) global native
Function UnregisterForAllMagicEffectApplyEx(ActiveMagicEffect akActiveEffect) global native
Event OnMagicEffectApplyEx(ObjectReference akCaster, MagicEffect akEffect, Form akSource, bool abApplied)
EndEvent- Doesn't work with telekinesis and when the player grabs the same object in a row
Function RegisterForObjectGrab(ActiveMagicEffect akActiveEffect) global native
Function UnregisterForObjectGrab(ActiveMagicEffect akActiveEffect) global native
Event OnObjectGrab(ObjectReference akObjectRef)
EndEvent
Event OnObjectRelease(ObjectReference akObjectRef)
EndEvent- Not all objects fire this event. It is somewhat inconsistent.
Function RegisterForObjectLoaded(ActiveMagicEffect akActiveEffect, int formType) global native
Function UnregisterForObjectLoaded(ActiveMagicEffect akActiveEffect, int formType) global native
Function UnregisterForAllObjectsLoaded(ActiveMagicEffect akActiveEffect) global native
Event OnObjectLoaded(ObjectReference akRef, int aiFormType)
EndEvent
Event OnObjectUnloaded(ObjectReference akRef, int aiFormType)
EndEvent- Event OnHit except weapons only AND the aggressor receives this event for each target hit by it
- Use SKSE's
LogicalAndto check if hit flag is set - Statics have no hit flags (0)
| Hit Flags | Values |
|---|---|
| kBlocked | 1 |
| kBlockWithWeapon | 2 |
| kBlockCandidate | 4 |
| kCritical | 8 |
| kCriticalOnDeath | 16 |
| kFatal | 32 |
| kDismemberLimb | 64 |
| kExplodeLimb | 128 |
| kCrippleLimb | 256 |
| kDisarm | 512 |
| kDisableWeapon | 1024 |
| kSneakAttack | 2048 |
| kIgnoreCritical | 4096 |
| kPredictDamage | 8192 |
| kBash | 16384 |
| kTimedBash | 32768 |
| kPowerAttack | 65536 |
| kMeleeAttack | 262144 |
| kRicochet | 524288 |
| kExplosion | 1048576 |
Function RegisterForWeaponHit(ActiveMagicEffect akActiveEffect) global native
Function UnregisterForWeaponHit(ActiveMagicEffect akActiveEffect) global native
Event OnWeaponHit(ObjectReference akTarget, Form akSource, Projectile akProjectile, Int aiHitFlagMask)
EndEvent- Event OnHit except for magic AND aggressor recieves this event for each target hit by it
Function RegisterForMagicHit(ActiveMagicEffect akActiveEffect) global native
Function UnregisterForMagicHit(ActiveMagicEffect akActiveEffect) global native
Event OnMagicHit(ObjectReference akTarget, Form akSource, Projectile akProjectile)
EndEvent- Event OnHit except for projectiles AND the aggressor recieves this event for each target hit by it
Function RegisterForProjectileHit(ActiveMagicEffect akActiveEffect) global native
Function UnregisterForProjectileHit(ActiveMagicEffect akActiveEffect) global native
Event OnProjectileHit(ObjectReference akTarget, Form akSource, Projectile akProjectile)
EndEventFunction RegisterForQuest(ActiveMagicEffect akActiveEffect, Quest akQuest) global native
Function UnregisterForQuest(ActiveMagicEffect akActiveEffect, Quest akQuest) global native
Function UnregisterForAllQuests(ActiveMagicEffect akActiveEffect) global native
Event OnQuestStart(Quest akQuest)
EndEvent
Event OnQuestStop(Quest akQuest)
EndEventFunction RegisterForQuestStage(ActiveMagicEffect akActiveEffect, Quest akQuest) global native
Function UnregisterForQuestStage(ActiveMagicEffect akActiveEffect, Quest akQuest) global native
Function UnregisterForAllQuestStages(ActiveMagicEffect akActiveEffect) global native
Event OnQuestStageChange(Quest akQuest, Int aiNewStage)
EndEvent- Player only event
Function RegisterForShoutAttack(ActiveMagicEffect akActiveEffect) global native
Function UnregisterForShoutAttack(ActiveMagicEffect akActiveEffect) global native
Event OnPlayerShoutAttack(Shout akShout)
EndEvent- 4.5.6 - Event had its params changed from String to Int as a workaround for only the first registered event recieving any events
- See Actor Values for list of skills
Function RegisterForSkillIncrease(ActiveMagicEffect akActiveEffect) global native
Function UnregisterForSkillIncrease(ActiveMagicEffect akActiveEffect) global native
Event OnSkillIncrease(Int aiSkill)
EndEvent- Event will fire after OnDying/OnDeath
- Will not fire if using mods that bypass vanilla soul trap method
Function RegisterForSoulTrapped(ActiveMagicEffect akActiveEffect) global native
Function UnregisterForSoulTrapped(ActiveMagicEffect akActiveEffect) global native
Event OnSoulTrapped(Actor akVictim, Actor akKiller)
EndEvent- Event is disabled in AE due to crashes
Function RegisterForSpellLearned(ActiveMagicEffect akActiveEffect) global native
Function UnregisterForSpellLearned(ActiveMagicEffect akActiveEffect) global native
Event OnSpellLearned(Spell akSpell)
EndEventFunction RegisterForWeatherChange(ActiveMagicEffect akActiveEffect) global native
Function UnregisterForWeatherChange(ActiveMagicEffect akActiveEffect) global native
Event OnWeatherChange(Weather akOldWeather, Weather akNewWeather)
EndEvent