Anonymous

Template:HarvestingVeinsTable/doc: Difference between revisions

From Melvor Idle
m
no edit summary
(Created page with "A script is used to generate the following table. To use, open the game and paste the below into the console. The outputs will be copied to your clipboard automatically. After running the script, 'edit source' on Template:HarvestingVeinsTable then Ctrl+A and Ctrl+V. Look over the contents to ensure everything looks fine. <syntaxhighlight lang="javascript" line> let results = `<noinclude>{{/doc}}Category:Manual Tables...")
 
mNo edit summary
Line 2: Line 2:


<syntaxhighlight lang="javascript" line>
<syntaxhighlight lang="javascript" line>
let results = `<noinclude>{{/doc}}[[Category:Manual Tables]]</noinclude>\n{| class="wikitable sortable stickyHeader col-1-img col-7-center col-8-center"\n|- class="headerRow-0"\n! colspan=2| Vein !! {{Skill|Harvesting|notext=true|nolink=true}} Level !! Products !! Intensity !! Chance !! AXP !! AXP/s`;
let results = `<noinclude>{{/doc}}[[Category:Manual Tables]]</noinclude>\n{| class="wikitable sortable stickyHeader col-7-center col-8-center"\n|- class="headerRow-0"\n! colspan=2| Vein !! {{Skill|Harvesting|notext=true|nolink=true}} Level !! Products !! Intensity !! Chance !! AXP !! AXP/s`;
game.harvesting.sortedMasteryActions.forEach((vein, i) => {
game.harvesting.sortedMasteryActions.forEach((vein, i) => {
results += `\n|-\n| rowspan=4| {{Icon|${vein.name}|type=harvesting|type=vein|notext=true}} ||rowspan=4| ${vein.name}`;
results += `\n|-\n| rowspan=4| {{Icon|${vein.name}|type=harvesting|type=vein|notext=true}} ||rowspan=4| ${vein.name}`;
vein.products.forEach((product, i) => {
vein.products.forEach((product, i) => {
if (i === 0) results += ` || rowspan=4; style="text-align: center"| ${vein.abyssalLevel}`
if (i === 0) results += ` || rowspan=4; style="text-align: center"| ${vein.abyssalLevel}`
results += `${i !== 0 ? '\n|-\n|style="text-align: left"|' : ' ||'} {{ItemIcon|${product.item.name}}} || ${product.minIntensityPercent}% || ${product.weight}/${vein.totalProductWeight} (${formatNumber(product.weight / vein.totalProductWeight * 100, 2)}%)`;
results += `${i !== 0 ? '\n|-\n|' : ' ||'} {{ItemIcon|${product.item.name}}} || ${product.minIntensityPercent}% || ${product.weight}/${vein.totalProductWeight} (${formatNumber(product.weight / vein.totalProductWeight * 100, 2)}%)`;
if (i === 0) results += ` ||rowspan=4| ${formatNumber(vein.baseAbyssalExperience, 0)} || rowspan=4| ${formatNumber(vein.baseAbyssalExperience / 3, 0)}`
if (i === 0) results += ` ||rowspan=4| ${formatNumber(vein.baseAbyssalExperience, 0)} || rowspan=4| ${formatNumber(vein.baseAbyssalExperience / 3, 0)}`
});
});