The PapyrusUtil script is a part of Skyrim SE’s Papyrus scripting ecosystem. This script is not present in the vanilla game, but can be found in modded sources like PapyrusUtil SE - Modders Scripting Utility Functions (PapyrusUtil).
For this script, the Papyrus index knows about:
- 97 functions
Inheritance Tree
No indexed scripts extend this script.
Properties
No properties found.
Events
No events found.
Functions
- Found in:
- PapyrusUtil
Get version of papyrus DLL library. Version 4.6 will return 46.
- Found in:
- PapyrusUtil
Get version of compiled papyrus scripts which should match return from GetVersion()
- Found in:
- PapyrusUtil
Few extra array types not provided by SKSE normally to help avoid having to use and cast Form arrays
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
ObjectReference[]functionResizeObjRefArray(ObjectReference[]ArrayValues, inttoSize, ObjectReferencefiller=NONE)NativeGlobal- Found in:
- PapyrusUtil
Append a value to the end of the given array and return the new array.
NOTE: The array has to be recreated each time you call this. For the sake of memory usage and performance, DO NOT use these to build up an array through a loop,
in such a situation it is significantly faster to create the full length array first and then fill it. Best to limit to only the occasional need.
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
bool[] function PushBool(bool[] ArrayValues, bool push) global native ; // Bugged - Non-native version available below
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
Removes all elements from the given array matching the provided value and returns the shortened array.
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
bool[] function RemoveBool(bool[] ArrayValues, bool ToRemove) global native ; // Bugged - Non-native version available below
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
ObjectReference[]functionRemoveObjRef(ObjectReference[]ArrayValues, ObjectReferenceToRemove)NativeGlobal- Found in:
- PapyrusUtil
Removes all duplicate elements from the given array and returns the shortened array with only a single instance of all element values.
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
float[]functionGetDiffFloat(float[]ArrayValues1, float[]ArrayValues2, boolCompareBoth=false, boolIncludeDupes=false)NativeGlobalGet an array of values from ArrayValues1 that ARE NOT among the values of ArrayValues2. Duplicates are removed by default.
Setting CompareBoth = true will change the behavior to also include the reverse comparison of ArrayValues2 values that are not present in ArrayValues1.
Setting IncludeDupes = true will allow the resulting array to include duplicate entries of the same value if they were also duplicated in the input arrays.
- Found in:
- PapyrusUtil
int[]functionGetDiffInt(int[]ArrayValues1, int[]ArrayValues2, boolCompareBoth=false, boolIncludeDupes=false)NativeGlobal- Found in:
- PapyrusUtil
string[]functionGetDiffString(string[]ArrayValues1, string[]ArrayValues2, boolCompareBoth=false, boolIncludeDupes=false)NativeGlobal- Found in:
- PapyrusUtil
Form[]functionGetDiffForm(Form[]ArrayValues1, Form[]ArrayValues2, boolCompareBoth=false, boolIncludeDupes=false)NativeGlobal- Found in:
- PapyrusUtil
Alias[]functionGetDiffAlias(Alias[]ArrayValues1, Alias[]ArrayValues2, boolCompareBoth=false, boolIncludeDupes=false)NativeGlobal- Found in:
- PapyrusUtil
Actor[]functionGetDiffActor(Actor[]ArrayValues1, Actor[]ArrayValues2, boolCompareBoth=false, boolIncludeDupes=false)NativeGlobal- Found in:
- PapyrusUtil
ObjectReference[]functionGetDiffObjRef(ObjectReference[]ArrayValues1, ObjectReference[]ArrayValues2, boolCompareBoth=false, boolIncludeDupes=false)NativeGlobal- Found in:
- PapyrusUtil
Get an array of values that are present in both ArrayValues1 and ArrayValues2.
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
ObjectReference[]functionGetMatchingObjRef(ObjectReference[]ArrayValues1, ObjectReference[]ArrayValues2)NativeGlobal- Found in:
- PapyrusUtil
Returns the number of instances an array has an element equal to the given value
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
float[]functionMergeFloatArray(float[]ArrayValues1, float[]ArrayValues2, boolRemoveDupes=false)NativeGlobalReturns two arrays combined into one, optionally also removing any duplicate occurrences of a value.
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
string[]functionMergeStringArray(string[]ArrayValues1, string[]ArrayValues2, boolRemoveDupes=false)NativeGlobalbool[] function MergeBoolArray(bool[] ArrayValues1, bool[] ArrayValues2, bool RemoveDupes = false) global native ; // Bugged - Non-native version available below
- Found in:
- PapyrusUtil
Form[]functionMergeFormArray(Form[]ArrayValues1, Form[]ArrayValues2, boolRemoveDupes=false)NativeGlobal- Found in:
- PapyrusUtil
Alias[]functionMergeAliasArray(Alias[]ArrayValues1, Alias[]ArrayValues2, boolRemoveDupes=false)NativeGlobal- Found in:
- PapyrusUtil
Actor[]functionMergeActorArray(Actor[]ArrayValues1, Actor[]ArrayValues2, boolRemoveDupes=false)NativeGlobal- Found in:
- PapyrusUtil
ObjectReference[]functionMergeObjRefArray(ObjectReference[]ArrayValues1, ObjectReference[]ArrayValues2, boolRemoveDupes=false)NativeGlobal- Found in:
- PapyrusUtil
Returns a sub section of an array indicated by a starting and ending index.
The default argument "int EndIndex = -1" clamps the to the end of the array. Equivalent of setting EndIndex = (ArrayValues.Length - 1)
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
bool[] function SliceBoolArray(bool[] ArrayValues, int StartIndex, int EndIndex = -1) global native ; // Bugged - Non-native version available below
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
ObjectReference[]functionSliceObjRefArray(ObjectReference[]ArrayValues, intStartIndex, intEndIndex=-1)NativeGlobal- Found in:
- PapyrusUtil
Sorts a given array's elements alphanumerically. Sorted in ascending order by default.
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
Similar to SKSE's native StringUtil.Split() except results are whitespace trimmed. So comma, separated,list,can, be, spaced,or,not.
- Found in:
- PapyrusUtil
Opposite of StringSplit()
- Found in:
- PapyrusUtil
Return the total sum of all values stored in the given array
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
Returns the value clamped to the min or max when out of range
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
Similar to the clamp functions, only values wrap around to the other side of range instead.
Mostly useful for traversing around array values by wrapping the index from end to end without having to check for it being out of range first.
i.e.: Form var = myFormArray[WrapInt(i, (myFormArray.Length - 1))]
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
Returns the given value signed if bool is true, unsigned if false, regardless if value started out signed or not.
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
- Found in:
- PapyrusUtil
