Editing Module:MinerList

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 41: Line 41:
item.product = item.product or ''
item.product = item.product or ''
-- detect mine cart work or deathstone
-- detect mine cart work
item.hideCells = string.find(item.pageName,'Mine Cart Work')
item.hideCells = string.find(item.pageName,'Mine Cart Work')
item.usesExplosives = string.find(item.pageName,'Deathstone')
if item.hideCells then
if item.hideCells then
item.profit = item.coins and tonumber(item.coins)
item.profit = item.coins and tonumber(item.coins)
else
item.profit = item.sellPrice
end
end
-- materials used
-- profitability
item.material = (item.materials and item.materials[1] and item.materials[1].name) or ''
item.profitPerXP = item.profit and item.xp and item.profit / item.xp
-- DOWNTIME VERY IMPORTANT FOR GATHERING TYPE PROFESSIONS
-- downtime is very important for gathering-type professions
item.downtime = 60 -- THIS IS AN INITIAL GUESS, DO NOT USE THIS VALUE
-- initial guesses
item.downtime = 60
item.batch = 24
item.productPerHour = item.duration and 1 / (item.duration + item.downtime / item.batch) * 3600
-- these numbers are based roughly on how far the nodes are from a storage rift or shop or bank
-- 20s per room to traverse
-- duration and relocation times arent used for miner, only respawn time and number of nodes
if item.hideCells then
item.downtime = 0
item.nodes = 1
item.respawn = item.duration
elseif string.find(item.pageName,'Iron Ore') then
item.downtime = 20
item.nodes = 10
elseif string.find(item.pageName,'Cabranese Ore') then
item.downtime = 120 -- teleport to mine south west to bank and run back
item.nodes = 10
elseif string.find(item.pageName,'Flantium Ore') then
item.downtime = 100
item.nodes = 10
elseif string.find(item.pageName,'Adathril Ore') then
item.downtime = 60
item.nodes = 10
elseif string.find(item.pageName,'Flint') then
item.downtime = 20
item.nodes = 6
elseif string.find(item.pageName,'Basalt') then
item.downtime = 60
item.nodes = 6
elseif string.find(item.pageName,'Andesite') then
item.downtime = 60
item.nodes = 6
elseif string.find(item.pageName,'Granite') then
item.downtime = 20
item.nodes = 6
elseif string.find(item.pageName,'Deathstone') then
item.downtime = 120 -- includes getting more explosives
item.nodes = 6
end


--products per hour
item.batch = 24
item.durationEffective = item.duration and item.respawn and (item.duration + item.respawn) / item.nodes
item.productPerHour = item.durationEffective and math.floor(1 / (item.durationEffective + item.downtime / item.batch) * 3600)
item.productPerHourDropping = item.durationEffective and 1 / (item.durationEffective) * 3600
-- properties per hour
-- properties per hour
item.xpPerHour = item.xp and item.productPerHour and math.floor(item.xp * item.productPerHour)
item.xpPerHour = item.xp and item.productPerHour and math.floor(item.xp * item.productPerHour)
item.xpPerHourDropping = item.xp and item.productPerHourDropping and math.floor(item.xp * item.productPerHourDropping)
item.profitPerHour = item.profit and item.productPerHour and math.floor(item.profit * item.productPerHour)
item.profitPerHour = item.profit and item.productPerHour and math.floor(item.profit * item.productPerHour)
end
end
Line 122: Line 82:
:attr{ colspan = '2' }
:attr{ colspan = '2' }
:wikitext('Mining node')
:wikitext('Mining node')
:done()
:tag('th')
:attr{ colspan = '2' }
:wikitext('Materials')
:done()
:done()
:tag('th')
:tag('th')
Line 147: Line 103:
:tag('th')
:tag('th')
:wikitext('XP/hr')
:wikitext('XP/hr')
:done()
:tag('th')
:wikitext('XP/hr<br>(Discarding)')
:done()
:done()
:done()
:done()
Line 173: Line 126:
:tag('td')
:tag('td')
:addClass('table-na')
:addClass('table-na')
:attr{ colspan = '5' }
:attr{ colspan = '3' }
:wikitext('N/A')
:wikitext('N/A')
:done()
:done()
:ELSE()
:ELSE()
:IF(item.usesExplosives)
:node(plist.two_column_image_text(item.material,'File:' .. item.material .. '.png',item.material,item.material))
:ELSE()
:tag('td')
:addClass('table-na')
:attr{ colspan = '2' }
:wikitext('N/A')
:done()
:END()
:node(plist.two_column_image_text(item.product,'File:' .. item.product .. '.png',item.product,item.product))
:node(plist.two_column_image_text(item.product,'File:' .. item.product .. '.png',item.product,item.product))
Line 219: Line 162:
:ELSE()
:ELSE()
:node(plist.unknown_value_cell(1))
:node(plist.unknown_value_cell(1))
:END()
-- XP per hour discarding
:IF(not item.usesExplosives)
:IF(item.xpPerHourDropping)
:tag('td')
:wikitext(item.xpPerHourDropping and lang:formatNum(tonumber(item.xpPerHourDropping)))
:done()
:ELSE()
:node(plist.unknown_value_cell(1))
:END()
:ELSE()
:tag('td')
:addClass('table-na')
:wikitext('N/A')
:done()
:END()
:END()


Please note that all contributions to Brighter Shores Wiki are considered to be released under the CC BY-NC-SA 3.0 (see Brighter Shores:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)
Preview page with this template

This page is a member of a hidden category: