Template:Infobox ammo: Difference between revisions
(added ingredients parameter) |
(added up to 5 alt images + added count variable + incorporated Template:Img_item to weapon(s)) |
||
Line 2: | Line 2: | ||
|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">{{{name|{{{display_name|{{PAGENAME}}}}}}}}</span></div> | ||
| image = {{#if: {{{image|}}}|[[File:{{{image}}}| | | image = {{#if: {{{image|}}}|[[File:{{{image}}}|{{{display_name}}}|{{{image_width|120px}}}]]}} | ||
| caption = {{#if: {{{image_caption|}}}|''{{{image_caption|}}}''}} | | caption = {{#if: {{{image_caption|}}}|''{{{image_caption|}}}''}} | ||
| image2 = {{#if: {{{alternate_image|}}}| | |||
| 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}}} }}]] | |||
{{#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}}} }}]] | |||
{{#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}}} }}]] | |||
{{#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}}} }}]] | |||
{{#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}}} }}]] }} }} }} }} | |||
{{!}}} }} | |||
| imagestyle = padding:10px; | | imagestyle = padding:10px; | ||
Line 17: | Line 29: | ||
| label3 = Weapon(s) | | label3 = Weapon(s) | ||
| data3 = {{{weapons|}}} | | 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 = Loose Ammo | ||
Line 23: | Line 35: | ||
| label5 = Weight [[File:Moodle_heavyLoad.png|right|link=Moodles#Heavy Load|Heavy Load]] | | label5 = Weight [[File:Moodle_heavyLoad.png|right|link=Moodles#Heavy Load|Heavy Load]] | ||
| data5 = {{{loose_weight|}}} | | data5 = {{{loose_weight|}}} | ||
| label6 = {{#if:{{{count|}}}|{{abbr|Count|Amount that will spawn}}}} | |||
| data6 = {{{count|}}} | |||
| header7 = Box of Ammo | | header7 = Box of Ammo | ||
Line 37: | Line 52: | ||
| data31 = {{{ingredients|}}} | | data31 = {{{ingredients|}}} | ||
| label32 = Base ID | | label32 = Base ID {{#if:{{{class_name2|}}}|<small>(Loose)</small>}} | ||
| data32 = {{#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]]}}}}} | ||
| label33 = {{#if:{{{class_name2|}}}|Base ID <small>(Boxed)</small>}} | |||
| data33 = {{#if:{{{no_style|true}}}|{{ID|{{{class_name2|}}}}}|{{{class_name2|}}}}} | |||
}}</includeonly><noinclude>{{Documentation}}[[Category:Infobox]]</noinclude> | }}</includeonly><noinclude>{{Documentation}}[[Category:Infobox]]</noinclude> |
Revision as of 08:16, 24 July 2021
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 | ||||||
---|---|---|---|---|---|---|
| ||||||
General | ||||||
Category | category | |||||
Weapon(s) | weapons | |||||
Loose Ammo | ||||||
Weight | loose_weight | |||||
Count | count | |||||
Box of Ammo | ||||||
Weight | box_weight | |||||
Contents | contents Rounds | |||||
Technical details | ||||||
Ingredients | ingredients | |||||
Base ID (Loose) | Item IDs | |||||
Base 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 | |||
---|---|---|---|
| |||
General | |||
Category | Ammo | ||
Weapon(s) | |||
Loose Ammo | |||
Weight | 0.01 | ||
Count | 5 | ||
Box of Ammo | |||
Weight | 0.3 | ||
Contents | 30 Rounds | ||
Technical details | |||
Base ID (Loose) | Item IDs | ||
Base 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 }}
Editors can experiment in this template's sandbox (create)