Difference between revisions of "Template:BoM"

From ChatWars Wiki
Jump to: navigation, search
Line 73: Line 73:
 
                     {{#vardefine: n | {{#expr: {{#var: n}} + 1 }} }}
 
                     {{#vardefine: n | {{#expr: {{#var: n}} + 1 }} }}
 
                 }}<!--
 
                 }}<!--
               -->[[Mana Cost]]: {{#expr: {{#var: totalMana}} + {{#show: {{#var: recipeSource}} |?ManaCrafting}} }}{{Emoticon|emoticon=Mana}} (Ingredients: {{#var: totalMana}}{{Emoticon|emoticon=Mana}} / Item: {{#show: {{#var: recipeSource}} |?ManaCrafting}}{{Emoticon|emoticon=Mana}})
+
               -->[[Mana]] Cost: {{#expr: {{#var: totalMana}} + {{#show: {{#var: recipeSource}} |?ManaCrafting}} }}{{Emoticon|emoticon=Mana}} (Ingredients: {{#var: totalMana}}{{Emoticon|emoticon=Mana}} / Item: {{#show: {{#var: recipeSource}} |?ManaCrafting}}{{Emoticon|emoticon=Mana}})
 
}}</div></div><!--
 
}}</div></div><!--
 
--></includeonly><noinclude>
 
--></includeonly><noinclude>

Revision as of 16:00, 4 January 2019

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