Template:Item/doc: Difference between revisions

From Vintage Story Wiki
(added translation links)
(Marked this version for translation)
Line 1: Line 1:
<languages />
<languages />
<translate>
<translate>
<!--T:1-->
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.


== Usage ==
== Usage == <!--T:2-->


<!--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.  


<!--T:4-->
<pre style="width: 75%">
<pre style="width: 75%">
{{Item
{{Item
Line 13: Line 16:
|Stackable=Maximum stack size, defaults to 64
|Stackable=Maximum stack size, defaults to 64


<!--T:5-->
|Temp=Burning temperature
|Temp=Burning temperature
|Duration=Burn duration in seconds
|Duration=Burn duration in seconds


<!--T:6-->
|SmeltTemp=Smelting temp
|SmeltTemp=Smelting temp
|SmeltDuration=Smelt duration in seconds
|SmeltDuration=Smelt duration in seconds
Line 22: Line 27:
|Output=Smelting output
|Output=Smelting output


<!--T:7-->
|FreshTime=Time in seconds the item stays fresh
|FreshTime=Time in seconds the item stays fresh
|TransitionTime=Time in seconds the item takes to turn into something else (e.g. rotten food)
|TransitionTime=Time in seconds the item takes to turn into something else (e.g. rotten food)
|TransitionRatio=(Unsure)
|TransitionRatio=(Unsure)


<!--T:8-->
|Satiety=Satiety points the item provides
|Satiety=Satiety points the item provides
|Category=Satiety category of the item
|Category=Satiety category of the item


<!--T:9-->
|NoBreak= Whether or not the item box should end in a line break
|NoBreak= Whether or not the item box should end in a line break
|FloatLeft= Whether or not the item box should float, allowing text to wrap to the left
|FloatLeft= Whether or not the item box should float, allowing text to wrap to the left
Line 34: Line 42:
}}</pre>
}}</pre>


<!--T:10-->
When translation tagging, enclose strings in translation tags rather than the entire template - see the example below.
When translation tagging, enclose strings in translation tags rather than the entire template - see the example below.


=== Parameters ===
=== Parameters === <!--T:11-->


<!--T:12-->
{| class="wikitable"
{| class="wikitable"
|-
|-
Line 79: Line 89:
|}
|}


=== Examples ===
=== Examples === <!--T:13-->
</translate>
</translate>
{| class="wikitable" style="width: 75%"
{| class="wikitable" style="width: 75%"
Line 120: Line 130:
||
||
{{Item
{{Item
|Name=<translate>Turnip</translate>
|Name=<translate><!--T:14--> Turnip</translate>
|Image=File:Grid turnip.png
|Image=File:Grid turnip.png
|Stackable=64
|Stackable=64
Line 127: Line 137:
|TransitionRatio=0.5
|TransitionRatio=0.5
|Satiety=100
|Satiety=100
|Category=<translate>Vegetable</translate>
|Category=<translate><!--T:15--> Vegetable</translate>
|FloatLeft=yes
|FloatLeft=yes
}}
}}

Revision as of 17:16, 18 May 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

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

|SmeltTemp=Smelting temp
|SmeltDuration=Smelt duration in seconds
|SmeltRatio=(Unsure)
|RequiresContainer=Whether or not smelting requires a container
|Output=Smelting output

|FreshTime=Time in seconds the item stays fresh
|TransitionTime=Time in seconds the item takes to turn into something else (e.g. rotten food)
|TransitionRatio=(Unsure)

|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
|FloatLeft= Whether or not the item box should float, allowing text to wrap to the left
|Margin= whether or not to set a margin around the item box
}}

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
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
FreshTime Time in seconds the item stays fresh 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 (Unsure) 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
FloatLeft Whether or not the item box should float, allowing text to wrap to the left any no
Margin whether or not to set a margin around the item box any no

Examples

Code Result
{{Item
|Name=Copper
|Image=File:Grid Copper Ingot.png
|Stackable=16
|SmeltTemp=1084
|SmeltDuration=
|RequiresContainer=Yes
|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