Template:Item/doc: Difference between revisions
From Vintage Story Wiki
No edit summary |
No edit summary |
||
Line 7: | Line 7: | ||
<!--T:3--> | <!--T:3--> | ||
The item infobox template should be placed at the top of the article, '''above''' the starting introductory text but below any translation tags where possible. Not every item infobox requires all the parameters - delete them as appropriate. | The item infobox template should be placed at the top of the article, '''above''' the starting introductory text but below any translation tags where possible. Not every item infobox requires all the parameters - delete them as appropriate. | ||
< | </translate> | ||
<pre style="width: 75%"> | <pre style="width: 75%"> | ||
{{Item | {{Item | ||
|Name= Name of the item | |Name=<translate>Name of the item</translate> | ||
|Image=Full image name with File: prefix and file extension | |Image=<translate>Full image name with File: prefix and file extension</translate> | ||
|Material=Material of the item | |Material=<translate>Material of the item</translate> | ||
|Stackable=Maximum stack size, defaults to 64 | |Stackable=<translate>Maximum stack size, defaults to 64</translate> | ||
|Temp=<translate>Burning temperature</translate> | |||
|Temp=Burning temperature | |Duration=<translate>Burn duration in seconds</translate> | ||
|Duration=Burn duration in seconds | |||
|SmeltTemp=<translate>Smelting temp</translate> | |||
|SmeltTemp=Smelting temp | |RequiresContainer=<translate>Whether or not smelting requires a container</translate> | ||
|RequiresContainer=Whether or not smelting requires a container | |OutputLink=<translate>Link to the container's (e.g. a mold) wiki page in your prefered language (you do not need to write Special:MyLanguage/)</translate> | ||
|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=<translate>Container name to be displayed (or its translation)</translate> | ||
|OutputName=Container name to be displayed (or its translation) | |OutputAmount=<translate>Number of items obtained after emptying the container</translate> | ||
|OutputAmount=Number of items obtained after emptying the container | |||
|FreshTime=<translate>Time in hours the item stays fresh (i.e. time before you see it as 0% spoiled)</translate> | |||
|FreshTime=Time in hours the item stays fresh (i.e. time before you see it as 0% spoiled) | |TransitionTime=<translate>Time in hours the item takes to turn into something else (i.e. time between 0% spoiled to 100% spoiled)</translate> | ||
|TransitionTime=Time in hours the item takes to turn into something else (i.e. time between 0% spoiled to 100% spoiled) | |TransitionRatio=<translate>Conversion ratio of fresh stacksize to transitioned stack size (e.g. 10 onions turned into 5 rot: 0.5)</translate> | ||
|TransitionRatio=Conversion ratio of fresh stacksize to transitioned stack size (e.g. 10 onions turned into 5 rot: 0.5) | |||
|Satiety=<translate>Satiety points the item provides</translate> | |||
|Satiety=Satiety points the item provides | |Category=<translate>Satiety category of the item</translate> | ||
|Category=Satiety category of the item | |||
|FloatRight=<translate>Whether or not the box should float on the right side of the page (so you don't have to use a <nowiki><div></div></nowiki> tag)</translate> | |||
|FloatRight= Whether or not the box should float on the right side of the page (so you don't have to use a <nowiki><div></div></nowiki> tag) | |NoBreak=<translate>Whether or not the item box should end in a line break</translate> | ||
|NoBreak= Whether or not the item box should end in a line break | |||
}}</pre> | }}</pre> | ||
<translate> | |||
<!--T:10--> | <!--T:10--> | ||
Line 47: | Line 43: | ||
=== Parameters === <!--T:11--> | === Parameters === <!--T:11--> | ||
</translate> | |||
<!--T:12--> | <!--T:12--> | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! Parameters !! Description !! Type !! Required | ! <translate>Parameters</translate> !! <translate>Description</translate> !! <translate>Type</translate> !! <translate>Required</translate> | ||
|- | |- | ||
| parameter1 || Description of what parameter1 is || string/boolean/file/number/any || yes/no/suggested | | <translate>parameter1</translate> || <translate>Description of what parameter1 is</translate> || <translate>string/boolean/file/number/any</translate> || <translate>yes/no/suggested</translate> | ||
|- | |- | ||
| Name || Name of the item || string || yes | | Name || <translate>Name of the item</translate> || <translate>string</translate> || <translate>yes</translate> | ||
|- | |- | ||
| Image || Filename of an image, including "File:" prefix and ".png" suffix || file || yes | | Image || <translate>Filename of an image, including "File:" prefix and ".png" suffix</translate> || <translate>file</translate> || <translate>yes</translate> | ||
|- | |- | ||
| Material || Material of the item || string || no | | Material || <translate>Material of the item</translate> || <translate>string</translate> || <translate>no</translate> | ||
|- | |- | ||
| Stackable || Maximum stack size, default 64 || number || suggested | | Stackable || <translate>Maximum stack size, default 64</translate> || <translate>number</translate> || <translate>suggested</translate> | ||
|- | |- | ||
| Temp || Burning temperature || number || no | | Temp || <translate>Burning temperature</translate> || <translate>number</translate> || <translate>no</translate> | ||
|- | |- | ||
| Duration || Burn duration in seconds || number || no | | Duration || <translate>Burn duration in seconds</translate> || <translate>number</translate> || <translate>no</translate> | ||
|- | |- | ||
| SmeltTemp || Smelting temperature || number || yes for Item/Smeltable | | SmeltTemp || <translate>Smelting temperature</translate> || <translate>number</translate> || <translate>yes for Item/Smeltable</translate> | ||
|- | |- | ||
|RequiresContainer || Whether or not smelting requires a container || boolean (y/n) || no | |RequiresContainer || <translate>Whether or not smelting requires a container</translate> || <translate>boolean (y/n)</translate> || <translate>no</translate> | ||
|- | |- | ||
|OutputLink || Smelting output container page link || string || yes if RequiresContainer is present | |OutputLink || <translate>Smelting output container page link</translate> || <translate>string</translate> || <translate>yes if RequiresContainer is present</translate> | ||
|- | |- | ||
|OutputName || Smelting output container name || string || yes if RequiresContainer is present | |OutputName || <translate>Smelting output container name</translate> || <translate>string</translate> || <translate>yes if RequiresContainer is present</translate> | ||
|- | |- | ||
|OutputAmount || Amount of items obtained after emptying the container || number || yes if OutputName is present | |OutputAmount || <translate>Amount of items obtained after emptying the container</translate> || <translate>number</translate> || <translate>yes if OutputName is present</translate> | ||
|- | |- | ||
|FreshTime || The amount of hours this item stays fresh / untransitioned || number || yes for Item/Transitionable | |FreshTime || <translate>The amount of hours this item stays fresh / untransitioned</translate> || <translate>number</translate> || <translate>yes for Item/Transitionable</translate> | ||
|- | |- | ||
|TransitionTime || The amount of time it takes for the item to transition e.g. from 0% spoiled to 100% spoiled || number || yes for Item/Transitionable | |TransitionTime || <translate>The amount of time it takes for the item to transition e.g. from 0% spoiled to 100% spoiled</translate> || <translate>number</translate> || <translate>yes for Item/Transitionable</translate> | ||
|- | |- | ||
|TransitionRatio || Conversion ratio of fresh stacksize to transitioned stack size e.g. 10 apples transition to 5 rots = 0.50 || float || no | |TransitionRatio || <translate>Conversion ratio of fresh stacksize to transitioned stack size e.g. 10 apples transition to 5 rots = 0.50</translate> || <translate>float</translate> || <translate>no</translate> | ||
|- | |- | ||
|Satiety || Satiety points the item provides || number || yes for Item/Food | |Satiety || <translate>Satiety points the item provides</translate> || <translate>number</translate> || <translate>yes for Item/Food</translate> | ||
|- | |- | ||
|Category || Satiety category of the item || string || yes for Item/Food | |Category || <translate>Satiety category of the item</translate> || <translate>string</translate> || <translate>yes for Item/Food</translate> | ||
|- | |- | ||
|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 || <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> | ||
|- | |- | ||
|NoBreak || Whether or not the item box should end in a line break || any || no | |NoBreak || <translate>Whether or not the item box should end in a line break</translate> || <translate>any</translate> || <translate>no</translate> | ||
|} | |} | ||
<translate> | |||
=== Examples === <!--T:13--> | === Examples === <!--T:13--> | ||
</translate> | </translate> | ||
{| class="wikitable" style="width: 75%" | {| class="wikitable" style="width: 75%" |
Revision as of 06:58, 27 July 2023
This template creates an infobox for items in the game. It has the subcategories {{Item/Food}}
, {{Item/Fuel}}
, {{Item/Smeltable}}
, {{Item/Transitionable}}
for specific types of item.
Usage
The item infobox template should be placed at the top of the article, above the starting introductory text but below any translation tags where possible. Not every item infobox requires all the parameters - delete them as appropriate.
{{Item |Name=Name of the item |Image=Full image name with File: prefix and file extension |Material=Material of the item |Stackable=Maximum stack size, defaults to 64 |Temp=Burning temperature |Duration=Burn duration in seconds |SmeltTemp=Smelting temp |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 |FreshTime=Time in hours the item stays fresh (i.e. time before you see it as 0% spoiled) |TransitionTime=Time in hours the item takes to turn into something else (i.e. time between 0% spoiled to 100% spoiled) |TransitionRatio=Conversion ratio of fresh stacksize to transitioned stack size (e.g. 10 onions turned into 5 rot: 0.5) |Satiety=Satiety points the item provides |Category=Satiety category of the item |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 }}
When translation tagging, enclose strings in translation tags rather than the entire template - see the example below.
Parameters
Parameters | Description | Type | Required |
---|---|---|---|
parameter1 | Description of what parameter1 is | string/boolean/file/number/any | yes/no/suggested |
Name | Name of the item | string | yes |
Image | Filename of an image, including "File:" prefix and ".png" suffix | file | yes |
Material | Material of the item | string | no |
Stackable | Maximum stack size, default 64 | number | suggested |
Temp | Burning temperature | number | no |
Duration | Burn duration in seconds | number | no |
SmeltTemp | Smelting temperature | number | yes for Item/Smeltable |
RequiresContainer | Whether or not smelting requires a container | boolean (y/n) | 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 |
FreshTime | The amount of hours this item stays fresh / untransitioned | number | yes for Item/Transitionable |
TransitionTime | The amount of time it takes for the item to transition e.g. from 0% spoiled to 100% spoiled | number | yes for Item/Transitionable |
TransitionRatio | Conversion ratio of fresh stacksize to transitioned stack size e.g. 10 apples transition to 5 rots = 0.50 | float | no |
Satiety | Satiety points the item provides | number | yes for Item/Food |
Category | Satiety category of the item | string | yes for Item/Food |
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 | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{tnt|Item |Name=Copper Ingot |Image=File:Grid Copper Ingot.png |Material=Metal |Stackable=16 |SmeltTemp=1084 |RequiresContainer=Yes |OutputLink=Ingot_mold |OutputName=Ingot mold |OutputAmount=1 |FloatRight=yes |NoBreak=yes }} |
| ||||||||||||||||||||||
</translate> {{tnt|Item |Name=<translate>Turnip</translate> |Image=File:Grid turnip.png |Stackable=64 |FreshTime=504 |TransitionTime=96 |TransitionRatio=0.5 |Satiety=100 |Category=<translate>Vegetable</translate> |FloatRight=yes |NoBreak=yes }} <translate>n.b. the translate tags "disappear" when put on a page that is properly marked for translation. |
|