Difference between revisions of "Template:BoM"
(why have you forsaken me. hopefully fixed issue where item mana cost over 1000 breaks bom total mana cost.) |
(remove thousands separator from the final bom mana and weight values of the resulting item to be in line with the total sums as they don't have thousands separators) |
||
Line 74: | Line 74: | ||
{{#vardefine: n | {{#expr: {{#var: n}} + 1 }} }} | {{#vardefine: n | {{#expr: {{#var: n}} + 1 }} }} | ||
}}<!-- | }}<!-- | ||
− | -->[[Mana]] Cost: {{#expr: {{#var: totalMana}} + {{RemoveThousandSeparator|number={{#show: {{#var: recipeSource}} |?ManaCrafting}} }} }}{{Emoticon|emoticon=Mana}} (Ingredients: {{#var: totalMana}}{{Emoticon|emoticon=Mana}} / Item: {{#show: {{#var: recipeSource}} |?ManaCrafting}}{{Emoticon|emoticon=Mana}})<br> | + | -->[[Mana]] Cost: {{#expr: {{#var: totalMana}} + {{RemoveThousandSeparator|number={{#show: {{#var: recipeSource}} |?ManaCrafting}} }} }}{{Emoticon|emoticon=Mana}} (Ingredients: {{#var: totalMana}}{{Emoticon|emoticon=Mana}} / Item: {{RemoveThousandSeparator|number={{#show: {{#var: recipeSource}} |?ManaCrafting}} }}{{Emoticon|emoticon=Mana}})<br> |
− | <!-- -->Total [[stock]] weight of basic resources: {{#var: totalStock}}{{Emoticon|emoticon=Stock}}, stock weight of finished item: {{#if: {{#show: {{#var: recipeSource}} |?Weight }} | {{#show: {{#var: recipeSource}} |?Weight }} | [[??]] }}{{Emoticon|emoticon=Stock}} | + | <!-- -->Total [[stock]] weight of basic resources: {{#var: totalStock}}{{Emoticon|emoticon=Stock}}, stock weight of finished item: {{#if: {{#show: {{#var: recipeSource}} |?Weight }} | {{RemoveThousandSeparator|number={{#show: {{#var: recipeSource}} |?Weight }} }} | [[??]] }}{{Emoticon|emoticon=Stock}} |
}}</div></div><!-- | }}</div></div><!-- | ||
--></includeonly><noinclude> | --></includeonly><noinclude> |
Latest revision as of 15:32, 31 October 2023
Generates a BoM (Bill of Materials) for an item. Has three modes you can choose with the template parameter outputMode
:
outputMode = list
- Show the most basic resources with all amounts added up.outputMode = tree
- Show a tree style list with all the needed resources as child of the intermediate ingredient with different levels of indentation (done)outputMode = all
- Show both (Default mode in case parameter is left out)
Uses sub-template Template:ResourceBreakdown