Let's talk loot

I use SpawnWeight to determine the chance of spawning. In this table, all rows have the same chance to spawn because their weights are the same. Once the row is determined, do a random amount in Min/Max.
image

How I generate from DT:
1.Get total amount of rows(items) and total weight of all items

2.A loop for how many times should the container generate items. Each time set the target row.
image

3.Loop through the DT_LootDrop to see which row is the target item.

4.How I set my item information, yours would be different. Add the target item to the output array.

5.Out put the array of structure to your container and store it.

If your loot logic has more things going on like not repeating loot, handle that within the function. I parse the out put struct array to another function that stacks any potential stackable items within the array.

1 Like