Template:Infobox ammo/doc: Difference between revisions

From PZwiki
mNo edit summary
m (Automated class_name fix)
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<noinclude>{{Documentation subpage}}</noinclude>
{{Documentation subpage}}


This template is used to create an infobox in an article about empty water container, medical, drying, remote controller and other miscellaneous items.
This template is used to create an infobox in an article about empty water container, medical, drying, remote controller and other miscellaneous items.
Line 10: Line 10:
''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'''.''
''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'''.''
{{Infobox ammo
{{Infobox ammo
|display_name=display_name
|name =display_name
|name_colour=name_colour
|name_colour=name_colour
|name_text_colour=name_text_colour
|name_text_colour=name_text_colour
Line 36: Line 36:
|contents=contents
|contents=contents
|ingredients=ingredients
|ingredients=ingredients
|class_name=class_name
|item_id =class_name
|class_name2=class_name2
|class_name2=class_name2
}}<pre>
}}
 
<pre>
{{Infobox ammo
{{Infobox ammo
|display_name=
|name =
|name_colour=
|name_colour=
|name_text_colour=
|name_text_colour=
Line 70: Line 72:
<!--TECHNICAL DETAILS-->
<!--TECHNICAL DETAILS-->
|ingredients=
|ingredients=
|class_name=
|item_id =
|class_name2=
|class_name2=
}}</pre>
}}
 
</pre>


==Parameters==
==Parameters==
Line 78: Line 82:
;name_colour: The background colour for the display name. Codes can be found at [[Template:Infobox nc]].
;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]].
;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.
;image: An image of the icon displayed at 120px.
;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_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_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.
Line 95: Line 99:
'''Displaying [[9mm Rounds]] infobox'''
'''Displaying [[9mm Rounds]] infobox'''
{{Infobox ammo
{{Infobox ammo
|display_name=9mm Rounds
|name =9mm Rounds
|name_colour=Weapons
|name_colour=Weapons
|name_text_colour=Weapons
|name_text_colour=Weapons
|image=40calAmmoBox_120px.png
|image=40calAmmoBox.png
|alternate_image=40calAmmoBox.png{{!}}32px
|alternate_image=40calAmmoBox.png{{!}}32px
|alternate_name=Box of 9mm Bullets
|alternate_name=Box of 9mm Bullets
Line 106: Line 110:
|alternate_link2=
|alternate_link2=
|category=Ammo
|category=Ammo
|weapon1=[[Pistol]]
|weapon1=Pistol
|loose_weight=0.01
|loose_weight=0.01
|count=5
|count=5
|box_weight=0.3
|box_weight=0.3
|contents=30
|contents=30
|class_name=Base.Bullets9mm
|item_id =Base.Bullets9mm
|class_name2=Base.Bullets9mmBox
|class_name2=Base.Bullets9mmBox
}}<pre>{{Infobox ammo
}}
|display_name=9mm Rounds
 
<pre>{{Infobox ammo
|name =9mm Rounds
|name_colour=Weapons
|name_colour=Weapons
|name_text_colour=Weapons
|name_text_colour=Weapons
|image=40calAmmoBox_120px.png
|image=40calAmmoBox.png
|alternate_image=HandgunAmmoBox.png{{!}}32px
|alternate_image=HandgunAmmoBox.png{{!}}32px
|alternate_name=Box of 9mm Bullets
|alternate_name=Box of 9mm Bullets
Line 127: Line 133:
|box_weight=0.2
|box_weight=0.2
|contents=30
|contents=30
|class_name=Base.Bullets9mm
|item_id =Base.Bullets9mm
|class_name2=Base.Bullets9mmBox
|class_name2=Base.Bullets9mmBox
}}</pre>
}}</pre>
{{clear}}
{{clear}}

Latest revision as of 05:15, 18 March 2024

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) Item IDs
Item ID (Boxed) class_name2


{{Infobox ammo
|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=
|item_id =
|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.
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
{{{display_name}}}
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) Item IDs
Item ID (Boxed) Base.Bullets9mmBox


{{Infobox ammo
|name =9mm Rounds
|name_colour=Weapons
|name_text_colour=Weapons
|image=40calAmmoBox.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
|item_id =Base.Bullets9mm
|class_name2=Base.Bullets9mmBox
}}