Background for Skyrim SE
Member of the Game script
FormfunctionGetForm(intaiFormID)NativeGlobal

Description

Wiki Description

Obtains the form specified by its form ID number.

Documentation Comment

Returns the form specified by the ID


Caveats

CK Wiki - Notes

  • Scripts should always be blind to the contents of data files, and rely on properties as the interface through which they access data from data files. As such, this function should only ever be used for debugging purposes.
  • As the FormID is intended to be a 32-bit unsigned integer and Papyrus uses signed integers, this function is not reliable for forms from higher-ordered mods. Specifically, any FormID with the MSB set (load order 0x80 and above) will fail to return a valid object.
  • This function cannot retrieve a temporary ObjectReference (one created at run-time, whose form ID starts with 0xFF) by form ID if that reference is not loaded.
  • In cases where this function would fail, you can use Game.GetFormEx(...) provided by SKSE.

Parameters

intaiFormID

CK Wiki Description

The form ID number of the form we want. (FormID proceeded by 0x) For example Form ID "0001DA07" is given as:0x0001DA07


Examples

; Obtain whatever form 0001DA07 is
Form someForm = Game.GetForm(0x0001DA07)

Auto-Generated Example

int myInt__aiFormID

Form returnedValue = Game.GetForm(myInt__aiFormID)

Related Pages


Additional References

View this function’s page on the Skyrim Creation Kit Wiki

Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.