This describes how monster drop tables are realized, and how dropped items are being chosen.
This is sub-layout for documentation pages
The drop tables are saved in the database.
Following diagram illustrates the database tables realization:
So let's imagine, that monster Skeleton was slain. An item in supposed to be dropped from Sketeton drop table. The drop table is displayed in following image:
First, a random number from \(\mathopen[0, 1\mathclose]\) is chosen
\(r = 0.014\)
Then, the drops in the table are sorted by their rarity:
Let \(A, B\) be drop tables. Table \(B\) is subtable of table \(A \Leftrightarrow\) \(A\) has as an item drop reference to table \(B\)
So let's imagine, that again, monster Skeleton was slain. An item in supposed to be dropped from Sketeton drop table:
In table, there is also gems drop table as an item.
Using the same approach as above,
let's say that gems drop table was chosen as an item to be dropped.
But since it is a drop table, the exactly same approach for chosing item will be applied to the
gems drop table.
Finally, an item (or no item) will be returned as a drop
Tables may have many subtables inside, but there should never be a cycle.
Sometimes happens, that one or more items have drop probability set to 1.
Such items are being dropped always.
After that, the approach explained above is used to choose a
drop
If there is sure drop in drop table, but it is sub drop table, then a roll always done from the target drop table, it might, however, give no drop