Template:Itemsource

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.
See Template:Itemsource/l10n for the localization of this template.
This template uses the Cargo extension.
This template uses Extension:Cargo, an integral part of the wiki's back-end.
  • This template queries the table "Items". View table.
  • This template queries the table "Drops". View table.
Important.svg
CAUTION: Terraria Wiki code is complex!!!
If you want to use this code on another wiki, wiki.gg staff are not able to assist you.
Please consider picking a different wiki to adapt code from, or making your own templates!
Remember that content on a wiki is more important than fancy formatting.
Template-info.svg Documentation The documentation below is transcluded from Template:Itemsource/doc. (edit | history)

This template is used to dynamically display the entities from which an item can be obtained. It takes into consideration crafting, looting/dropping, buying, plundering, and fishing. Hence, it is a combination of {{recipes/extract}}, {{dropinfo/list}}, and the "buy/vendor/plunder/fished" information in the Items cargo table.

Occasionally, an item might not display all entities that it can be looted, purchased, or plundered from. This is usually caused by faulty {{item infobox}} parameters on the item's page, e.g. a missing drop, loot/bag loot, vendor, plunder, or fished tag.

Usage

{{ itemsource | <item name> | id = <item ID> | sep = <separator> (optional) | crafting = <recipe> (optional) | looting = <loot source> (optional) | dropped = <dropping entity> (optional) | buying = <vendor> (optional) | shimmer = <transmutation> (optional) | chlorophyte extractinator = <conversion> (optional) | buying = <vendor> (optional) | plundering = <plunder location> (optional) | fishing = <fishing details> (optional) }}

First unnamed parameter, id

Name or ID of the item in question. Only one out of these two parameters should be used.

sep

Separator between the three methods of obtainment. Defaults to <hr class="incell-border"/>, i.e., a table border.

crafting, looting, dropped, buying, shimmer, chlorophyte extractinator plundering, fishing

Use these parameters to manually override the automatically generated data in each section. Only $looting or $dropped can be used at a time, not both.

Examples

Code Result
{{itemsource|Active Stone Block}} Stone Block + Wire
Plundering
<p>{{itemsource|Active Stone Block|sep=</p><p>}}</p>

Stone Block + Wire

Plundering

{{itemsource|Torch}} Gel + Any Wood
  • Baby Slime
  • Black Slime
  • Blue Slime
  • Chest
  • Gold Chest
  • Green Slime
  • Jungle Slime
  • Pinky
  • Purple Slime
  • Red Slime
  • Shadow Chest
  • Yellow Slime
  • Zombie


Plundering
{{itemsource|Torch|crafting=}}
  • Baby Slime
  • Black Slime
  • Blue Slime
  • Chest
  • Gold Chest
  • Green Slime
  • Jungle Slime
  • Pinky
  • Purple Slime
  • Red Slime
  • Shadow Chest
  • Yellow Slime
  • Zombie


Plundering
{{itemsource|Torch|buying={{item|Angler}}}} Gel + Any Wood
  • Baby Slime
  • Black Slime
  • Blue Slime
  • Chest
  • Gold Chest
  • Green Slime
  • Jungle Slime
  • Pinky
  • Purple Slime
  • Red Slime
  • Shadow Chest
  • Yellow Slime
  • Zombie

AnglerAngler
Plundering
{{itemsource|Sand Block}} ShimmerShimmer transmutation(Desktop, Console and Mobile versions): Sandstone Block / Hardened Sand Block
Chlorophyte ExtractinatorChlorophyte Extractinator conversion(Desktop, Console and Mobile versions): Ebonsand Block / Crimsand Block / Pearlsand Block
Plundering