Template:Infobox ammo: Difference between revisions

From PZwiki
mNo edit summary
m ({{Delete|Unused}})
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly>{{Infobox
<noinclude>{{Deprecated|Infobox item}}{{Delete|Unused}}</noinclude><includeonly>{{Infobox
|bodystyle  = width:350px; -moz-box-shadow: 0px 0px 2px 2px #{{Infobox nc|{{{name_colour|}}}}}; -webkit-box-shadow: 0px 0px 2px 2px #{{Infobox nc|{{{name_colour|}}}}}; box-shadow: 0px 0px 2px 2px #{{Infobox nc|{{{name_colour|}}}}}; border: 1px solid #{{Infobox nc|{{{name_colour|}}}}};
|bodystyle  = width:350px; -moz-box-shadow: 0px 0px 2px 2px #{{Infobox nc|{{{name_colour|}}}}}; -webkit-box-shadow: 0px 0px 2px 2px #{{Infobox nc|{{{name_colour|}}}}}; box-shadow: 0px 0px 2px 2px #{{Infobox nc|{{{name_colour|}}}}}; border: 1px solid #{{Infobox nc|{{{name_colour|}}}}};
| above      = <div style="background: #{{Infobox nc|{{{name_colour|}}}}}; padding: 5px; font-weight: bold; text-align: center; font-size: 120%; color:#{{Infobox nc|{{{name_text_colour|}}}|text}};"><span class="fn">{{{name|{{{display_name|{{PAGENAME}}}}}}}}</span></div>
| above      = <div style="background: #{{Infobox nc|{{{name_colour|}}}}}; padding: 5px; font-weight: bold; text-align: center; font-size: 120%; color:#{{Infobox nc|{{{name_text_colour|}}}|text}};"><span class="fn">{{Translation|{{{name|{{{display_name|{{PAGENAME}}}}}}}}}}</span></div>
| image      = {{#if: {{{image|}}}|[[File:{{{image}}}|{{{display_name}}}|{{{image_width|120px}}}]]}}
| image      = {{#if: {{{image|}}}|[[File:{{{image}}}|{{Translation|{{{display_name}}}}}|{{{image_width|128px}}}|class=pixelart]]}}


| caption    = {{#if: {{{image_caption|}}}|''{{{image_caption|}}}''}}
| caption    = {{#if: {{{image_caption|}}}|''{{{image_caption|}}}''}}


| image2    = {{#if: {{{alternate_image|}}}|{{{!}} style="margin:auto;" cellspacing=5
| image2    = {{#if: {{{alternate_image|}}}|{{{!}} style="margin:auto;" cellspacing=5
{{!}} style="width:32px; padding:2px; background-color:#EEEEEE; border: 1px solid #{{Infobox nc|{{{name_colour|}}}}}; margin:auto;" {{!}} [[Image:{{{alternate_image}}}|link={{{alternate_link|}}}{{#if: {{{alternate_name|}}} |{{!}}{{{alternate_name}}} }}]]
{{!}} style="width:32px; padding:2px; background-color:#EEEEEE; border: 1px solid #{{Infobox nc|{{{name_colour|}}}}}; margin:auto;" {{!}} [[Image:{{{alternate_image}}}|link={{{alternate_link|}}}{{#if: {{{alternate_name|}}} |{{!}}{{Translation|{{{alternate_name}}}}} }}]]
{{#if: {{{alternate_image2|}}}
{{#if: {{{alternate_image2|}}}
|{{!}} style="width:32px; padding:2px; background-color:#EEEEEE; border: 1px solid #{{Infobox nc|{{{name_colour|}}}}}; margin:auto;" {{!}} [[Image:{{{alternate_image2}}}|link={{{alternate_link2|}}}{{#if: {{{alternate_name2|}}} |{{!}}{{{alternate_name2}}} }}]]
|{{!}} style="width:32px; padding:2px; background-color:#EEEEEE; border: 1px solid #{{Infobox nc|{{{name_colour|}}}}}; margin:auto;" {{!}} [[Image:{{{alternate_image2}}}|link={{{alternate_link2|}}}{{#if: {{{alternate_name2|}}} |{{!}}{{Translation|{{{alternate_name2}}}}} }}]]
{{#if: {{{alternate_image3|}}}
{{#if: {{{alternate_image3|}}}
|{{!}} style="width:32px; padding:2px; background-color:#EEEEEE; border: 1px solid #{{Infobox nc|{{{name_colour|}}}}}; margin:auto;" {{!}} [[Image:{{{alternate_image3}}}|link={{{alternate_link3|}}}{{#if: {{{alternate_name3|}}} |{{!}}{{{alternate_name3}}} }}]]
|{{!}} style="width:32px; padding:2px; background-color:#EEEEEE; border: 1px solid #{{Infobox nc|{{{name_colour|}}}}}; margin:auto;" {{!}} [[Image:{{{alternate_image3}}}|link={{{alternate_link3|}}}{{#if: {{{alternate_name3|}}} |{{!}}{{Translation|{{{alternate_name3}}}}} }}]]
{{#if: {{{alternate_image4|}}}
{{#if: {{{alternate_image4|}}}
|{{!}} style="width:32px; padding:2px; background-color:#EEEEEE; border: 1px solid #{{Infobox nc|{{{name_colour|}}}}}; margin:auto;" {{!}} [[Image:{{{alternate_image4}}}|link={{{alternate_link4|}}}{{#if: {{{alternate_name4|}}} |{{!}}{{{alternate_name4}}} }}]]
|{{!}} style="width:32px; padding:2px; background-color:#EEEEEE; border: 1px solid #{{Infobox nc|{{{name_colour|}}}}}; margin:auto;" {{!}} [[Image:{{{alternate_image4}}}|link={{{alternate_link4|}}}{{#if: {{{alternate_name4|}}} |{{!}}{{Translation|{{{alternate_name4}}}}} }}]]
{{#if: {{{alternate_image5|}}}
{{#if: {{{alternate_image5|}}}
|{{!}} style="width:32px; padding:2px; background-color:#EEEEEE; border: 1px solid #{{Infobox nc|{{{name_colour|}}}}}; margin:auto;" {{!}} [[Image:{{{alternate_image5}}}|link={{{alternate_link5|}}}{{#if: {{{alternate_name5|}}} |{{!}}{{{alternate_name5}}} }}]] }} }} }} }}
|{{!}} style="width:32px; padding:2px; background-color:#EEEEEE; border: 1px solid #{{Infobox nc|{{{name_colour|}}}}}; margin:auto;" {{!}} [[Image:{{{alternate_image5}}}|link={{{alternate_link5|}}}{{#if: {{{alternate_name5|}}} |{{!}}{{Translation|{{{alternate_name5}}}}} }}]] }} }} }} }}
{{!}}} }}
{{!}}} }}


Line 23: Line 23:
| datastyle = width:50%;
| datastyle = width:50%;


| header1    = General
| header1    = {{Translation|General}}


| label2    = Category
| label2    = {{Translation|Category}}
| data2      = {{{category|Ammo}}}
| data2      = {{Translation|{{{category|Ammo}}}}}


| label3    = Weapon(s)
| label3    = {{Translation|Weapon(s)}}
| data3      = {{#if:{{{weapons|}}}|{{{weapons}}}|{{#if:{{{weapon1|}}}|{{img_item|item={{{weapon1|}}}}}}}{{#if:{{{weapon2|}}}|{{img_item|item={{{weapon2|}}}}}}}{{#if:{{{weapon3|}}}|{{img_item|item={{{weapon3|}}}}}}}{{#if:{{{weapon4|}}}|{{img_item|item={{{weapon4|}}}}}}}{{#if:{{{weapon5|}}}|{{img_item|item={{{weapon5|}}}}}}} }}
| data3      = {{#if:{{{weapons|}}}|{{{weapons}}}|{{#if:{{{weapon1|}}}|{{img_item|item={{{weapon1|}}}}}}}{{#if:{{{weapon2|}}}|{{img_item|item={{{weapon2|}}}}}}}{{#if:{{{weapon3|}}}|{{img_item|item={{{weapon3|}}}}}}}{{#if:{{{weapon4|}}}|{{img_item|item={{{weapon4|}}}}}}}{{#if:{{{weapon5|}}}|{{img_item|item={{{weapon5|}}}}}}} }}


| header4    = Loose Ammo
| header4    = {{Translation|Loose Ammo}}


| label5    = Weight [[File:Moodle_heavyLoad.png|right|link=Moodles#Heavy Load|Heavy Load]]
| label5    = {{Translation|Encumbrance}} [[File:Moodle_Icon_HeavyLoad.png|right|link=Moodles#Heavy Load|{{Translation|Heavy Load}}]]
| data5      = {{{loose_weight|}}}
| data5      = {{{loose_weight|}}}


| label6    = {{#if:{{{count|}}}|{{abbr|Count|Amount that will spawn}}}}
| label6    = {{#if:{{{count|}}}|{{abbr|{{Translation|Count}}|Amount that will spawn}}}}
| data6      = {{{count|}}}
| data6      = {{{count|}}}


| header7    = Box of Ammo
| header7    = {{Translation|Box of Ammo}}


| label8    = Weight [[File:Moodle_heavyLoad.png|right|link=Moodles#Heavy Load|Heavy Load]]
| label8    = {{Translation|Encumbrance}} [[File:Moodle_Icon_HeavyLoad.png|right|link=Moodles#Heavy Load|{{Translation|Heavy Load}}]]
| data8      = {{{box_weight|}}}
| data8      = {{{box_weight|}}}


| label9    = Contents
| label9    = {{Translation|Contents}}
| data9      = {{{contents|}}} Rounds
| data9      = {{{contents|}}} {{Translation|Rounds}}


| header29   = Technical details
| header30   = {{Translation|Technical details}}


| label30 = Ingredients
| label31 = {{Translation|Ingredients}}
| data30 = {{{ingredients|}}}
| data31 = {{{ingredients|}}}


| label31   = Base ID {{#if:{{{class_name2|}}}|<small>(Loose)</small>}}
| label32   = {{Translation|Item ID}} {{#if:{{{class_name2|}}}|<small>({{Translation|Loose}})</small>}}
| data31     = {{#if:{{{no_style|true}}}|{{ID|{{{class_name|[[#Item IDs|Item IDs]]}}}}}|{{{class_name|[[#Item IDs|Item IDs]]}}}}}
| data32     = {{#if:{{{no_style|true}}}|{{ID|{{{class_name|[[#Item IDs|Item IDs]]}}}}}|{{{class_name|[[#Item IDs|Item IDs]]}}}}}


| label32   = {{#if:{{{class_name2|}}}|Base ID <small>(Boxed)</small>}}
| label33   = {{#if:{{{class_name2|}}}|{{Translation|Item ID}} <small>({{Translation|Boxed}})</small>}}
| data32     = {{#if:{{{no_style|true}}}|{{ID|{{{class_name2|}}}}}|{{{class_name2|}}}}}
| data33     = {{#if:{{{no_style|true}}}|{{ID|{{{class_name2|}}}}}|{{{class_name2|}}}}}
}}</includeonly><noinclude>{{Documentation}}[[Category:Infobox]]</noinclude>
}}</includeonly><noinclude>{{Documentation}}[[Category:Infobox]]</noinclude>

Latest revision as of 06:00, 13 April 2024

Imbox content.png
This template is deprecated.
This template will eventually be removed. Please use Template:Infobox item instead.
Imbox deletion.png
This page is a candidate for deletion.
Reason: Unused
This page (and any subpages) will be deleted after being reviewed by an admin, and no one has objected to its deletion. Users may discuss this request for deletion on the page's talk page. Once added, this should only be removed by an admin, or the user that added it.
[view] [edit] [history] [purge] Template documentation
Imbox deletion.png
This page is a candidate for deletion.
Reason: Unused
This page (and any subpages) will be deleted after being reviewed by an admin, and no one has objected to its deletion. Users may discuss this request for deletion on the page's talk page. Once added, this should only be removed by an admin, or the user that added it.

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 =
|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
|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
}}
Documentation transcluded from Template:Infobox ammo/doc.
Editors can experiment in this template's sandbox (create)