Template:Base ingredients lookup
From Guild Wars 2 Wiki
Jump to navigationJump to search
Description[edit]
Creates a list of base ingredients from a given recipe. The recipe can be specified by its recipe id, or more commonly, by the name of the item to be created. If an item is specified, the template will look up the recipe and use the first recipe it finds. A discipline can be used to favor using a specific profession when deciding which recipe to use for crafting ingredients. The template defines #var:base_ingredient_list to store the list of base ingredients. For example, the variable value is then passed to {{base ingredients table}}.
Usage[edit]
{{base ingredients lookup|<item>}} {{base ingredients lookup|id=<id>}} {{base ingredients lookup|<item>|<quantity>|discipline=<discipline>}} {{base ingredients lookup|id=<id>|<quantity>|discipline=<discipline>}}
- Variables
- base_ingredient_list - The list is stored in the form of ~<item>~<item>...<item> and should be processed using #arraymap with "~" as the delimiter.
Parameter[edit]
- 1 (unnamed parameter)
- Required. The output item to generate a list of base ingredients for. The template will look up the recipe that outputs the item. If an item has multiple recipes, the first recipe is used. If discipline is specified, the recipe requiring the discipline is prioritized. If id is specified, the parameter is ignored.
- 2 (unnamed parameter)
- Optional. The quantity of the item to create.
- id
- The recipe id of the recipe to generate the list of base ingredients for.
- discipline
- Optional. The discipline (Property:Requires discipline) to prefer for crafting recipes.The template will look for item recipes for the specific profession. By default, the template will pick the first recipe found for the item.
Example[edit]
{{base ingredients lookup|Potent Superior Sharpening Stone|1}} {{base ingredients table |item=Potent Superior Sharpening Stone |quantity=1 |{{#var:base_ingredient_list}} }}
5 Potent Superior Sharpening Stone
(TP: )
Quantity | Material | Buy price (each) | Material cost |
---|---|---|---|
6 | Pile of Crystalline Dust | ... | ... |
4 | Orichalcum Ore | ... | ... |
Total crafting cost | ... |
- #var:base_ingredient_list: ~Pile of Crystalline Dust~Orichalcum Ore
- #var:processed_ingredient_list: ~Potent Superior Sharpening Stone~Orichalcum Ingot~Pile of Crystalline Dust~Superior Sharpening Stone~Orichalcum Ore
{{base ingredients lookup|Iron Ingot|1}} {{base ingredients table |item=Iron Ingot |quantity=1 |{{#var:base_ingredient_list}} }}
1 Iron Ingot
(TP: )
Quantity | Material | Buy price (each) | Material cost |
---|---|---|---|
3 | Iron Ore | ... | ... |
Total crafting cost | ... |
- #var:base_ingredient_list: ~Iron Ore
- #var:processed_ingredient_list: ~Iron Ingot~Iron Ore