From Creation Kit
Extends: Form Script
Script for the manipulation of leveled item base objects.
ScriptName LeveledItem extends Form
- AddForm(Form apForm, Int auiLevel, Int auiCount)
- Adds the given count of given form to the leveled list under the given level.
- Removes all script added forms from the leveled list.
SKSE Member Functions
- Int GetChanceNone()
- Returns the Chance of Getting None for the Leveled List.
- SetChanceNone(Int chance)
- Sets the Chance of Getting None for the Leveled List.
- GlobalVariable GetChanceGlobal()
- Returns the GlobalVariable(If used) used for calculating Chance None for the leveled list.
- SetChanceGlobal(GlobalVariable glob)
- Sets the GlobalVariable used for calculating Chance None for the leveled list.
- Int GetNumForms()
- Returns the number of Forms within the leveled list.
- Form GetNthForm(Int n)
- Returns the form at the specified index.
- Int GetNthLevel(Int n)
- Returns the List Level for the Form at the specified index
- SetNthLevel(Int n, Int level)
- Sets the list Level for the Form at the specified index to the specified amount.
- Int GetNthCount(Int n)
- Returns the count for the Form at the specified index.
- Int SetNthCount(Int n, Int count)
- Sets the count for the Form at the specified index
- List entries added via AddForm() do persist through a save and reload, and do not leak to other saves during the same play session.
- Conversely, SetChanceNone() and SetChanceGlobal() do not persist through a save and reload (so they must be manually restored on each reload), and they do leak to other saves during the same play session (the same way i.e. SetGoldValue() does).
- If a LeveledItem has a global variable defined for chance none (whether it's via SetChanceGlobal() or in the CK), the numeric chance none is ignored and only the global variable is considered.
- SetChanceNone() does not automatically clear SetChanceGlobal(), so you may have to explicitly call SetChanceGlobal(None) to ensure that a new numeric chance none takes effect.
- Revert() does remove all entries added via AddForm(), but (as of SKSE 1.7.1) does not revert the chance none (numeric or global)!