Background for Skyrim SE
Member of the DbMiscFunctions script
FormfunctionGetRandomFormFromRefJ(ObjectReferenceRef, int[]TypeArrayFilter=NONE, stringJsonFilePath="", stringListKeyName="", boolTypeFilterHasType=true, boolakListHasForm=true)Global

Description

Documentation Comment

Get random form from Ref's inventory.
If TypeArrayFilter != none, filters for form types in TypeArrayFilter. If TypeFilterHasType == true (default) only allows for types in the TypeArrayFilter. If false, only allows for types NOT in the TypeArrayFilter.
If JsonFilePath != none && ListKeyName != none, filters for base forms in the JsonUtil Formlist defined by the JsonFilePath and ListKeyName. If akListHasForm == true (default) only allows for forms in the JsonUtil Formlist. If false, only allows for forms NOT in the JsonUtil Formlist.
Requires SKSE and PapyrusUtil.


Parameters

  1. ObjectReferenceRef

  2. int[]TypeArrayFilter=NONE

  3. stringJsonFilePath=""

  4. stringListKeyName=""

  5. boolTypeFilterHasType=true

  6. boolakListHasForm=true


Examples

Auto-Generated Example

ObjectReference myObjectReference__Ref
int[] myIntArray__TypeArrayFilter
string myString__JsonFilePath
string myString__ListKeyName
bool myBool__TypeFilterHasType
bool myBool__akListHasForm

Form returnedValue = DbMiscFunctions.GetRandomFormFromRefJ(myObjectReference__Ref, myIntArray__TypeArrayFilter, myString__JsonFilePath, myString__ListKeyName, myBool__TypeFilterHasType, myBool__akListHasForm)
Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.