Loot Drop Manager
Last updated
Was this helpful?
Last updated
Was this helpful?
The Loot Drop Manager (AC_LootDropManager) component is a lightweight loot selector which can be used to determine which item should be dropped based on a weighted loot table while also allowing for manual item overrides when necessary.
It can be attached to any enemy, container, or interactable object. It is added to the Soulslike Enemy (B_Soulslike Enemy) & Base Container (B_Container) classes.
Loot Table Configuration:
The system uses a Data Table (Loot Table) that contains a list of potential item drops along with their weight scores.
The weights determine the probability of an item being selected when a drop is triggered.
Loot Selection Process:
When the PickItem event is called, the system:
Retrieves and asynchronously loads the assigned Loot Table asset. Then iterates through the table and selects an item based on its weight score.
If an Override Item is assigned, the system will select that item instead.
Spawning & Dispatching:
Once the selection is complete, the chosen item is sent through the OnItemReadyForSpawn dispatcher, making it available for world spawning.