Template:Infobox ammo/doc: Difference between revisions

From PZwiki
mNo edit summary
mNo edit summary
Line 106: Line 106:
|alternate_link2=
|alternate_link2=
|category=Ammo
|category=Ammo
|weapon1=[[Pistol]]
|weapon1=Pistol
|loose_weight=0.01
|loose_weight=0.01
|count=5
|count=5

Revision as of 12:48, 24 July 2021

Notebook.png
This is a documentation subpage for Template:Infobox ammo.
It contains usage information and other content that is not part of the original template page.

This template is used to create an infobox in an article about empty water container, medical, drying, remote controller and other miscellaneous items.

Usage

To use this template in an article, copy the template below, then paste the template into an article.

All parameters are optional – those you do not populate with data will not show up in the infobox when the article is saved.

It is strongly advised to only include variables that are relevant to the specific item in question, i.e. parameters that do not display as false or 0.

display_name
display_name
alternate_name alternate_name alternate_name alternate_name alternate_name
General
Category category
Weapon(s) weapons
Loose Ammo
Encumbrance
Heavy Load
loose_weight
Count count
Box of Ammo
Encumbrance
Heavy Load
box_weight
Contents contents Rounds
Technical details
Ingredients ingredients
Item ID (Loose) class_name
Item ID (Boxed) class_name2
{{Infobox ammo
|display_name=
|name_colour=
|name_text_colour=
|image=
|alternate_image=
|alternate_name=
|alternate_link=
|alternate_image2=
|alternate_name2=
|alternate_link2=
|alternate_image3=
|alternate_name3=
|alternate_link3=
|alternate_image4=
|alternate_name4=
|alternate_link4=
|alternate_image5=
|alternate_name5=
|alternate_link5=
<!--GENERAL-->
|category=
|weapons=
<!--LOOSE AMMO-->
|loose_weight=
|count=
<!--BOX OF AMMO-->
|box_weight=
|contents=
<!--TECHNICAL DETAILS-->
|ingredients=
|class_name=
|class_name2=
}}

Parameters

display_name
The display name of the item as it appears in-game. Leaving blank will display the pagename.
name_colour
The background colour for the display name. Codes can be found at Template:Infobox nc.
name_text_colour
The text colour for the display name. Codes can be found at Template:Infobox nc.
image
An image of the icon displayed at 120px. A 120px variant should be used if it has one.
alternate_image
An alternate image displayed at 32px. Can be an empty, packaged, open or any other variant. There can be up to 5 different images by added 2-5 at the end.
alternate_name
The name of the alternate item image. Leaving blank will display no name when the image is hovered over. There can be up to 5 different images by added 2-5 at the end.
alternate_link
An optional link to the alternate image page. Leaving blank will have no link. There can be up to 5 different images by added 2-5 at the end.
category
The in-game category the item is displayed as in the inventory. Usually "Ammo".
weapons
The weapons this ammo can be used in. The following template shouold be used: {{Img_item}}
loose_weight
The base weight of the loose ammo.
count
The number of this item that will spawn per roll.
box_weight
The base weight of the box of ammo.
contents
The number of ammo inside a box of ammo.
ingrdients
A list of ingredients required to make this item. Please use the following format: 1 × [[Plank]] and separate ingredients into a list with <br>.
class_name
The loose item's class name.
class_name2
The boxed item's class name.

Examples

Displaying 9mm Round infobox

9mm Rounds
9mm Rounds
Box of 9mm Bullets Box of 9mm Bullets
General
Category Ammo
Weapon(s) M9 Pistol
Loose Ammo
Encumbrance
Heavy Load
0.01
Count 5
Box of Ammo
Encumbrance
Heavy Load
0.3
Contents 30 Rounds
Technical details
Item ID (Loose) Base.Bullets9mm
Item ID (Boxed) Base.Bullets9mmBox
{{Infobox ammo
|display_name=9mm Rounds
|name_colour=Weapons
|name_text_colour=Weapons
|image=40calAmmoBox_120px.png
|alternate_image=HandgunAmmoBox.png{{!}}32px
|alternate_name=Box of 9mm Bullets
|alternate_link=
|category=Ammo
|weapon1=Pistol
|loose_weight=0.01
|count=5
|box_weight=0.2
|contents=30
|class_name=Base.Bullets9mm
|class_name2=Base.Bullets9mmBox
}}