Template:Item/doc/fr

From Vintage Story Wiki
< Template:Item
Revision as of 06:59, 27 July 2023 by Xandoria (talk | contribs) (Created page with "Template:Item/doc")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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=<span lang="en" dir="ltr" class="mw-content-ltr">Name of the item</span>
|Image=<span lang="en" dir="ltr" class="mw-content-ltr">Full image name with File: prefix and file extension</span>
|Material=<span lang="en" dir="ltr" class="mw-content-ltr">Material of the item</span>
|Stackable=<span lang="en" dir="ltr" class="mw-content-ltr">Maximum stack size, defaults to 64</span>

|Temp=<span lang="en" dir="ltr" class="mw-content-ltr">Burning temperature</span>
|Duration=<span lang="en" dir="ltr" class="mw-content-ltr">Burn duration in seconds</span>

|SmeltTemp=<span lang="en" dir="ltr" class="mw-content-ltr">Smelting temp</span>
|RequiresContainer=<span lang="en" dir="ltr" class="mw-content-ltr">Whether or not smelting requires a container</span>
|OutputLink=<span lang="en" dir="ltr" class="mw-content-ltr">Link to the container's (e.g. a mold) wiki page in your prefered language (you do not need to write Special:MyLanguage/)</span>
|OutputName=<span lang="en" dir="ltr" class="mw-content-ltr">Container name to be displayed (or its translation)</span>
|OutputAmount=<span lang="en" dir="ltr" class="mw-content-ltr">Number of items obtained after emptying the container</span>

|FreshTime=<span lang="en" dir="ltr" class="mw-content-ltr">Time in hours the item stays fresh (i.e. time before you see it as 0% spoiled)</span>
|TransitionTime=<span lang="en" dir="ltr" class="mw-content-ltr">Time in hours the item takes to turn into something else (i.e. time between 0% spoiled to 100% spoiled)</span>
|TransitionRatio=<span lang="en" dir="ltr" class="mw-content-ltr">Conversion ratio of fresh stacksize to transitioned stack size (e.g. 10 onions turned into 5 rot: 0.5)</span>

|Satiety=<span lang="en" dir="ltr" class="mw-content-ltr">Satiety points the item provides</span>
|Category=<span lang="en" dir="ltr" class="mw-content-ltr">Satiety category of the item</span>

|FloatRight=<span lang="en" dir="ltr" class="mw-content-ltr">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)</span>
|NoBreak=<span lang="en" dir="ltr" class="mw-content-ltr">Whether or not the item box should end in a line break</span>
}}

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
}}
Copper Ingot
Grid Copper Ingot.png
Matériau Metal
Empilable 16
Fondable
Point de fusion 1084 °C
Nécessite un moule Oui
Type de moule Ingot mold
Quantité finale 1
Objets
</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.
Turnip
Grid turnip.png
Empilable 64
Nourriture
Satiété 100
Catégorie

Vegetable

Périssable
Temps de fraîcheur 504
Temps de transition 96
Ratio de transition 0.5
Objets