InventoryGetRandom
Callable
Parameters
C: Character
The character to pick the asset for
GroupName: AssetGroupName
The asset group to pick the asset from. Set to an empty string to not filter by group.
optionalAllowedAssets: readonly Asset[]
Optional parameter: A list of assets from which one can be selected. If not provided, the full list of all assets is used.
optionalIgnorePrerequisites: boolean = false
If True, skip the step to check whether prerequisites are met NOTE: Long-term this should be replaced with better checks before calling this function.
Returns Asset
- The randomly selected asset or
null
if none found
Select a random asset from a group, narrowed to the most preferable available options (i.e unblocked/visible/unlimited) based on their binary "rank"