Background for Skyrim SE
Member of the LeveledItem script
voidfunctionAddForm(FormapForm, intaiLevel, intaiCount)Native

Description

Wiki Description

Adds the given form to the leveled list.

Documentation Comment

Adds the given count of the given form to the under the given level in this leveled list


Caveats

CK Wiki - Notes

  • In previous versions of Skyrim, this function did not work correctly. As of Skyrim 1.9.32.0.8, it works as described above.
  • Users may experience merchants that do not sell items added to LeveledItems used by that merchant using this function. This is usually because the player has spoken to the merchant in the recent past (within the last 48 hours); LeveledItem lists are evaluated when the player views that merchant's merchandise, and the items added to the LeveledItem list will not be available until the merchant resets their merchandise again. The items added to the LeveledItem list by this function should become available after the player waits 48 hours in-game. Another way of forcing the merchant to update their merchandise is to quicksave, then attack them, and quick load. This should make them reset their merchandise when you talk to them again.
  • A leveled list can only have up to 255 entries, including both CK-defined entries and entries added by Papyrus.

Parameters

FormapForm

CK Wiki Description

Form to add to the leveled list

intaiLevel

CK Wiki Description

Level to add form under

intaiCount

CK Wiki Description

Number of items to add


Examples

; Add 2 axes to the list at level 5
CoolItems.AddForm(Axe, 5, 2)


; Add 1 leveled list to the list at level 5
CoolItemsLeveledList.AddForm(OtherCoolItemsLeveledList, 5, 1)

Auto-Generated Example

Form myForm__apForm
int myInt__aiLevel
int myInt__aiCount

myLeveledItem__toCallFunctionOn.AddForm(myForm__apForm, myInt__aiLevel, myInt__aiCount)

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.