Question on Modifying Loottables

Is the parsing of loottables stopped when a gap is reached or is an entire table guaranteed to be read even if there are ‘holes’ in the data?

For instance, supposed we had a loot table with itemization and weighting, with entries A, B, C, and D:

Entry A
-Level Req. : 1
-Weighting : 500
Entry B
-Level Req. : 1
-Weighting : 500
Entry C
-Level Req. : 1
-Weighting : 500
Entry D
-Level Req. : 1
-Weighting : 500

And I removed entry B so our table looked like this:

Entry A
-Level Req. : 1
-Weighting : 500

Entry C
-Level Req. : 1
-Weighting : 500
Entry D
-Level Req. : 1
-Weighting : 500

Would entries C and D be ignored by the game engine as a result because parsing stops as soon as a gap is reached? Or is this ‘safe’?

Thanks! Mostly curious whether or not I can well edit tables programmatically or whether I should do it by hand.

Leaving a space in skill trees breaks pets in my experience, unless it was some rare mystical bug.

For loot tables, I have little experience and from what I’ve seen I’d say no, but I’ll have to go back to check…

[ . . . . . ]

How does the loot1Chance field work?

Loot # Chance

An array of weights for rolling this Loot Set. Each entry in the array is an item. If the chest can dispense up to 2 items + 2 * the number of players, then the array should go up to at least 10.

Could someone please just give me a hint or [and I will not mind at all] tell me I should know how something this trivial works? I really don’t mind. =)

An array of weights for rolling this Loot Set.” So I assume this means it’s referencing the next six (grouped) entries called loot#name# and loot#weight#. To break down this opening statement more “for rolling this Loot Set” this means the chance for any one of the next six entries to happen. On or Off, Yes or No, True of False, that loot will be generated.

Makes sense at this point and this is simply the chance of an item appearing from the Chest (some object) and nothing more.

Each entry in the array is an item.” Ok now I’m confused again. So all the entries in this array is the chance of an item or is literally a reference to an item? Could it be a number used in a calculation? If so is it with this same dbr file or another file?

So moving on let’s see if the next statement helps alleviate my confusion.

If the chest can dispense up to 2 items + 2 * the number of players, then the array should go up to at least 10.

Ok looking at the formula it’s for 4 [potential] players in the game and it doubles it.


numSpawnMinEquation : numberOfPlayers*1
numSpawnMaxEquation : numberOfPlayers*1
loot1Chance : { 0.1, 0, 0, 0.1, 0, 0, 0, 0 } // 8 entries in this Array

Perfect there’s at least 8 entries.

So what do these entries mean inside this array? These 8 entries are an array of weights for rolling the Loot Set (the next six grouped entries) and each entry is an item according to the documentation so there’s is going to be 8 items from the chest.

Now is it 8 items only when there is a max amount of players (4) in the game?

Is it 8 item per character from the chest?

Why have 0’s in this array at all? Shouldn’t it just be 2 { 0.1, 0.1 } if six entries [of 0] are not going to do anything, anyways?

What do the numbers mean? Do all the players have 0.1% chance to get the first item or is “0.1” an ID or if it is a weight what is this number being weighed against? (The documentation clearly states these numbers directly deal with items)

Is this number being weighed against the other numbers totaled?

Going back now “Each entry in the array is an item.” – so these numbers are literally AN ITEM.(?) So what is the item now that is not a weight?

I feel I should get this, and instantly too, because it seems so trivial but I’m totally lost.

Anyways having a ton of fun making Masteries in the time being. I just can’t bang my head against this any longer.

Edit: i had a copy/paste error. Fixed. (the formulas while testing all were numPlayers*4 and not *1); all results were correct for the erroneous syntax.

After extensive testing of many (hundreds perhaps) permutations I’ve come to the conclusion the loot#chance is only a toggle.

Mentionable permutations

This will always produce 3 items from the chest.



numSpawnMinEquation : numberOfPlayers*4
numSpawnMaxEquation : numberOfPlayers*4
loot1Chance : { 1, 0, 500, 4 }


This will always produce 2 items from the chest.



numSpawnMinEquation : numberOfPlayers*4
numSpawnMaxEquation : numberOfPlayers*4
loot1Chance : { 1, 0, 0, 0.0001 }


This will always produce 0 items from the chest.



numSpawnMinEquation : numberOfPlayers*4
numSpawnMaxEquation : numberOfPlayers*4
loot1Chance : { 0, 0.01, 10, 1000 } // 4 entries


This will always produce 1 items from the chest.



numSpawnMinEquation : numberOfPlayers*4
numSpawnMaxEquation : numberOfPlayers*4
loot1Chance : { 1, 0, 0, 0, 5000 } // 5 entries


This will always produce 2 items from the chest.



numSpawnMinEquation : numberOfPlayers*4 + 1 // allows the array to iterate to entry 5
numSpawnMaxEquation : numberOfPlayers*4 + 1
loot1Chance : { 1, 0, 0, 0, 5000 } // 5 entries


So in conclusion, if the first entry is > 0.0 then no items will drop no matter what the numbers are following the first entry.

All numbers have no weight in loot1Chance. They are simply on/off toggle [> 0 On (drop) and 0 for Off (no drop)]

Nearly forgot one of the most important entries that confuses me the most.



numSpawnMinEquation : numberOfPlayers*4
numSpawnMaxEquation : numberOfPlayers*4
loot1Chance : { 5000, 1000, 100, 10 } // 4 entries


Result: received 4 items from the chest.

Expected results (because the documentation says these numbers are weights AND the item also, somehow): 5000: a guaranteed item out the 4 potential items, 1000: have 1/5 chance against the first item dropped, 100: have a 1/10 chance against the second item dropped, and 10: have a 1/10 chance against the third item dropped; instead I always get four items.

If all you’re using is Loot1Chance, then yes, 0 would mean don’t drop anything and > 0 would mean drop an item from this set.

If you also use Loot2Chance (and onward), then it takes the relative weights of the Loot sets to determine which one to dispense from, then taking under consideration the loot tables assigned within it (and their relative weights).

So as a simple example

Loot1Chance = 100;0;50;50;0
Loot2Chance = 0;50;50;25;0
Loot3Chance = 0;50;0;25;100

Item 1 = always from Loot Set 1
Item 2 = 50% of Loot Set 2 and 50% of Loot Set 3
Item 3 = 50% of Loot Set 1 and 50% of Loot Set 2
Item 4 = 50% of Loot Set 1, 25% of Loot Set 2 and 25% of Loot Set 3
Item 5 = always from Loot Set 3

Pure exaltation! I can finally move forward. Thank you so very much!

I [obviously] never thought it was weighing against other loot chances and thought it was self-containing with the # I was working with. Sometimes reading documentation I take them way to literal. Thank you again!

I finally tried to understand this and would like to present a fictious example and ask if I am on the right track and ask 1 additional question.

First of all, the faked example fixeditemloot data:


loot1Name1      hpot
loot1Weight1    100
loot1Name2      epot
loot1Weight2    100
loot1Name3      food
loot1Weight3    50

loot2Name1      axe
loot2Weight1    100
loot2Name2      sword
loot2Weight2    100
loot2Name3      mace
loot2Weight3    100

loot3Name1      helm
loot3Weight1    100
loot3Name2      shoulders
loot3Weight2    10
loot3Name3      feet
loot3Weight3    10

minDrop         5
maxDrop         5
loot1Chance     100;0;0;0;0
loot2Chance     10;10;10;10;10
loot3Chance     0;0;0;0;50

So we have a container that should always spawn 5 drops. My drops become columns in my matrix with the 3 loot sets on rows:


loot#   1       2       3       4       5
1       100     0       0       0       10
2       10      10      10      10      10
3       0       0       0       0       50

And then I can assume the predicted results below:



Drop 1a : 90.9% (100/110) loot1 so use 100/100/50 weights to see if hpot/epot/food drops
Drop 1b : 9.09% (10/110) loot2 so use 100/100/100 weights to see if axe/sword/mace drops
Drop 2  : 100% (10/10) loot2 so  use 100/100/100 weights to see if axe/sword/mace drops
Drop 3  : 100% (10/10) loot2 so  use 100/100/100 weights to see if axe/sword/mace drops
Drop 4  : 100% (10/10) loot2 so  use 100/100/100 weights to see if axe/sword/mace drops
Drop 5a : 14.28% (10/70) loot1 so  use 100/100/50 weights to see if hpot/epot/food drops
Drop 5b : 14.28% (10/70) loot2 so  use 100/100/100 weights to see if axe/sword/mace drops
Drop 5c : 71.42% (50/70) loot3 so  use 100/10/10 weights to see if helm/shoulders/feet drops

So, first off, is that a correctly analyzed fake example?

And second, the loot set (1, 2, or 3) is chosen independently of the second selection using the weights for lootXName1,2,3 or are all the weights combined and if you have a chance of a drop coming from loot1 or loot2 sets, then the loot in those sets, and their weights, are combined to give rise to the actual probability table that can then select both based on the outer lootXChance values combined with the inner lootXWeight values. For example, for drop1 above the drop chance would result from the following:


Drop1 100/110 * 100/250 hpot
Drop1 100/110 * 100/250 epot
Drop1 100/110 * 50/250 food
Drop1 10/110 * 100/300 axe
Drop1 10/110 * 100/300 sword
Drop1 10/110 * 100/300 mace

Thanks for you help.