Anonymous

Module:Mazunki/Monsters: Difference between revisions

From Melvor Idle
m
names for items
m (whoops)
m (names for items)
Line 45: Line 45:
'SlayerTier', 'SlayerTierName', 'SlayerTierCost',
'SlayerTier', 'SlayerTierName', 'SlayerTierCost',
'SlayerTierPlayerLevel', 'SlayerTierQtyMin', 'SlayerTierQtyMax', 'SlayerCoinReward',
'SlayerTierPlayerLevel', 'SlayerTierQtyMin', 'SlayerTierQtyMax', 'SlayerCoinReward',
'ItemsID', 'ItemsWeight', 'ItemsDenominator', 'ItemsNormalised', 'ItemsQtyMin', 'ItemsQtyMax'
'ItemsID', 'ItemsName', 'ItemsWeight', 'ItemsDenominator', 'ItemsNormalised', 'ItemsQtyMin', 'ItemsQtyMax'
}
}
result = result.."!"..table.concat(headers, "!!")
result = result.."!"..table.concat(headers, "!!")
Line 150: Line 150:


local itemIds = {}
local itemIds = {}
local itemNames = {}
local itemWeights = {}
local itemWeights = {}
local itemNormalised = {}
local itemNormalised = {}
Line 162: Line 163:
for _, droppable in pairs(monster.lootTable) do
for _, droppable in pairs(monster.lootTable) do
table.insert(itemIds, droppable[1])
table.insert(itemIds, droppable[1])
table.insert(itemNames, Items.getItemById(droppable[1]))
local numerator = droppable[2]
local numerator = droppable[2]
table.insert(itemWeights, numerator)
table.insert(itemWeights, numerator)
Line 169: Line 171:
end
end
table.insert(rowTxt, table.concat(itemIds, arraySeparatorInSheets))
table.insert(rowTxt, table.concat(itemIds, arraySeparatorInSheets))
table.insert(rowTxt, table.concat(itemNames, arraySeparatorInSheets))
table.insert(rowTxt, table.concat(itemWeights, arraySeparatorInSheets))
table.insert(rowTxt, table.concat(itemWeights, arraySeparatorInSheets))
table.insert(rowTxt, itemDenominator/monster.lootChance)
table.insert(rowTxt, itemDenominator/monster.lootChance)
892

edits