892
edits
m (typo) |
m (whoops) |
||
Line 162: | Line 162: | ||
for _, droppable in pairs(monster.lootTable) do | for _, droppable in pairs(monster.lootTable) do | ||
table.insert(itemIds, droppable[1]) | table.insert(itemIds, droppable[1]) | ||
local numerator = droppable[2] | local numerator = droppable[2] | ||
table.insert(itemWeights, numerator) | table.insert(itemWeights, numerator) | ||
table.insert(itemNormalised, itemDenominator/numerator) | table.insert(itemNormalised, itemDenominator/(numerator*monster.lootChance)) | ||
table.insert(itemQtyMins, 1) | table.insert(itemQtyMins, 1) | ||
table.insert(itemQtyMaxs, droppable[3]) | table.insert(itemQtyMaxs, droppable[3]) | ||
Line 170: | Line 170: | ||
table.insert(rowTxt, table.concat(itemIds, arraySeparatorInSheets)) | table.insert(rowTxt, table.concat(itemIds, arraySeparatorInSheets)) | ||
table.insert(rowTxt, table.concat(itemWeights, arraySeparatorInSheets)) | table.insert(rowTxt, table.concat(itemWeights, arraySeparatorInSheets)) | ||
table.insert(rowTxt, itemDenominator) | table.insert(rowTxt, itemDenominator/monster.lootChance) | ||
table.insert(rowTxt, table.concat(itemNormalised, arraySeparatorInSheets)) | table.insert(rowTxt, table.concat(itemNormalised, arraySeparatorInSheets)) | ||
table.insert(rowTxt, table.concat(itemQtyMins, arraySeparatorInSheets)) | table.insert(rowTxt, table.concat(itemQtyMins, arraySeparatorInSheets)) |
edits