The Form script is a part of Skyrim SE’s Papyrus scripting ecosystem. It is included with the base game, and is extended/modified by modded sources such as Skyrim Script Extender x64 (SKSE).
For this script, the Papyrus index knows about:
- 19 events
- 62 functions
Inheritance Tree
| Script | Extended By | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| — | |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
|
Properties
No properties found.
Events
- eventOnAnimationEvent(ObjectReferenceakSource, stringasEventName)
Event called when the active magic effect/alias/form receives one of the animation events it was listening for.
- eventOnAnimationEventUnregistered(ObjectReferenceakSource, stringasEventName)
Received when one of the animation events we are listening for has been automatically unregistered by the game due to the target animation graph unloading. This event is not received when you manually unregister for the event.
- eventOnGainLOS(ActorakViewer, ObjectReferenceakTarget)
Event called when a viewer goes from not seeing the target, to seeing the target - if this active magic effect/alias/form is registered for it.
- eventOnLostLOS(ActorakViewer, ObjectReferenceakTarget)
Event called when a viewer goes from seeing the target, to not seeing the target - if this active magic effect/alias/form is registered for it.
- eventOnSleepStart(floatafSleepStartTime, floatafDesiredSleepEndTime)
Event called when the player goes to sleep - if this active magic effect/alias/form is registered for it.
- eventOnSleepStop(boolabInterrupted)
Event called when the player wakes up - if this active magic effect/alias/form is registered for it.
- eventOnTrackedStatsEvent(stringarStatName, intaiStatValue)
Event called when tracked stats are updated - if this active magic effect/alias/form is registered for it.
- eventOnUpdateGameTime()
Event called periodically in game time if the active magic effect/alias/form is registered for update events. This event will not be sent if the game is in menu mode.
- Found in:
- SKSE
eventOnKeyDown(intkeyCode)Listens for the pressing of keys whose Input have been registered via Form.RegisterForKey(...). (This event requires SKSE)
- Found in:
- SKSE
eventOnKeyUp(intkeyCode, floatholdTime)Listens for the release of keys whose Input have been registered via Form.RegisterForKey(...). (This event requires SKSE)
- Found in:
- SKSE
eventOnControlDown(stringcontrol)Listens for the pressing of game controls that have been registered via Form.RegisterForControl(...).
- Found in:
- SKSE
eventOnControlUp(stringcontrol, floatholdTime)Listens for the release of game controls that have been registered via Form.RegisterForControl(...).
- Found in:
- SKSE
eventOnMenuOpen(stringmenuName)Listens for opening of UI previously registered via Form.RegisterForMenu(...). (This function requires SKSE)
- Found in:
- SKSE
eventOnMenuClose(stringmenuName)Listens for closing of UI previously registered via Form.RegisterForMenu(...). (This function requires SKSE)
- Found in:
- SKSE
eventOnPlayerCameraState(intoldState, intnewState)Listens for camera state changes, for this event to be received the form must have been registered previously via Form.RegisterForCameraState().
- Found in:
- SKSE
eventOnCrosshairRefChange(ObjectReferenceref)Listens for target (See notes) changes of the crosshair, for this event to be received the form must have been registered previously via Form.RegisterForCrosshairRef().
Syntax
Event OnCrosshairRefChange(ObjectReference ref)Parameters
- ref: The ObjectReference that is targeted (Can be None).
Examples
Event OnInit() RegisterForCrosshairRef() EndEvent Event OnCrosshairRefChange(ObjectReference ref) If ref ;Used to determine if it's none or not. Debug.Trace("Crosshair had " + ref + " targeted.") EndIf EndEvent- Found in:
- SKSE
eventOnActorAction(intactionType, ActorakActor, Formsource, intslot)Listens for actor actions. For this event to be received, the form must have been registered previously via Form.RegisterForActorAction(...).
Syntax
Event OnActorAction(int actionType, Actor akActor, Form source, int slot)Parameters
-
actionType - The actionType that triggered the event (See Form.RegisterForActorAction(...) for a list of available action types).
-
akActor - The actor that triggered the event.
-
source - The Weapon or Spell that was used within the action.
-
slot - The slot of the source item. Valid Slots:
- 0 - Left Hand
- 1 - Right Hand
- 2 - Voice
Examples
Actor property PlayerRef auto Event OnInit() RegisterForActorAction(0);Register for melee swings. EndEvent Event OnActorAction(int actionType, Actor akActor, Form source, int slot) if akActor == PlayerRef If !source ;Hand to Hand does not have a form of its own so it will be none. If !slot ;Left Hand slot Debug.Trace("The player has swung their left fist.") Else Debug.Trace("The player has swung their right fist.") EndIf EndIf Endif EndEvent- Found in:
- SKSE
eventOnNiNodeUpdate(ObjectReferenceakActor)Event called when a NetImmerse node is updated.
Functions
Returns the value of this form in gold. If called on a form that doesn't have a value (like a quest), it will return -1.
Checks to see if the specified keyword is attached to this form.
Is the "Known" flag set for this form? This is used for MagicEffect, WordOfPower, and Enchantment.
Registers this active magic effect/alias/form for the specified Form.OnAnimationEvent(...) on the specified reference. The event will only go to the specific effect, alias, or form that registered and will not be relayed to attached aliases or effects.
Registers this active magic effect/alias/form to receive LOS (line-of-sight) events between the viewer and the target. Only the specific form, alias, or magic effect that registered will get the event - it will not be relayed to attached aliases or magic effects.
Registers this active magic effect/alias/form to receive a single Form.OnGainLOS(...). If the viewer is currently looking at the target, the event will be sent immediately. Only the specific form, alias, or magic effect that registered will get the event - it will not be relayed to attached aliases or magic effects.
Registers this active magic effect/alias/form to receive a single Form.OnLostLOS(...). If the viewer is not currently looking at the target, the event will be sent immediately. Only the specific form, alias, or magic effect that registered will get the event - it will not be relayed to attached aliases or magic effects.
Registers this form/alias/magic effect for a single Form.OnUpdate(). Which also means you don't need to call Form.UnregisterForUpdate() unless you want to cancel the update early. Only the specific form, alias, or magic effect that registered will get the event - it will not be relayed to attached aliases or magic effects.
Registers this active magic effect/alias/form to receive events when the player goes to sleep and when he wakes up. Only the specific form, alias, or magic effect that registered will get the event - it will not be relayed to attached aliases or magic effects.
Registers this active magic effect/alias/form to receive Form.OnTrackedStatsEvent(...) when tracked stats are updated. Only the specific form, alias, or magic effect that registered will get the event - it will not be relayed to attached aliases or magic effects.
Registers this active magic effect/alias/form for periodic Form.OnUpdate(). The interval is only counted when the game is not in menu mode. For example, you register for update every 5 seconds. 2 seconds go by and the player opens the menu for 10 seconds. Once the player puts the menu away, 3 more seconds will go by before your next update comes in. Only the specific form, alias, or magic effect that registered will get the event - it will not be relayed to attached aliases or magic effects.
Registers this active magic effect/alias/form for periodic Form.OnUpdateGameTime() in game time. Only the specific form, alias, or magic effect that registered will get the event - it will not be relayed to attached aliases or magic effects.
Registers this active magic effect/alias/form for a single Form.OnUpdateGameTime(). Of course, this means you don't need to call Form.UnregisterForUpdateGameTime(). Only the specific form, alias, or magic effect that registered will get the event - it will not be relayed to attached aliases or magic effects.
Starts profiling all scripts attached to this object until stopped. The profile files are stored in "<documents>/My Games/Skyrim/Logs/Script/Profiling". This will also cycle the older profiling logs (so log 0 becomes 1, 1 becomes 2, etc). If the object is already profiled nothing will change. Profiling requests are not saved and will be reset if you load a save game.
Stops profiling all scripts attached to this object until stopped. The profile files are stored in "<documents>/My Games/Skyrim/Logs/Script/Profiling". This will also cycle the older profiling logs (so log 0 becomes 1, 1 becomes 2, etc). If the object is not already profiled nothing will change.
Unregisters this active magic effect/alias/form from the specified Form.OnAnimationEvent(...) on the specified reference.
Unregisters this active magic effect/alias/form to stop receiving LOS events from between the viewer and the target.
Unregisters this active magic effect/alias/form from receiving sleep-related events.
Unregisters this active magic effect/alias/form from receiving Form.OnTrackedStatsEvent(...).
Unregisters this active magic effect/alias/form so it no longer receives Form.OnUpdate() triggered by a call to Form.RegisterForUpdate(...) or Form.RegisterForSingleUpdate(...).
Unregisters this active magic effect/alias/form so it no longer receives periodic game time Form.OnUpdateGameTime().
- Found in:
- SKSE
Sets the value of this form in gold. (This function requires SKSE)
- Found in:
- SKSE
Returns the number of keywords assigned to this form. (This function requires SKSE)
- Found in:
- SKSE
Returns the Nth keyword assigned to this form. (This function requires SKSE)
- Found in:
- SKSE
returns all keywords of the form
- Found in:
- SKSE
Checks to see if the specified keyword is attached to this form. (This function requires SKSE)
- Found in:
- SKSE
Sets whether the player knows this form
Should only be used for Magic Effects,
Words of Power, and Enchantments- Found in:
- SKSE
- Found in:
- SKSE
- Found in:
- SKSE
Registers the given Control for Form.OnControlDown(...) and Form.OnControlUp(...) events.
- Found in:
- SKSE
Unregisters the given control for Form.OnControlDown(...) and Form.OnControlUp(...) events after prior registration via Form.RegisterForControl(...).
- Found in:
- SKSE
Unregisters all controls for Form.OnControlDown(...) and Form.OnControlUp(...) events after prior registration via Form.RegisterForControl(...).
- Found in:
- SKSE
Registers the calling form to listen for the UI via Form.OnMenuOpen(...) and Form.OnMenuClose(...). (This function requires SKSE)
- Found in:
- SKSE
Unregisters the UI, previously registered with Form.RegisterForMenu(...). (This function requires SKSE)
- Found in:
- SKSE
Unregisters all UI previously registered with Form.RegisterForMenu(...). (This function requires SKSE)
- Found in:
- SKSE
Registers a custom event callback for given event name. Registrations have to be refreshed after each game load.
- Found in:
- SKSE
- Found in:
- SKSE
- Found in:
- SKSE
Sends custom event with given generic parameters.
- Found in:
- SKSE
Registers the calling form to listen for Camera state changes via Form.OnPlayerCameraState(...).
- Found in:
- SKSE
Unregisters the calling form for Camera state changes via Form.OnPlayerCameraState(...).
- Found in:
- SKSE
Registers the calling form to listen for target changes via Form.OnCrosshairRefChange(...).
- Found in:
- SKSE
Unregisters the calling form from listening to target changes via Form.OnCrosshairRefChange(...).
- Found in:
- SKSE
Registers the calling form to listen for the specified actor action via Form.OnActorAction(...).
Syntax
Function RegisterForActorAction(int actionType) NativeParameters
-
actionType - The following integers are valid:
- 0 - Weapon Swing (Melee weapons that are swung including Hand to Hand.)
- 1 - Spell Cast (Spells and staves).
- 2 - Spell Fire (Spells and staves).
- 3 - Voice Cast.
- 4 - Voice Fire.
- 5 - Bow Draw.
- 6 - Bow Release.
- 7 - Draw Begin.
- 8 - Draw End.
- 9 - Sheathe Begin.
- 10 - Sheathe End.
Examples
RegisterforActorAction(0) ; Registers the form for Weapon Swings- Found in:
- SKSE
Unregisters the calling form from listening for the specified actor action via Form.OnActorAction(...).
Syntax
Function UnregisterForActorAction(int actionType) NativeExamples
UnregisterforActorAction(4);Unregisters the form for Voice Fire.- Found in:
- SKSE
Registers for the NiNodeUpdate event.
- Found in:
- SKSE
Unregisters for the NiNodeUpdate event.
- Found in:
- SKSE
Returns whether this Form has a World Model (fast)
- Found in:
- SKSE
Returns the world model path of this Form, if it has a world model
- Found in:
- SKSE
Sets the world model of the form. (This function requires SKSE)
- Found in:
- SKSE
Returns the number of texture sets the world model has, if its textures can be swapped
- Found in:
- SKSE
Returns the Nth texture set of the world model, if the textures can be swapped
- Found in:
- SKSE
Sets the world models Nth texture set, if the textures can be set
- Found in:
- SKSE
Returns whether this Form is playable, only applied to Forms with the playable flag
