-
Notifications
You must be signed in to change notification settings - Fork 20
Form
powerof3 edited this page Jun 9, 2025
·
7 revisions
- Evaluates condition lists for spells/potions/enchantments/mgefs and returns if they can be fullfilled
bool Function EvaluateConditionList(Form akForm, ObjectReference akActionRef, ObjectReference akTargetRef) global nativeFunction ClearRecordFlag(Form akForm, int aiFlag) global native- Builds a list of conditions present on the form. Index is for spells/other forms that have lists with conditions
- Some conditions may be skipped (conditions that require non player references, overly complex conditions involving packages/aliases)
String[] Function GetConditionList(Form akForm, int aiIndex = 0) global native- Gets form description text, if any
String Function GetDescription(Form akForm) global native- Get form editorID
- Requires powerofthree's Tweaks
String Function GetFormEditorID(Form akForm) global native- Get name of the mod the form originates from (or was last modified by)
String Function GetFormModName(Form akForm, bool abLastModified) global native- Get all non-base scripts attached to this form
String[] Function GetScriptsAttachedToForm(Form akForm) global native- Returns whether the form is part of mod
bool Function IsFormInMod(Form akForm, String asModName) global native- Returns whether the form is temporary (ie. has a formID beginning with FF)
bool Function IsGeneratedForm(Form akForm) global nativebool Function IsRecordFlagSet(Form akForm, int aiFlag) global native- returns whether the form has script attached. If scriptName is empty, it will return if the form has any non-base scripts attached
bool Function IsScriptAttachedToForm(Form akForm, String asScriptName) global native- Adds keyword to form. Fails if the form doesn't accept keywords.
Function AddKeywordToForm(Form akForm, Keyword akKeyword) global native- Favorites item (must be in inventory) or spell/shout
Function MarkItemAsFavorite(Form akForm) global native- Replaces given keyword with new one on form. Only lasts for a single gaming session. [ported from DienesTools].
Function ReplaceKeywordOnForm(Form akForm, Keyword akKeywordAdd, Keyword akKeywordRemove) global native- Removes keyword from form.
bool Function RemoveKeywordOnForm(Form akForm, Keyword akKeyword) global native- Removes conditions on the form that were found in the condition list . This is not serialized.
- Index is for spell/magic item effects
Function RemoveConditionList(Form akForm, int aiIndex, string[] asConditionList) global native- Append the condition list to this form. This is not serialized.
- Index is for spell/magic item effects
Function SetConditionList(Form akForm, int aiIndex, string[] asConditionList) global native- Set record flag
Function SetRecordFlag(Form akForm, int aiFlag) global native- Unfavorites item (must be in inventory) or spell/shout
Function UnmarkItemAsFavorite(Form akForm) global nativeCalled from PO3_Events_Form script. Script using these events must extend Form
- Fires when the actor falls enough distance to take fall damage
- Script must extend
ObjectReferencein order to recieve this event
Function RegisterForActorFallLongDistance(Form akForm) global native
Function UnregisterForActorFallLongDistance(Form akForm) global native
Event OnActorFallLongDistance(Actor akTarget, float afFallDistance, float afFallDamage)
EndEventFunction RegisterForActorKilled(Form akForm) global native
Function UnregisterForActorKilled(Form akForm) global native
Event OnActorKilled(Actor akVictim, Actor akKiller)
EndEvent-
Startfires when actor is reanimated andStopwhen reanimate effect is dispelled - Script must extend
ObjectReferencein order to recieve this event
Function RegisterForActorReanimateStart(Form akForm) global native
Function UnregisterForActorReanimateStart(Form akForm) global native
Function RegisterForActorReanimateStop(Form akForm) global native
Function UnregisterForActorReanimateStop(Form akForm) 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
- Script must extend
ObjectReferencein order to recieve this event
Function RegisterForActorResurrected(Form akForm) global native
Function UnregisterForActorResurrected(Form akForm) global native
Event OnActorResurrected(Actor akTarget, bool abResetInventory)
EndEventFunction RegisterForBookRead(Form akForm) global native
Function UnregisterForBookRead(Form akForm) global native
Event OnBookRead(Book akBook)
EndEvent- Can fire multiple times in exteriors, for each cell that is fully loaded.
Function RegisterForCellFullyLoaded(Form akForm) global native
Function UnregisterForCellFullyLoaded(Form akForm) global native
Event OnCellFullyLoaded(Cell akCell)
EndEvent- Player only event
Function RegisterForCriticalHit(Form akForm) global native
Function UnregisterForCriticalHit(Form akForm) global native
Event OnCriticalHit(Actor akAggressor, Weapon akWeapon, bool abSneakHit)
EndEventFunction RegisterForDisarmed(Form akForm) global native
Function UnregisterForDisarmed(Form akForm) global native
Event OnDisarmed(Actor akSource, Weapon akTarget)
EndEventFunction RegisterForDragonSoulGained(Form akForm) global native
Function UnregisterForDragonSoulGained(Form akForm) global native
Event OnDragonSoulGained(float afSouls)
EndEvent- Registers for hit events provided they match the filters (or not)
- Script must extend
ObjectReferencein order to recieve this event - See Fallout 4's RegisterForHitEvent for parameter definitions (Aliases are not allowed, only forms)
-
akAggressorFilteralso accepts race
Function RegisterForHitEventEx(Form akForm, 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(Form akForm, 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(Form akForm) global native
Event OnHitEx(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)
EndEvent- Player only event
Function RegisterForItemCrafted(Form akForm) global native
Function UnregisterForItemCrafted(Form akForm) global native
Event OnItemCrafted(ObjectReference akBench, Location akLocation, Form akCreatedItem)
EndEvent- Player only event
Function RegisterForItemHarvested(Form akForm) global native
Function UnregisterForItemHarvested(Form akForm) global native
Event OnItemHarvested(Form akProduce)
EndEventFunction RegisterForLevelIncrease(Form akForm) global native
Function UnregisterForLevelIncrease(Form akForm) global native
Event OnLevelIncrease(int aiLevel)
EndEventFunction RegisterForLocationDiscovery(Form akForm) global native
Function UnregisterForLocationDiscovery(Form akForm) global native
Event OnLocationDiscovery(String asRegionName, String asWorldspaceName)
EndEvent- Script must extend
ObjectReferencein order to recieve this event -
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(Form akForm, Form akEffectFilter, bool abMatch) global native
Function UnregisterForMagicEffectApplyEx(Form akForm, Form akEffectFilter, bool abMatch) global native
Function UnregisterForAllMagicEffectApplyEx(Form akForm) 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(Form akForm) global native
Function UnregisterForObjectGrab(Form akForm) global native
Event OnObjectGrab(ObjectReference akObjectRef)
EndEvent
Event OnObjectRelease(ObjectReference akObjectRef)
EndEvent- Not all objects fire this event. It is somewhat inconsistent.
Function RegisterForObjectLoaded(Form akForm, int formType) global native
Function UnregisterForObjectLoaded(Form akForm, int formType) global native
Function UnregisterForAllObjectsLoaded(Form akForm) global native
Event OnObjectLoaded(ObjectReference akRef, int aiFormType)
EndEvent
Event OnObjectUnloaded(ObjectReference akRef, int aiFormType)
EndEvent- Event OnHit except weapons only AND the aggressor recieves this event for each target hit by it
- Script must extend
ObjectReferencein order to recieve this event - 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(Form akForm) global native
Function UnregisterForWeaponHit(Form akForm) 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
- Script must extend
ObjectReferencein order to recieve this event
Function RegisterForMagicHit(Form akForm) global native
Function UnregisterForMagicHit(Form akForm) 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
- Script must extend
ObjectReferencein order to recieve this event
Function RegisterForProjectileHit(Form akForm) global native
Function UnregisterForProjectileHit(Form akForm) global native
Event OnProjectileHit(ObjectReference akTarget, Form akSource, Projectile akProjectile)
EndEventFunction RegisterForQuest(Form akForm, Quest akQuest) global native
Function UnregisterForQuest(Form akForm, Quest akQuest) global native
Function UnregisterForAllQuests(Form akForm) global native
Event OnQuestStart(Quest akQuest)
EndEvent
Event OnQuestStop(Quest akQuest)
EndEventFunction RegisterForQuestStage(Form akForm, Quest akQuest) global native
Function UnregisterForQuestStage(Form akForm, Quest akQuest) global native
Function UnregisterForAllQuestStages(Form akForm) global native
Event OnQuestStageChange(Quest akQuest, Int aiNewStage)
EndEvent- Player only event
Function RegisterForShoutAttack(Form akForm) global native
Function UnregisterForShoutAttack(Form akForm) 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(Form akForm) global native
Function UnregisterForSkillIncrease(Form akForm) 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(Form akForm) global native
Function UnregisterForSoulTrapped(Form akForm) global native
Event OnSoulTrapped(Actor akVictim, Actor akKiller)
EndEvent- Event is disabled in AE due to crashes
Function RegisterForSpellLearned(Form akForm) global native
Function UnregisterForSpellLearned(Form akForm) global native
Event OnSpellLearned(Spell akSpell)
EndEventFunction RegisterForWeatherChange(Form akForm) global native
Function UnregisterForWeatherChange(Form akForm) global native
Event OnWeatherChange(Weather akOldWeather, Weather akNewWeather)
EndEvent