Le modèle génère une infobox pour les articles. L'infobox fournit un résumé des statistiques associées à un élément donné. Il est prévu d'organiser l'information de manière cohérente pour tous les articles et de fournir un point de référence rapide pour des informations pertinentes sur l'article.
La mise en forme et le classement des informations sont en grande partie effectués par le modèle à quelques exceptions près (taille des images, ajout de liens, etc.).
Les informations sont transmises au modèle sous la forme de paramètres et de valeurs désignés comme tels: |parameter=value. Les paramètres ne contenant aucune valeur ou uniquement les espaces seront ignorés et ne seront pas inclus dans l'infobox.
Sommaire
Auto-Catégorie
L'inclusion du modèle catégorisera automatiquement l'article dans Categorie:Objets. De plus, certains paramètres permettent au modèle d'ajouter automatiquement l'élément à d'autres catégories. Les paramètres avec cette fonctionnalité sont indiqués ci-dessous dans la liste des paramètres. Cette fonctionnalité étend l'utilité de l'infobox mais elle n'est pas toujours souhaitable. Pour désactiver la catégorisation automatique, ajoutez la combinaison paramètre /valeur:|nocat=1
.
Le paramètre removed_version
affecte également la catégorisation automatique en désactivant la catégorisation par d'autres paramètres pour garantir que l'élément est uniquement catégorisé automatiquement dans Category:Objets Suprimés. Il peut y avoir d'autres catégories ajoutées à l'élément en dehors de l'infobox, que l'infobox ne peut pas contrôler ou manipuler.
Lien automatique
Si un champ est paramétré pour un lien automatique, il inclura automatiquement les balises [[ et ]] autour du champ. Ainsi, créer un lien vers la page référencée dans ce champ. Le modèle dans le lien devrait s'assurer que le champ est précis en passant la valeur à travers un modèle de validation, normalement la Valider la liste ou Valider la liste des modèles.
Le paramètre removed_version
désactive le système de liaison automatique.
Valeurs booléennes
Les paramètres qui attendent des valeurs booléennes telles que true ou false autorisent une certaine variation de la terminologie comme suit:
- 1, y, oui, t, vrai = VRAI
- 0, n, non, f, faux = FAUX
Pour plus d'informations, voir la documentation de Template: Validate_bool
Notes
- S'il vous plaît ajouter une petite image d'un élément que vous mettez dans l'infobox (par exemple des munitions) pour le look global.
Utilisez cette syntaxe:
|ammo=[[File: CrossbowBolt.png|20px|link=Arbalète]] [[Arbalète]]
ressemblera à: Arbalète
- Lors de l'utilisation des composants d'expérience, exp1 est l'expérience initiale acquise pour la première utilisation, exp2 est chaque utilisation ultérieure de l'article.
- La plupart des valeurs des éléments peuvent être trouvées dans items.xml.
- Les informations sur les objets transposables, tels que les pièges et les mines, se trouvent dans blocks.xml
Copier, Coller, et Remplacer
Veillez utiliser les modèles si dessous afin de permettre une lecture rapide et construite des pages du wiki.
Armes à Feu |
---|
{{Infobox_item/Sandbox |name = {{PAGENAME}} |image = |item-id = |group = |category = |type = |damage_min = |damage_max = |block_damage_min = |block_damage_max = |speed = |bonus_damage_headshot = |durability_min = |durability_max = |range = |ammo = |clip = |used_parts = |weight = |weight_forge = |metal = |meltable = |scrapable = |dismantleable = |scrap_iron = |ob_craft = |ob_loot = |ob_cheat = |repair = |unlocked = |ActionSkillGroup = |GunSkillGroup = |added_version = |confirmed_version = }} |
Vêtements |
---|
{{Infobox item |name = {{PAGENAME}} |image = |item-id = |group = |durability_min = |durability_max = |slot = |repair = |insulation = |waterproof = |concussive = |puncture = |burn-time = |bullet = |melee = |blunt = |explosives = |fuel = |ob_craft = |ob_cheat = |ActionSkillGroup = |CraftingSkillGroup = |added_version = |confirmed_version = }} |
Nouriture |
---|
{{Infobox item |name = {{PAGENAME}} |image = |group = |category = |item-id = |hunger = +1 |used_in = |used_in_cooking = |cookable = |ob_farm = |ob_scavenging = |ob_cheat = |ob_loot = |stack = |speed = |crafting_ingredient_time = |added_version = |confirmed_version = }} |
Syntaxe
Syntaxe de base:
{{Infobox item | name = {{PAGENAME}} | parameter = value | parameter = value | parameter = value }}
Paramètres
Parameter | Legal Values | Description | Auto-categorizes | Auto-links |
---|---|---|---|---|
removed | NOTE: Utilisez removed_version à la place. Version dans laquelle l'élément a été supprimé (remplace la catégorisation automatique ultérieure) | Y | ||
nocat | Désactive la catégorisation automatique. Syntaxe: nocat=true |
|||
name | Nom de l'objet. La syntaxe PAGENAME avec Modèle:'' et '' permet de reprendre le nom de la page | |||
image | Image de l'objet. | |||
caption | Légende de l'image. | |||
image_alt1 | Première alternative de l'image de la page. | |||
caption_alt1 | Légende pour la première alternative. | |||
image_alt2 | Seconde alternative de l'image de la page. | |||
caption_alt2 | Légende pour la seconde alternative. | |||
size | ||||
group |
|
Le groupe auquel appartient l'article. (Pour les groupes possibles, voir:Groupe)
Note: "Médecine (Groupe)" a été remplacé par Science dans Alpha 16 |
Y | Y |
category | La catégorie de l'objet. Voir: Catégories | Y | ||
type | Une liste séparée par des virgules d'une sous-catégorie, en fonction de l'élément. Par exemple, une arme à feu «semi-automatique» comprend maintenant un type d'outil | Y | ||
tool-type | N'a plus besoin d'ajouter au type. Valeurs reconnues: Mécanique, Manuel | Y | ||
item-id | Numéro d'identification de l'article. Se trouve entre parenthèses dans le menu créatif. | |||
CraftingSkillGroup |
|
The skill used to craft an item. Can be found in items.xml | Y | |
ActionSkillGroup |
|
The skill that receives skill points when an item is used. Can be found in items.xml | Y | |
location | ||||
found | ||||
breaks | Breaks into which items | |||
slot |
|
Gear slot. Example: for bandana slot = face |
||
tool-fuel | Fuel to use this tool. (There is only Gas Can.) | |||
places | ||||
exp | How much experience you gain from this item (First time | Subsequent times) | |||
cookable | Whether this item can be cooked | Y | ||
meltable | Whether this item can be melted | Y | ||
scrapable | Whether this item can be scrapped | Y | ||
dismantleable | Whether this item can be dismantled | Y | ||
lockable | Whether this item can be locked | Y | ||
storage | <Numeric> | How many storage slots this item has (if container) | ||
smell_tb | Smell radius when carried on toolbelt (in m) | |||
smell_tb_str | Smell strength when carried on toolbelt | |||
smell_br | Smell radius when carried in backpack (in m) | |||
smell_br_str | Smell strength when carried in backpack | |||
durability | <Numeric> | Durability of the item; see Durability | ||
cumulative_durability | <Numeric> | Cumulative Durability of the item, this includes all the durability of the items that this item will Break down into. | ||
durability_min | <Numeric> | The durability (hit points) of an item at its minimum quality. This is generally used for items that have a range of qualities, like clothes. | ||
durability_max | <Numeric> | The durability (hit points) of an item at its maximum quality. This is generally used for items that have a range of qualities, like clothes. | ||
degradation_rate_min | <Numeric> | The rate at which the durability decreases when the item is used. For some items this does not change from the max quality, and if so is displayed as one value. Defaults to 1. | ||
degradation_rate_max | <Numeric> | The rate at which the durability decreases when the item is used. For some items this does not change from the base(min) quality, and if so is displayed as one value. Defaults to 1. | ||
puredur | Pure durability of the item; see: Pure-Dur | |||
hardness | Hardness of the item; see: Hardness | |||
structural integrity | <Numeric> | See: Structural Integrity | ||
max_load | <Numeric> | See: Max Load | ||
mass | <Numeric> | Weight (only for blocks); see: Mass | ||
tool | The Appropriate Tool best to destroy this item (only for blocks) | |||
damage | <Numeric> | Damage this item deals to entities; see Entity Damage, this is generally used for explosive damage. | ||
explosive_radius_entities | <Numeric> | This is the radius of effect of the explosion as applied to entities, if this field exists then the above field specifies explosive damage. | ||
damage_min | <Numeric> | Minimum damage this item deals to entities; see Entity Damage | ||
damage_max | <Numeric> | Maximum damage this item deals to entities; see Entity Damage | ||
block_damage | <Numeric> | Damage this item deals to blocks; see Block Damage | ||
explosive_radius_blocks | <Numeric> | This is the radius of effect of the explosion as applied to blocks, if this field exists then the above field specifies explosive damage. | ||
block_damage_min | <Numeric> | Minimum damage this item deals to blocks; see Block Damage | ||
block_damage_max | <Numeric> | Maximum damage this item deals to blocks; see Block Damage | ||
range | <Numeric> | Weapon/Tool range. See: Range | ||
buff | Buff imparted by item. | |||
debuff | Buff removed by item | |||
buff_chance | Percent chance buff will be imparted | |||
buff_effect | How buff affects recipient. buff_effect = -150 HP |
|||
heat_map_strength | <Numeric> | Amount of heat generated (found in sounds.xml) | Y | |
heat_map_time | <Numeric> | Amount of time heat generated remains (found in sounds.xml) | ||
heat_map_frequency | Frequency in ticks that heat is incremented. Applies only to blocks (found in blocks.xml) | |||
reload_speed | <Numeric> | Time it takes to reload item | ||
speed | <Numeric> | Attack speed. | ||
bonus_damage_headshot | Headshot damage multiplier. | |||
inv_slots | ||||
stack | <Numeric> | Maximum amount of items in one stack | ||
insulation | Temperature modifier. This is the how much cooling or heating the item provides, negative is a cooling effect and positive is a heating effect. | |||
waterproof | How much protection the item provides against water, rain and the like, this will help or hinder with temperature effects. | |||
concussive_min | Concussive protection. Base. This is the protection given by a object of minimum or base quality. These are the displayed values not actual values, the actual values are affected by the quality of the item and its current level of durability from its maximum. | |||
concussive_max | Concussive protection. Maximum. This is the protection given by a object of minimum or base quality. These are the displayed values not actual values, the actual values are affected by the quality of the item and its current level of durability from its maximum. | |||
puncture_min | Punture protection. Base. This is the protection given by a object of minimum or base quality. These are the displayed values not actual values, the actual values are affected by the quality of the item and its current level of durability from its maximum. | |||
puncture_max | Punture protection. Maximum. This is the protection given by a object of minimum or base quality. These are the displayed values not actual values, the actual values are affected by the quality of the item and its current level of durability from its maximum. | |||
radiation_min | Radiation protection. Base. This is the protection given by a object of minimum or base quality. These are the displayed values not actual values, the actual values are affected by the quality of the item and its current level of durability from its maximum. | |||
radiation_max | Radiation protection. Maximum. This is the protection given by a object of minimum or base quality. These are the displayed values not actual values, the actual values are affected by the quality of the item and its current level of durability from its maximum. | |||
fire_min | Fire protection. Base. This is the protection given by a object of minimum or base quality. These are the displayed values not actual values, the actual values are affected by the quality of the item and its current level of durability from its maximum. | |||
fire_max | Fire protection. Maximum. This is the protection given by a object of minimum or base quality. These are the displayed values not actual values, the actual values are affected by the quality of the item and its current level of durability from its maximum. | |||
electrical_min | Electrical protection. Base. This is the protection given by a object of minimum or base quality. These are the displayed values not actual values, the actual values are affected by the quality of the item and its current level of durability from its maximum. | |||
electrical_max | Electrical protection. Maximum. This is the protection given by a object of minimum or base quality. These are the displayed values not actual values, the actual values are affected by the quality of the item and its current level of durability from its maximum. | |||
No longer used. Bullet protection. | ||||
No longer used. Melee protection. | ||||
No longer used. Blunt protection. | ||||
No longer used. Explosives protection. | ||||
hunger | Fullness change when you eat/drink this one. | |||
thirst | Thirst change when you eat/drink this one. | |||
health | Health change when you eat/drink this one. | |||
stamina | Stamina change when you eat/drink this one. | |||
well | Wellness change when you eat/drink this one. | |||
gas | Gassiness change when you eat/drink this one. | |||
consumption | Other effects when you eat/drink this one. | |||
ammo | The item this item uses as ammo (if any) | |||
clip | Amount of ammo that fits in one clip | |||
used_by | ||||
unlocks | The item this one unlocks (if any) | |||
unlocked | The item that unlocks this one (eg. schematic) | |||
repair | The item that is needed to repair this one | |||
repairs | The item this one repairs | |||
rep_value | The amount with which this item repairs | |||
used_in | Items you can craft with this one. | |||
used parts | Parts used to assembly. | |||
used in upgrading | This is a badly named field, or maybe it has changed meaning. What it currently means is what this item is upgraded to Wood Frame ---> Old Wood | |||
crafting_ingredient_time | The base time that this resource adds to the the crafting time, e.g. wood has a value of 0.25 seconds, so a base value Wood Frame would take 2.5 seconds. | |||
frame | ||||
used_parts_upgrading | Items used to upgrade this one. | |||
unlocked_cooking | ||||
used in cooking | ||||
provides_power | <integer> | Shows that this block or item provides electrical power , and can be used as a power source.
|
||
requires_power | <integer> | Shows that this block or item requires electrical power, the value given is the amount of power required to run this device.
|
||
used_utensil | ||||
used_ingredients | Ingredients used to cook this one. | |||
unlocked_chemistry | ||||
used_in_chemistry | ||||
used_ingredients_chemistry | ||||
used_in_forging | ||||
weight | Weight in lbs | |||
weight_forge | How much 'metal' this item gives when melted | |||
metal | The kind of metal this item gives when melted | |||
fuel | whether the item can be burnt | |||
burn-time | amount of time the item burns (in secs) | |||
ob_cheat | whether the item is obtainable through creative menu | Y | ||
ob_cook | whether the item is obtainable through cooking | Y | ||
ob_craft | whether the item is obtainable through crafting | Y | ||
ob_dismantle | whether the item is obtainable through dismanteling | Y | ||
ob_farm | whether the item is obtainable through farming | Y | ||
ob_forge | whether the item is obtainable through forging | Y | ||
ob_loot | whether the item is obtainable through looting | Y | ||
ob_mine | whether the item is obtainable through mining | Y | ||
ob_scavenge | whether the item is obtainable through scavenging | Y | ||
ob_scrap | whether the item is obtainable through scrapping | Y | ||
ob_upgrade | whether the item is obtainable through upgrading | Y | ||
scrap_iron | How much Scrap Iron this item gives when scraped | Y | ||
scrap_brass | How much Scrap Brass this item gives when scraped | Y | ||
scrap_lead | How much Scrap Lead this item gives when scraped | Y | ||
scrap_tungsten | How much Scrap Tungsten this item gives when scraped | Y | ||
cloth_fragment | How much Cloth Fragment this item gives when scraped | Y | ||
added_version | <Version String> | The version of 7D2D that the item was added. | Always | |
removed_version | <Version String> | <Version String> The version of 7D2D that the item was removed. Replaces the removed field. | Y | |
updated_version | <Version String> [, <Version String> ...] | A comma separated list of versions that the item has been updated. Note: These can not be links. |
Always | |
confirmed_version | <Version String> [, <Version String> ...] | A comma separated list of versions that the item has been comfirmed to be working. Should only be updated to the latest version when the details have been confirmed to be correct. Note: These can not be links. |
Always |
Ceci est la page de documentation du modèle, il devrait avoir subi une transclusion en la page principale du modèle. Voir Modèle:Doc pour plus d'information.