Template:Recipes/extract
Use this template to extract info from certain crafting recipe(s).
Usage
This template is designed for extracting info from recipe(s) for "single result item"(however can be multiple recipes), so you need to use query constraint parameters (result
, ingredient
...) to query "single" result. See {{recipes}} for details of all query constraint parameters.
If query result is more than one row, this template will only return first row for mode=station
or mode=result
, and all rows for mode=compact
or mode=ingredients
.
then, use following parameters for output format:
- mode = compact/result/ingredients/station
Output mode. If not specified, it will be compact
by default. See examples below.
- sep or seperator
Separator between multiple ingredients lists. Only valid when mode=compact
or mode=ingredients
. Default is <br/>'''or'''<br/>
for mode=compact
or <br/>'''or'''<br/>
for mode=ingredients
.
Note: single ingredients list will be wrapped in <div> when |mode=ingredients
and in <span> when |mode=compact
.
- withresult and nostation
Only valid when mode=compact
. By default, it will output as [ingredients]@[station], if withresult=y
, will output as [ingredients]@[station]=[result], if nostation=y
, there will be no @[station]. The crafting station will be displayed as it is formatted in the titlecompact
parameter of the {{recipes}} call on the respective recipes registration subpage. (For instance, Exxo Avalon recipes with "Adamantite Forge" set as the crafting station will always display the "Adamantite Forge / Titanium Forge / Troxinium Forge" that is set as the titlecompact
of the {{recipes}} call on Exxo Avalon/Recipes/Hardmode Forge, which also has station=Adamantite Forge
.) If that cannot be determined, then it falls back to the default set of formatting rules from the vanilla wiki, and finally to simply {{item|<crafting station>}}
.
- showresultid=y and link=no
Only valid when mode=result
. result item will show their internal item ID (if available), and/or have no link, respectively.
Examples
For these examples, it is assumed we are in the Exxo Avalon mod wiki.
Code | Result |
---|---|
{{recipes/extract|result=#Elemental Rod}}
|
|
{{recipes/extract|result=#Elemental Rod|withresult=y}}
|
|
{{recipes/extract|result=#Elemental Rod|nostation=y}}
|
|
{{recipes/extract|result=#Elemental Rod|withresult=y|nostation=y}}
|
|
{{recipes/extract|result=#Elemental Rod|mode=result}}
|
|
{{recipes/extract|result=#Elemental Rod|mode=ingredients}}
|
|
{{recipes/extract|result=#Elemental Rod|mode=station}}
|
|
{{recipes/extract|result=Aglet|sep=<br/>}}
|
Multiple recipes:
Note: single ingredients list will be wrapped in <div> when |mode=ingredients
and in <span> when |mode=compact
.
Code | Result | ||
---|---|---|---|
{{recipes/extract|result=#Superhardmode Bar}}
|
|||
{{recipes/extract|result=#Superhardmode Bar|withresult=y}}
|
|||
{{recipes/extract|result=#Superhardmode Bar|mode=result}}
|
|||
{{recipes/extract|result=#Superhardmode Bar|mode=ingredients}}
|
|||
{{recipes/extract|result=#Superhardmode Bar|mode=station}}
|
|||
{{recipes/extract|result=#Superhardmode Bar|mode=ingredients|sep=--or--}}
|
|||
{{recipes/extract|result=#Superhardmode Bar|nostation=y|sep= / }}
|
|||
<table class="terraria lined"><tr><td rowspan="4" style="border:0">{{recipes/extract|result=#Superhardmode Bar|mode=result}}</td> <td>{{recipes/extract|result=#Superhardmode Bar|withresult=y|sep=</td></tr><tr><td>}}</td></tr></table> |