Template:Recipes/extract

From Terraria Wiki
Jump to navigation Jump to search
This template is i18n-ready, which means it is easy to localize for different languages. Please see I18n & l10n for templates to learn more.
This template uses Lua.
This template uses Module:Recipes, a script written in the Lua programming language. To learn more about Lua, see Terraria Wiki:Lua.
Template-info.svg Documentation The documentation below is transcluded from Template:Recipes/extract/doc. (edit | history)

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 Nebula Fragment + 6 Solar Fragment + 6 Stardust Fragment + 6 Vortex Fragment ( @ Ancient Manipulator )
{{recipes/extract|result=Lunar Hook|withresult=y}} 6 Nebula Fragment + 6 Solar Fragment + 6 Stardust Fragment + 6 Vortex Fragment = Lunar Hook ( @ Ancient Manipulator )
{{recipes/extract|result=Lunar Hook|nostation=y}} 6 Nebula Fragment + 6 Solar Fragment + 6 Stardust Fragment + 6 Vortex Fragment
{{recipes/extract|result=Lunar Hook|withresult=y|nostation=y}} 6 Nebula Fragment + 6 Solar Fragment + 6 Stardust Fragment + 6 Vortex Fragment = Lunar Hook
{{recipes/extract|result=Lunar Hook|mode=result}} Lunar HookLunar Hook(Desktop, Console and Mobile versions)
{{recipes/extract|result=Lunar Hook|mode=ingredients}}
{{recipes/extract|result=Lunar Hook|mode=station}} Ancient ManipulatorAncient Manipulator(Desktop, Console and Mobile versions)
{{recipes/extract|result=Campfire|sep=<br/>}} Desktop versionConsole versionMobile version: 10 Any Wood + 5 Torch
Old-gen console versionNintendo 3DS version: 20 Any Wood + 5 Torch
{{recipes/extract|result=Lunar Hook|mode=ingredients-sell}} 48000
{{coin|{{recipes/extract|result=Lunar Hook|mode=ingredients-sell}}}} 4 GC80 SC

With and without full parameter:

Code Result
{{recipes/extract|result=Optic Staff|full=y}} 1 Black Lens + 2 Lens + 12 Hallowed Bar + 20 Soul of Sight ( @ Mythril Anvil / Orichalcum Anvil )
{{recipes/extract|result=Optic Staff}} Black Lens + 2 Lens + 12 Hallowed Bar + 20 Soul of Sight ( @ Mythril Anvil / Orichalcum Anvil )

Platforms exclusive:

Code Result
{{recipes/extract|result=Flaming Arrow|versions={{eversions|raw=y|1.3.0.1}}|withresult=y}} Desktop versionConsole versionMobile version: 10 Wooden Arrow + Torch = 10 Flaming Arrow
{{recipes/extract|result=Flaming Arrow|versions={{eversions|raw=y|1.3.0.1|invert=y}}|withresult=y}} Old-gen console versionNintendo 3DS version: 5 Wooden Arrow + Torch = 5 Flaming Arrow
{{recipes/extract|result=Flaming Arrow|versions={{eversions|raw=y|1.3.0.1|invert=y}}|withresult=y|noversion=y}} 5 Wooden Arrow + Torch = 5 Flaming Arrow

Result note:

Code Result
{{recipes/extract|result=Heavenforge Brick|withresult=y}} Luminite Brick = Heavenforge Brick(During a Full Moon Moon-1.png) ( @ Shimmer Transmutation )
or
4 Heavenforge Brick Wall = Heavenforge Brick ( @ Work Bench )
{{recipes/extract|result=Heavenforge Brick|withresult=y|nonote=y}} Luminite Brick = Heavenforge Brick ( @ Shimmer Transmutation )
or
4 Heavenforge Brick Wall = Heavenforge Brick ( @ Work Bench )
{{recipes/extract|result=Heavenforge Brick|mode=result}} Heavenforge BrickHeavenforge Brick(Desktop, Console and Mobile versions)(During a Full Moon Moon-1.png)
{{recipes/extract|result=Heavenforge Brick|mode=result|nonote=y}} Heavenforge BrickHeavenforge Brick(Desktop, Console and Mobile versions)

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}} Tuna ( @ Work Bench )
or
Salmon ( @ Work Bench )
or
Red Snapper ( @ Work Bench )
or
Flounder ( @ Work Bench )
or
Old-gen console versionNintendo 3DS version: Trout ( @ Work Bench )
{{recipes/extract|result=Sashimi|withresult=y}} Tuna = Sashimi ( @ Work Bench )
or
Salmon = Sashimi ( @ Work Bench )
or
Red Snapper = Sashimi ( @ Work Bench )
or
Flounder = Sashimi ( @ Work Bench )
or
Old-gen console versionNintendo 3DS version: Trout = Sashimi ( @ Work Bench )
{{recipes/extract|result=Sashimi|mode=result}} SashimiSashimi
{{recipes/extract|result=Sashimi|mode=ingredients}}
ororor
  • FlounderFlounder(Desktop, Console and Mobile versions)
or
Old-gen console versionNintendo 3DS version:
{{recipes/extract|result=Sashimi|mode=station}} Work BenchWork Bench
{{recipes/extract|result=Sashimi|mode=ingredients|sep=--or--}}
--or----or----or--
  • FlounderFlounder(Desktop, Console and Mobile versions)
--or--
Old-gen console versionNintendo 3DS version:
{{recipes/extract|result=Sashimi|nostation=y|sep=&#32;/&#32;}} Tuna / Salmon / Red Snapper / Flounder / Old-gen console versionNintendo 3DS version: Trout
<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>
SashimiSashimi Tuna = Sashimi ( @ Work Bench )
Salmon = Sashimi ( @ Work Bench )
Red Snapper = Sashimi ( @ Work Bench )
Flounder = Sashimi ( @ Work Bench )
Old-gen console versionNintendo 3DS version: Trout = Sashimi ( @ Work Bench )