Template:Grid/Crafting/doc

From Vintage Story Wiki

This template allows editors to visually represent crafting grid recipes. Currently due to the way it's hardcoded it requires highly specific image filenames to work - this is under review and may change in the future.

Usage

{{Grid/Crafting
|A1=c1r1 |A1N=num |A1-link=link |A1_name
|A2=c1r2 |A2N=num |A2-link=link |A2_name
|A3=c1r3 |A3N=num |A3-link=link |A3_name
|B1=c2r1 |B1N=num |B1-link=link |B1_name
|B2=c2r2 |B2N=num |B2-link=link |B2_name
|B3=c2r3 |B3N=num |B3-link=link |B3_name
|C1=c3r1 |C1N=num |C1-link=link |C1_name
|C2=c4r2 |C2N=num |C2-link=link |C2_name
|C3=c3r3 |C3N=num |C3-link=link |C3_name
|Output=out |OA=num |Output-link=link |Output_name=name
|NoBreak=y
}}
Variable Optional? Description
Cell positions (e.g. A1) Required The columns are labelled A, B and C; the rows are 1, 2 and 3. Therefore, cell "A1" is the top left corner, "B2" is the middle cell, and so on. At least one cell must be filled. It takes only image filenames in a specific format.
Cell number (e.g. A1N) Optional The number of items that need to be placed in this cell.
Cell link (e.g. A1-link) Optional Link to the wiki page of the item. May be preceded by Special:MyLanguage/ to link to that wiki page in your preferd language.
Cell name (e.g. A1_name) Optional The name of the item in the cell, if it differs from the image name. It will be displayed in the tooltip of the item's icon.
Output Required The item that is created by this recipe.
OA Optional The number of items created by the recipe.
Output link (e.g. Output-link) Optional Link to the wiki page of the item. May be preceded by Special:MyLanguage/ to link to that wiki page in your prefered language.
Output_name Optional The name of the item created by the recipe.
NoBreak Optional Boolean (takes only y or n). Creates a line break after the block if set to "yes".
float Optional Sets the float style for the crafting grid.

Example

Displays the icon for each item.



CopperPickHead

Stick


CopperPick








Code:

{{Grid/Crafting
|B2=CopperPickHead
|B3=Stick
|Output=CopperPick
|NoBreak=y
|float=left
}}

Example with quantities

Displays the icon and the quantity for each item.



CopperPickHead

Stick


CopperPick

CopperPick

CopperPick



CopperPickHead

CopperPickHead

Stick

Stick




Code:

{{Grid/Crafting
|B2=CopperPickHead|B2N=4
|B3=Stick|B3N=5
|Output=CopperPick|OA=10
}}

Example with tooltips

If you leave your cursor over one of the icons, the correct name of the item will appear in its tooltip instead of the filename of its image.



CopperPickHead

Stick


CopperPick

CopperPick

CopperPick



CopperPickHead

CopperPickHead

Stick

Stick




Code:

{{Grid/Crafting
|B2=CopperPickHead|B2N=4|B2_name=Pickaxe head
|B3=Stick|B3N=5|B3_name=Stick
|Output=CopperPick|OA=10|Output_name=Pickaxe
}}

Example with links

If you click on one of the icons, you will go to the related wiki page (in your prefered language) of that item.

If you still arrive on the English version of the related page, it means that this page has not been translated yet into your language.



CopperPickHead

Stick


CopperPick

CopperPick

CopperPick



CopperPickHead

CopperPickHead

Stick

Stick




Code:

{{Grid/Crafting
|B2=CopperPickHead|B2N=4|B2-link=Special:MyLanguage/Casting|B2_name=Pickaxe head
|B3=Stick|B3N=5|B3-link=Special:MyLanguage/Stick|B3_name=Stick
|Output=CopperPick|OA=10|Output-link=Special:MyLanguage/Pickaxe|Output_name=Pickaxe
}}

Example prepared for an easy translation

The translator will not see any code. He will only see 3 sentences to translate:

  • Pickaxe head
  • Stick
  • Pickaxe

</translate>
{{Grid/Crafting
|B2=CopperPickHead|B2N=4|B2-link=Special:MyLanguage/Casting|B2_name=<translate>Pickaxe head</translate>
|B3=Stick|B3N=5|B3-link=Special:MyLanguage/Stick|B3_name=<translate>Stick</translate>
|Output=CopperPick|OA=10|Output-link=Special:MyLanguage/Pickaxe|Output_name=<translate>Pickaxe</translate>
<translate>