Skip to main content

Random Loot Device

The random_loot_device is a creative device that selects and grants loot to an agent using a weighted random selection from available loot options. When one of its configured triggers is activated, it rolls for a loot option and, if successful, grants the corresponding item via an item granter, then fires a loot-granted trigger.

Properties

Triggers

Type: []trigger_device
An array of trigger devices that, when activated, initiate the loot roll process.

LootOptions

Type: []loot_option
A list of loot options available for selection. Each loot option defines an item granter and a weight value that influences its chance of being selected.

OnLootGrantedTrigger

Type: trigger_device
The trigger that is activated when loot is successfully granted to the agent.


Loot Option

A loot_option represents a single loot choice with an associated weight and an item granter.

Properties

Granter

Type: item_granter_device
The device responsible for granting the loot item when this option is selected.

Weight

Type: int
A weight value that influences the probability of this loot option being selected.
Default: 1