Template:Block/doc: Difference between revisions
From Vintage Story Wiki
No edit summary |
(Marked this version for translation) |
||
Line 33: | Line 33: | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! <translate>Parameters</translate> !! <translate>Description</translate> !! <translate>Type</translate> !! <translate>Required</translate> | ! <translate><!--T:11--> Parameters</translate> !! <translate><!--T:12--> Description</translate> !! <translate><!--T:13--> Type</translate> !! <translate><!--T:14--> Required</translate> | ||
|- | |- | ||
| <translate>parameter1</translate> || <translate>Description of what parameter1 is</translate> || <translate>string/boolean/file/number/any</translate> || <translate>yes/no/suggested</translate> | | <translate><!--T:15--> parameter1</translate> || <translate><!--T:16--> Description of what parameter1 is</translate> || <translate><!--T:17--> string/boolean/file/number/any</translate> || <translate><!--T:18--> yes/no/suggested</translate> | ||
|- | |- | ||
| ''Name'' || <translate>Name of the block</translate> || <translate>string</translate> || <translate>yes</translate> | | ''Name'' || <translate><!--T:19--> Name of the block</translate> || <translate><!--T:20--> string</translate> || <translate><!--T:21--> yes</translate> | ||
|- | |- | ||
| ''Image'' || <translate>Filename of an image, including "File:" prefix and ".png" suffix</translate> || <translate>file</translate> || <translate>yes</translate> | | ''Image'' || <translate><!--T:22--> Filename of an image, including "File:" prefix and ".png" suffix</translate> || <translate><!--T:23--> file</translate> || <translate><!--T:24--> yes</translate> | ||
|- | |- | ||
| ''Material'' || <translate>The block's material type</translate> || <translate>string</translate> || <translate>suggested</translate> | | ''Material'' || <translate><!--T:25--> The block's material type</translate> || <translate><!--T:26--> string</translate> || <translate><!--T:27--> suggested</translate> | ||
|- | |- | ||
| ''Stackable'' || <translate>Maximum stack size, defaults to 64</translate> || <translate>number</translate> || <translate>suggested</translate> | | ''Stackable'' || <translate><!--T:28--> Maximum stack size, defaults to 64</translate> || <translate><!--T:29--> number</translate> || <translate><!--T:30--> suggested</translate> | ||
|- | |- | ||
| ''Drops'' || <translate>What the block drops on breaking</translate> || <translate>wikitext</translate> || <translate>suggested</translate> | | ''Drops'' || <translate><!--T:31--> What the block drops on breaking</translate> || <translate><!--T:32--> wikitext</translate> || <translate><!--T:33--> suggested</translate> | ||
|- | |- | ||
| ''Fertility'' || <translate>Fertility of the block for farming</translate> || <translate>percentage</translate> || <translate>no</translate> | | ''Fertility'' || <translate><!--T:34--> Fertility of the block for farming</translate> || <translate><!--T:35--> percentage</translate> || <translate><!--T:36--> no</translate> | ||
|- | |- | ||
| ''LightLevel'' || <translate>Light level that the block generates</translate> || <translate>number</translate> || <translate>no</translate> | | ''LightLevel'' || <translate><!--T:37--> Light level that the block generates</translate> || <translate><!--T:38--> number</translate> || <translate><!--T:39--> no</translate> | ||
|- | |- | ||
| ''SmeltTemp'' || <translate>Smelting temperature</translate> || <translate>number</translate> || <translate>yes for Item/Smeltable</translate> | | ''SmeltTemp'' || <translate><!--T:40--> Smelting temperature</translate> || <translate><!--T:41--> number</translate> || <translate><!--T:42--> yes for Item/Smeltable</translate> | ||
|- | |- | ||
| ''RequiresContainer'' || <translate>Whether or not smelting requires a container</translate> || <translate>string</translate> || <translate>no</translate> | | ''RequiresContainer'' || <translate><!--T:43--> Whether or not smelting requires a container</translate> || <translate><!--T:44--> string</translate> || <translate><!--T:45--> no</translate> | ||
|- | |- | ||
| ''OutputLink'' || <translate>Smelting output container page link</translate> || <translate>string</translate> || <translate>yes if RequiresContainer is present</translate> | | ''OutputLink'' || <translate><!--T:46--> Smelting output container page link</translate> || <translate><!--T:47--> string</translate> || <translate><!--T:48--> yes if RequiresContainer is present</translate> | ||
|- | |- | ||
| ''OutputName'' || <translate>Smelting output container name</translate> || <translate>string</translate> || <translate>yes if RequiresContainer is present</translate> | | ''OutputName'' || <translate><!--T:49--> Smelting output container name</translate> || <translate><!--T:50--> string</translate> || <translate><!--T:51--> yes if RequiresContainer is present</translate> | ||
|- | |- | ||
| ''OutputAmount'' || <translate>Amount of items obtained after emptying the container</translate> || <translate>number</translate> || <translate>yes if OutputName is present</translate> | | ''OutputAmount'' || <translate><!--T:52--> Amount of items obtained after emptying the container</translate> || <translate><!--T:53--> number</translate> || <translate><!--T:54--> yes if OutputName is present</translate> | ||
|- | |- | ||
| ''FloatRight'' || <translate>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)</translate> || <translate>any</translate> || <translate>no</translate> | | ''FloatRight'' || <translate><!--T:55--> 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)</translate> || <translate><!--T:56--> any</translate> || <translate><!--T:57--> no</translate> | ||
|- | |- | ||
| ''NoBreak'' || <translate>Whether or not the item box should end in a line break</translate> || <translate>any</translate> || <translate>no</translate> | | ''NoBreak'' || <translate><!--T:58--> Whether or not the item box should end in a line break</translate> || <translate><!--T:59--> any</translate> || <translate><!--T:60--> no</translate> | ||
|} | |} | ||
<translate> | <translate> | ||
Line 72: | Line 72: | ||
{| class="wikitable" style="width: 75%" | {| class="wikitable" style="width: 75%" | ||
|- | |- | ||
! <translate>Code</translate> !! <translate>Result</translate> | ! <translate><!--T:61--> Code</translate> !! <translate><!--T:62--> Result</translate> | ||
|- | |- | ||
| <pre> | | <pre> |
Revision as of 09:16, 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. |
|