Modèle:Recipes/extract/doc
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 paramters (result, ingredient ...) to query "single" result. See {{recipes}} for details of all query constraint paramters.
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/resultamount/ingredients/station/ingredients-buy/ingredients-sell
Output mode. If not specified, it will be compact by default. See examples below. NOTE: for ingredients-buy/ingredients-sell, you should make sure there is only 1 result recipe and no alternative crafting ingredient in ingredients list. For ingredients-buy, you should make sure all ingredients are actually buyable.
- 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.
If value is null or nil, there will be no seperator.
Note: single ingredients list will be wrapped in <div> when |mode=ingredients and in <span> when |mode=compact.
- withresult and nostation and noversion
Only valid when mode=compact. By default, it will output as [version]: [ingredients]@[station], if withresult=y, will output as [ingredients]@[station]=[result], if nostation=y, there wil be no @[station], if noversion=y, there will be no [version]:.
- noversion
Only valid when mode=ingredients. If noversion=y, there will be no version icons before ingredients list.
- nonote
Only valid when mode=compact or mode=result. If nonote=y, there will be no result note text after result item.
- noamount
Only valid when mode=result. If noamount=y, there will be no result amount after result item.
- 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
| Code | Result |
|---|---|
{{recipes/extract|result=Lunar Hook}}
|
6 |
{{recipes/extract|result=Lunar Hook|withresult=y}}
|
6 |
{{recipes/extract|result=Lunar Hook|nostation=y}}
|
6 |
{{recipes/extract|result=Lunar Hook|withresult=y|nostation=y}}
|
6 |
{{recipes/extract|result=Lunar Hook|mode=result}}
|
|
{{recipes/extract|result=Lunar Hook|mode=ingredients}}
|
|
{{recipes/extract|result=Lunar Hook|mode=station}}
|
|
{{recipes/extract|result=Campfire|sep=<br/>}}
|
|
{{recipes/extract|result=Lunar Hook|mode=ingredients-sell}}
|
48000 |
{{coin|{{recipes/extract|result=Lunar Hook|mode=ingredients-sell}}}}
|
480 |
With and without full parameter:
| Code | Result |
|---|---|
{{recipes/extract|result=Optic Staff|full=y}}
|
1 |
{{recipes/extract|result=Optic Staff}}
|
Platforms exclusive:
Result note:
| Code | Result |
|---|---|
{{recipes/extract|result=Heavenforge Brick|withresult=y}}
|
) ( @ ou 4 |
{{recipes/extract|result=Heavenforge Brick|withresult=y|nonote=y}}
|
ou 4 |
{{recipes/extract|result=Heavenforge Brick|mode=result}}
|
)
|
{{recipes/extract|result=Heavenforge Brick|mode=result|nonote=y}}
|
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=Sashimi}}
|
ou ou ou ou | ||||||
{{recipes/extract|result=Sashimi|withresult=y}}
|
ou ou ou ou | ||||||
{{recipes/extract|result=Sashimi|mode=result}}
|
|||||||
{{recipes/extract|result=Sashimi|mode=ingredients}}
|
|||||||
{{recipes/extract|result=Sashimi|mode=station}}
|
|||||||
{{recipes/extract|result=Sashimi|mode=ingredients|sep=--or--}}
|
|||||||
{{recipes/extract|result=Sashimi|nostation=y|sep= / }}
|
|||||||
<table class="terraria lined"><tr><td rowspan="5" style="border:0">{{recipes/extract|result=Sashimi|mode=result}}</td>
<td>{{recipes/extract|result=Sashimi|withresult=y|sep=</td></tr><tr><td>}}</td></tr></table>
|
)