Template:Block/doc/en: Difference between revisions
From Vintage Story Wiki
(Updating to match new version of source page) |
(Updating to match new version of source page) Tags: Mobile edit Mobile web edit |
||
Line 1: | Line 1: | ||
<languages /> | <languages /> | ||
This template creates an infobox that is designed for blocks in Vintage Story. It has the subcategories {{tl|Item/Fuel}} and {{tl|Item/Smeltable}} but it is currently unclear why it uses the Item prefix for smeltable blocks. | This template creates an infobox that is designed for blocks in Vintage Story. It has the subcategories {{tl|Item/Fuel}} and {{tl|Item/Smeltable}} but it is currently unclear why it uses the Item prefix for smeltable blocks. | ||
Line 15: | Line 14: | ||
|Fertility= Fertility of the block for farming | |Fertility= Fertility of the block for farming | ||
|LightLevel= Light level that the block generates | |LightLevel= Light level that the block generates | ||
|Temp= Burning temperature | |Temp= Burning temperature as a fuel | ||
|Duration= Burning duration in seconds | |Duration= Burning duration in seconds | ||
|SmeltTemp= Smelting temperature | |SmeltTemp= Smelting temperature as a metal | ||
|RequiresContainer= Whether or not smelting requires a container | |RequiresContainer= Whether or not smelting requires a container | ||
|OutputLink=Link to the container's (e.g. a mold) wiki page in your prefered language (you do not need to write Special:MyLanguage/) | |OutputLink=Link to the container's (e.g. a mold) wiki page in your prefered language (you do not need to write Special:MyLanguage/) | ||
Line 34: | Line 33: | ||
| parameter1 || Description of what parameter1 is || string/boolean/file/number/any || yes/no/suggested | | parameter1 || Description of what parameter1 is || string/boolean/file/number/any || yes/no/suggested | ||
|- | |- | ||
| Name || Name of the block || string || yes | | ''Name'' || Name of the block || string || yes | ||
|- | |- | ||
| Image || Filename of an image, including "File:" prefix and ".png" suffix || file || yes | | ''Image'' || Filename of an image, including "File:" prefix and ".png" suffix || file || yes | ||
|- | |- | ||
| Material || The block's material type || string || suggested | | ''Material'' || The block's material type || string || suggested | ||
|- | |- | ||
| Stackable || Maximum stack size, defaults to 64 || number || suggested | | ''Stackable'' || Maximum stack size, defaults to 64 || number || suggested | ||
|- | |- | ||
| Drops || What the block drops on breaking || wikitext || suggested | | ''Drops'' || What the block drops on breaking || wikitext || suggested | ||
|- | |- | ||
| Fertility || Fertility of the block for farming || percentage || no | | ''Fertility'' || Fertility of the block for farming || percentage || no | ||
|- | |- | ||
| LightLevel || Light level that the block generates || number || no | | ''LightLevel'' || Light level that the block generates || number || no | ||
|- | |- | ||
| SmeltTemp || Smelting temperature || number || yes for Item/Smeltable | | ''SmeltTemp'' || Smelting temperature || number || yes for Item/Smeltable | ||
|- | |- | ||
| RequiresContainer || Whether or not smelting requires a container || string || no | | ''RequiresContainer'' || Whether or not smelting requires a container || string || no | ||
|- | |- | ||
|OutputLink || Smelting output container page link || string || yes if RequiresContainer is present | | ''OutputLink'' || Smelting output container page link || string || yes if RequiresContainer is present | ||
|- | |- | ||
|OutputName || Smelting output container name || string || yes if RequiresContainer is present | | ''OutputName'' || Smelting output container name || string || yes if RequiresContainer is present | ||
|- | |- | ||
|OutputAmount || Amount of items obtained after emptying the container || number || yes if OutputName is present | | ''OutputAmount'' || Amount of items obtained after emptying the container || number || yes if OutputName is present | ||
|- | |- | ||
|FloatRight || Whether or not the box should float on the right side of the page<br>(so you don't have to use a <nowiki><div></div></nowiki> tag) || any || no | | ''FloatRight'' || Whether or not the box should float on the right side of the page<br>(so you don't have to use a <nowiki><div></div></nowiki> tag) || any || no | ||
|- | |- | ||
|NoBreak || Whether or not the item box should end in a line break || any || no | | ''NoBreak'' || Whether or not the item box should end in a line break || any || no | ||
|} | |} | ||
=== Examples === | === Examples === | ||
{| class="wikitable" style="width: 75%" | {| class="wikitable" style="width: 75%" | ||
|- | |- | ||
Line 74: | Line 74: | ||
|Material=Soil | |Material=Soil | ||
|Stackable=64 | |Stackable=64 | ||
|Drops=Low fertility soil | |Drops=[[Special:MyLanguage/Soil|Low fertility soil]] | ||
|Fertility=25% | |Fertility=25% | ||
|FloatRight=yes | |FloatRight=yes | ||
Line 86: | Line 86: | ||
|Stackable=64 | |Stackable=64 | ||
|Fertility=25% | |Fertility=25% | ||
|Drops=Low fertility soil | |Drops=[[Special:MyLanguage/Soil|Low fertility soil]] | ||
|FloatRight=yes | |FloatRight=yes | ||
|NoBreak=yes | |NoBreak=yes | ||
Line 98: | Line 98: | ||
|Material=<translate>Soil</translate> | |Material=<translate>Soil</translate> | ||
|Stackable=64 | |Stackable=64 | ||
|Drops=<translate> | |Drops=4-5 [[Special:MyLanguage/Clay|<translate>Blue clay</translate>]] | ||
|FloatRight=yes | |FloatRight=yes | ||
|NoBreak=yes | |NoBreak=yes | ||
Line 109: | Line 109: | ||
|Material=Soil | |Material=Soil | ||
|Stackable=64 | |Stackable=64 | ||
|Drops=4-5 Blue clay | |Drops= 4-5 [[Special:MyLanguage/Clay|Blue clay]] | ||
|FloatRight=yes | |FloatRight=yes | ||
|NoBreak=yes | |NoBreak=yes |
Revision as of 09:17, 29 July 2023
This template creates an infobox that is designed for blocks in Vintage Story. It has the subcategories {{Item/Fuel}}
and {{Item/Smeltable}}
but it is currently unclear why it uses the Item prefix for smeltable blocks.
Usage
Unused parameters can be safely deleted.
{{Block |Name= Name of the block |Image= Full image name with File: prefix and file extension i.e. File:Imageexample.png |Material= The block's material type |Stackable= Maximum stack size, defaults to 64 |Drops= What the block drops on breaking |Fertility= Fertility of the block for farming |LightLevel= Light level that the block generates |Temp= Burning temperature as a fuel |Duration= Burning duration in seconds |SmeltTemp= Smelting temperature as a metal |RequiresContainer= Whether or not smelting requires a container |OutputLink=Link to the container's (e.g. a mold) wiki page in your prefered language (you do not need to write Special:MyLanguage/) |OutputName=Container name to be displayed (or its translation) |OutputAmount=Number of items obtained after emptying the container |FloatRight= Whether or not the box should float on the right side of the page (so you don't have to use a <div></div> tag) |NoBreak= Whether or not the item box should end in a line break }}
Parameters
Parameters | Description | Type | Required |
---|---|---|---|
parameter1 | Description of what parameter1 is | string/boolean/file/number/any | yes/no/suggested |
Name | Name of the block | string | yes |
Image | Filename of an image, including "File:" prefix and ".png" suffix | file | yes |
Material | The block's material type | string | suggested |
Stackable | Maximum stack size, defaults to 64 | number | suggested |
Drops | What the block drops on breaking | wikitext | suggested |
Fertility | Fertility of the block for farming | percentage | no |
LightLevel | Light level that the block generates | number | no |
SmeltTemp | Smelting temperature | number | yes for Item/Smeltable |
RequiresContainer | Whether or not smelting requires a container | string | no |
OutputLink | Smelting output container page link | string | yes if RequiresContainer is present |
OutputName | Smelting output container name | string | yes if RequiresContainer is present |
OutputAmount | Amount of items obtained after emptying the container | number | yes if OutputName is present |
FloatRight | Whether or not the box should float on the right side of the page (so you don't have to use a <div></div> tag) |
any | no |
NoBreak | Whether or not the item box should end in a line break | any | no |
Examples
Code | Result | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{Block |Name=Forest soil |Image=File:Forestfloor-0.png |Material=Soil |Stackable=64 |Drops=[[Special:MyLanguage/Soil|Low fertility soil]] |Fertility=25% |FloatRight=yes |NoBreak=yes }} |
| ||||||||||||||
</translate> {{Block |Name=<translate>Blue clay</translate> |Image=File:Rawclay blue.png |Material=<translate>Soil</translate> |Stackable=64 |Drops=4-5 [[Special:MyLanguage/Clay|<translate>Blue clay</translate>]] |FloatRight=yes |NoBreak=yes }} <translate>n.b. The translate tags will be properly parsed and "disappear" once a page is marked for translation. |
|