Template:CraftingMaterials

From Raft Wiki
Jump to: navigation, search

{{{component1amount}}}x[[File:{{{component1name}}}.png|35px|link={{{component1name}}}]]

About the Documentation template Documentation - Template:CraftingMaterialsViewEditHistoryPurge

This Template is used for outputting data via a Cargo Query.

Usage

The Template will be used in a Cargo Query as below. It will output the required crafting materials in a comma separated string. The Template Template:ShowCraftingMaterials can be used for an easier handling and less text in the Wiki pages.

{{#cargo_query:
tables=RaftData
|fields=component1name,component1amount,component2name,component2amount,component3name,component3amount,component4name,component4amount,component5name,component5amount,
|where=Itemname="ITEM NAME"
|format=template
|template=CraftingMaterials
|named args=yes
}}

Known issues

If more than the require crafting materials are shown, it's because the same item name is used multiple times in the cargo table (e.g. on a translated page, where still the English name is used)


The above was transcluded from Template:CraftingMaterials/doc