Template:Item/doc/en: Difference between revisions
(Updating to match new version of source page) Tags: Mobile edit Mobile web edit |
(Updating to match new version of source page) |
||
Line 1: | Line 1: | ||
<languages /> | <noinclude><languages /></noinclude> | ||
This template creates an infobox for items in the game. It has the subcategories {{tl|Item/Food}}, {{tl|Item/Fuel}}, {{tl|Item/Smeltable}}, {{tl|Item/Transitionable}} for specific types of item. | This template creates an infobox for items in the game. It has the subcategories {{tl|Item/Food}}, {{tl|Item/Fuel}}, {{tl|Item/Smeltable}}, {{tl|Item/Transitionable}} for specific types of item. | ||
Line 27: | Line 27: | ||
|Satiety=Satiety points the item provides | |Satiety=Satiety points the item provides | ||
|Category=Satiety category of the item (e.g. Protein) | |Category=Satiety category of the item. One of the 7 allowed options (e.g. Protein) | ||
|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) | |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) | ||
Line 74: | Line 74: | ||
| ''Satiety'' || Satiety points the item provides || number || yes for ''Item/Food'' | | ''Satiety'' || Satiety points the item provides || number || yes for ''Item/Food'' | ||
|- | |- | ||
| ''Category'' || Satiety category of the item (e.g. Protein) || string || yes for ''Item/Food'' | | ''Category'' || Satiety category of the item. One of the [[Template:Item/Food/Category|7 allowed options]] (e.g. Protein) || string || yes for ''Item/Food'' | ||
|- | |- | ||
| ''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 | ||
Line 125: | Line 125: | ||
<nowiki>|TransitionRatio=0.5</nowiki><br> | <nowiki>|TransitionRatio=0.5</nowiki><br> | ||
<nowiki>|Satiety=100</nowiki><br> | <nowiki>|Satiety=100</nowiki><br> | ||
<nowiki>|Category=</nowiki> | <nowiki>|Category=</nowiki>Vegetable<br> | ||
<nowiki>|FloatRight=yes</nowiki><br> | <nowiki>|FloatRight=yes</nowiki><br> | ||
<nowiki>|NoBreak=yes</nowiki><br> | <nowiki>|NoBreak=yes</nowiki><br> | ||
Line 132: | Line 132: | ||
n.b. the translate tags "disappear" when put on a page that is properly [[Special:MyLanguage/Vintage_Story_Wiki:How_to_translate_the_wiki|marked for translation]]. | n.b. the translate tags "disappear" when put on a page that is properly [[Special:MyLanguage/Vintage_Story_Wiki:How_to_translate_the_wiki|marked for translation]]. | ||
The translator will not see any code. He will only see | The translator will not see any code. He will only see 3 sentences to translate: | ||
*Turnip | *Turnip | ||
*21 days | *21 days | ||
*48 hours | *48 hours | ||
The <code>Category</code> parameter for foods should not be marked for translation anymore. It auto-translates if [[Template:Item/Food/Category]] itself is translated. | |||
|| | || | ||
{{Item | {{Item |
Latest revision as of 15:37, 11 December 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 ".png" |Material=Material of the item |Stackable=Maximum stack size, defaults to 64 |Temp=Temperature at which the object burns as fuel |Duration=Burn duration in seconds |SmeltTemp=Smelting temp of the 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, defaults to 1 |FreshTime=Time the item stays fresh (e.g. time before you see it as 0% spoiled) |TransitionTime=Time the item takes to turn into something else (e.g. 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. One of the 7 allowed options (e.g. Protein) |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 of the metal | number | yes for Item/Smeltable |
RequiresContainer | Whether or not smelting requires a container | string (write anything for "yes" remove this line for "no") |
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 time this item stays fresh / untransitioned | string | yes for Item/Transitionable |
TransitionTime | The amount of time it takes for the item to transition e.g. from 0% spoiled to 100% spoiled | string | 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. One of the 7 allowed options (e.g. Protein) | 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 | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{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> {{Item The translator will not see any code. He will only see 3 sentences to translate:
The |
|