Question about loot tables

Can somebody help me understand how loot tables work? I am very new to modding and I couldn’t figure out how drop rates are calculated.

Mastertable (MT) holds level tables (LT), thats pretty much all it does. It randomly picks from multiple LT if you have more than one within a MT.

Level tables hold dynamic tables (TDYN), they also determine what will drop at what level, so you can put multiple TDYN and levels and when an MT picks a LT, it will then look at the level and choose the corresponding TDYN. Example, you have an LT that contains loottable1;loottable2;loottable3, and the associated levels are 1;25;50, then when the player is 75, he will obtain loottable3. If you are level 2, you will get loottable1.

Lastly, TDYN tables determine the stats of an item when it drops. You can assign the chance to spawn with 0 affixes, 1 affix, 2 affixes, 1 rare affix, 2 rare affixes, 1 rare and 1 normal affix, or broken, which means it doesn’t even show up when it drops. You can also assign the chance for each affix to spawn on the item, among other things which are less important and interesting. The chances work with “weights” which is essentially a drop chance that is weighted against the total sum of the other weights.

Say for example you have item1, item2, item3, item4, and item5. item1 has a weight of 500, item2 has a weight of 1000, item3 has a weight of 2000, item4 has a weight of 4000, and item5 has a weight of 8000. Add these values together, 15500, this is your total weight. Divide an individual items weight against that total weight to get an approximation of it’s drop chance. So the drop chances of the items I listed would be …3% for item1, 6% for item2, ~13% for item3, ~26% for item4, and ~52% for item5. It’s not a perfect science, I believe there are other factors that can affect this but it’s close enough.

1 Like

Thanks so much, now I get it.

That is an excellent break down of the Loot Tables.

As for the original post asking about how drop rates are calculated here is some additional information.

The enemies.dbr may have equipment assigned to it. There are a few places for this and they can be used for both visual display and drop rates. Although this works very poorly with some models. I had a helmet hovering well above a skeletons head :slight_smile:

There is also a MISC section. This is for equipment that is for drops only. (Not equipped by the enemy or providing stats). Here you can have the Tables Aslyum101 mentioned OR you can put individual items.

You can assign the chance of getting a MISC 3 category item to 10% for example. Then when that 10% chance occurs you can use the weight method as to which item they would get.

I have done this many times in my Mod. So you have a 10% chance to get an item, but 90% of the time it would be a common drop and 10% you get the rare.