Template:Item/doc: Difference between revisions

From Vintage Story Wiki
No edit summary
No edit summary
Line 15: Line 15:
|Image=Full image name with File: prefix and file extension
|Image=Full image name with File: prefix and file extension
|Stackable=Maximum stack size, defaults to 64
|Stackable=Maximum stack size, defaults to 64
|Material=Material of the item


<!--T:5-->
<!--T:5-->
Line 54: Line 55:
|-
|-
| Stackable || Maximum stack size, default 64 || number || suggested
| Stackable || Maximum stack size, default 64 || number || suggested
|-
| Material || Material of the item || string || no
|-
|-
| Temp || Burning temperature || number || no
| Temp || Burning temperature || number || no

Revision as of 09:08, 14 July 2023

Other languages:

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
|Stackable=Maximum stack size, defaults to 64
|Material=Material of the item

|Temp=Burning temperature
|Duration=Burn duration in seconds

|SmeltTemp=Smelting temp
|RequiresContainer=Whether or not smelting requires a container
|Output=Mold name (automatically creates a link to the article for the output item so make sure it's not a red link)
|OutputAmount=Number of items crafted in the mold

|FreshTime=Time in seconds the item stays fresh (i.e. time before you see it as 0% spoiled)
|TransitionTime=Time in seconds 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

|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
Name Name of the item string yes
Image Filename of an image file yes
Stackable Maximum stack size, default 64 number suggested
Material Material of the item string no
Temp Burning temperature number no
Duration Burn duration in seconds number no
SmeltTemp Smelting temperature number yes for Item/Smeltable
SmeltDuration Smelt duration in seconds number yes for Item/Smeltable
SmeltRatio (Unsure) float unsure
RequiresContainer Whether or not smelting requires a container boolean (y/n) no
Output Smelting output string no
OutputAmount Amount of items in the mold number yes if Output is present
FreshTime The amount of hours this item stays fresh / untransitioned number yes for Item/Transitionable
TransitionTime Time in seconds the item takes to turn into something else (e.g. rotten food) number yes for Item/Transitionable
TransitionRatio Conversion ratio of fresh stacksize to transitioned stack size float no
Satiety Satiety points the item provides number yes for Item/Food
Category Satiety category of the item string yes for Item/Food
NoBreak Whether or not the item box should end in a line break any no

Examples

Code Result
{{Item
|Name=Copper
|Image=File:Grid Copper Ingot.png
|Stackable=16
|SmeltTemp=1084
|SmeltDuration=
|RequiresContainer=Yes
|Output=Ingot mold
|OutputAmount=1
|FloatLeft=yes
}}
Copper
Grid Copper Ingot.png
Stackable 16
Smeltable
Smelt Point 1084°C
Requires Container Yes
Items

{{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>
|FloatLeft=yes
}}
n.b. the translate tags "disappear" when put on a page that is properly marked for translation.
Turnip
Grid turnip.png
Stackable 64
Food
Satiety 100
Category

Vegetable

Transitionable
Fresh Time 504
Transition Time 96
Transition Ratio 0.5
Items