Background for Skyrim SE

SPE_Utility


Inheritance Tree

No indexed scripts extend this script.

Properties
Events
Functions
Form[]functionFilterFormsByKeyword(Form[]akForm, Keyword[]akKeywords, boolabMatchAll, boolabInvert)NativeGlobal

Remove any form that does not contain any of the given keywords
if abMatchAll is true, only forms that contain all keywords are returned
if abInvert is true, only forms that do not contain any of the keywords are returned

Form[]functionFilterFormsByGoldValue(Form[]akForm, intaiGoldThreshold, boolabGreater, boolabEqual)NativeGlobal

Remove any form whichs gold value is less than the given threshold (xor greater if abGreater, or equal if abEqual)

Armor[]functionFilterBySlot(Form[]akForm, int[]aiSlots, boolabMatchAll)NativeGlobal

Remove any which do not use any of the given slots. If abMatchAll is true, only forms that use all slots are returned

Armor[]functionFilterBySlotmask(Form[]akForm, intaiSlotMask, boolabMatchAll)NativeGlobal
voidfunctionShuffle_Int(int[]arr)NativeGlobal

Randomly reorder every element in the array, the array is modified in-place

voidfunctionShuffle_Float(float[]arr)NativeGlobal
voidfunctionShuffle_String(string[]arr)NativeGlobal
boolfunctionSort_Int(int[]arr, stringlua)NativeGlobal

Sort arr using a comparison function: "compare(a, b)" in place, the array is modified in-place, returns true on success
Example: Sort_Int(arr, "function compare(a, b) return a <= b end") would sort arr in descending order
"lua" can also be a filepath to a .lua file containing the function, relative to Skyrim.exe

boolfunctionSort_Float(float[]arr, stringlua)NativeGlobal
boolfunctionSort_String(string[]arr, stringlua)NativeGlobal
intfunctionFindIf_Int(int[]arr, stringlua)NativeGlobal

Find the first element satisfying the function "predicate(a)"
Returns the index of the element, -1 if no such element exists, -2 if an error occursed
Example: FindIf_Int(arr, "function predicate(a) return a > 5 end") returns the index of the first element > 5
"lua" can also be a filepath to a .lua file containing the function, relative to Skyrim.exe

intfunctionFindIf_Float(float[]arr, stringlua)NativeGlobal
intfunctionFindIf_String(string[]arr, stringlua)NativeGlobal
int[]functionRemoveIf_Int(int[]arr, stringlua)NativeGlobal

Remove all occurences satisfying the predicate function, return the filtered array
Example: RemoveIf_Int(arr, "function predicate(a) return a > 5 end") removes all elements that are > 5
"lua" can also be a filepath to a .lua file containing the function, relative to Skyrim.exe

float[]functionRemoveIf_Float(float[]arr, stringlua)NativeGlobal
string[]functionRemoveIf_String(string[]arr, stringlua)NativeGlobal
Form[]functionFilterArray_Form(Form[]arr, Form[]filter)NativeGlobal

Remove any objects from arr that are present in filter, return the filtered array

int[]functionFilterArray_Int(int[]arr, int[]filter)NativeGlobal
float[]functionFilterArray_Float(float[]arr, float[]filter)NativeGlobal
string[]functionFilterArray_String(string[]arr, string[]filter)NativeGlobal
Form[]functionIntersectArray_Form(Form[]arr, Form[]arr2)NativeGlobal

Return the intersection of arr and arr2

int[]functionIntersectArray_Int(int[]arr, int[]arr2)NativeGlobal
float[]functionIntersectArray_Float(float[]arr, float[]arr2)NativeGlobal
string[]functionIntersectArray_String(string[]arr, string[]arr2)NativeGlobal
int[]functionPushFront_Int(int[]arr, intpush)NativeGlobal

Create a new array [push, arr[0], arr[1], ..., arr[N-1]]

float[]functionPushFront_Float(float[]arr, floatpush)NativeGlobal
string[]functionPushFront_String(string[]arr, stringpush)NativeGlobal
stringfunctionReplaceAt(stringasStr, intaiIndex, stringasReplace)NativeGlobal

Replace the character at index aiIndex in asStr with asReplace

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