Template:Infobox drainable: Difference between revisions
m (added unit to max units) |
m ({{Delete|Unused}}) |
||
(29 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
< | <noinclude>{{Deprecated|Infobox item}}{{Delete|Unused}}{{Documentation}}[[Category:Infobox]]</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|}}}}}; | ||
| | | 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> | ||
| name_text_colour = {{{ | | image = {{#if: {{{image|}}}|[[File:{{{image}}}|{{Translation|{{Translation|{{{display_name}}}}}}}|{{{image_width|128px}}}|class=pixelart]]}} | ||
| image = {{{image|}}} | | caption = {{#if: {{{image_caption|}}}|''{{{image_caption|}}}''}} | ||
| image_caption | | image2 = {{#if: {{{alternate_image|}}}|{{{!}} style="margin:auto;" cellspacing=5 | ||
| alternate_image = {{{alternate_image|}}} | {{!}} 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|}}} | ||
| | |{{!}} 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|}}} | ||
| label3 = | |{{!}} 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}}}}} }}]] | ||
| data3 = {{{ | {{#if: {{{alternate_image4|}}} | ||
| label4 = | |{{!}} 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}}}}} }}]] | ||
| data4 = {{{secondary_use|}}} | {{#if: {{{alternate_image5|}}} | ||
| label5 = | |{{!}} 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}}}}} }}]] | ||
| data5 = {{#if:{{{max_units|}}}|{{{max_units}}} units}} | {{#if: {{{alternate_image6|}}} | ||
| | |{{!}} style="width:32px; padding:2px; background-color:#EEEEEE; border: 1px solid #{{Infobox nc|{{{name_colour|}}}}}; margin:auto;" {{!}} [[Image:{{{alternate_image6}}}|link={{{alternate_link6|}}}{{#if: {{{alternate_name6|}}} |{{!}}{{Translation|{{{alternate_name6}}}}} }}]] | ||
| | {{#if: {{{alternate_image7|}}} | ||
| | |{{!}} style="width:32px; padding:2px; background-color:#EEEEEE; border: 1px solid #{{Infobox nc|{{{name_colour|}}}}}; margin:auto;" {{!}} [[Image:{{{alternate_image7}}}|link={{{alternate_link7|}}}{{#if: {{{alternate_name7|}}} |{{!}}{{Translation|{{{alternate_name7}}}}} }}]] | ||
| | {{#if: {{{alternate_image8|}}} | ||
| | |{{!}} style="width:32px; padding:2px; background-color:#EEEEEE; border: 1px solid #{{Infobox nc|{{{name_colour|}}}}}; margin:auto;" {{!}} [[Image:{{{alternate_image8}}}|link={{{alternate_link8|}}}{{#if: {{{alternate_name8|}}} |{{!}}{{Translation|{{{alternate_name8}}}}} }}]] }} }} }} }} }} }} }} | ||
| | {{!}}} }} | ||
| | |||
| | | image3 = {{#if: {{{alternate_image9|}}}|{{{!}} style="margin:auto;" cellspacing=5 | ||
| | {{!}} style="width:32px; padding:2px; background-color:#EEEEEE; border: 1px solid #{{Infobox nc|{{{name_colour|}}}}}; margin:auto;" {{!}} [[Image:{{{alternate_image9}}}|link={{{alternate_link9|}}}{{#if: {{{alternate_name9|}}} |{{!}}{{Translation|{{{alternate_name9}}}}} }}]] | ||
| | {{#if: {{{alternate_image10|}}} | ||
| | |{{!}} style="width:32px; padding:2px; background-color:#EEEEEE; border: 1px solid #{{Infobox nc|{{{name_colour|}}}}}; margin:auto;" {{!}} [[Image:{{{alternate_image10}}}|link={{{alternate_link10|}}}{{#if: {{{alternate_name10|}}} |{{!}}{{Translation|{{{alternate_name10}}}}} }}]] | ||
| | {{#if: {{{alternate_image11|}}} | ||
| | |{{!}} style="width:32px; padding:2px; background-color:#EEEEEE; border: 1px solid #{{Infobox nc|{{{name_colour|}}}}}; margin:auto;" {{!}} [[Image:{{{alternate_image11}}}|link={{{alternate_link11|}}}{{#if: {{{alternate_name11|}}} |{{!}}{{Translation|{{{alternate_name11}}}}} }}]] | ||
| | {{#if: {{{alternate_image12|}}} | ||
| | |{{!}} style="width:32px; padding:2px; background-color:#EEEEEE; border: 1px solid #{{Infobox nc|{{{name_colour|}}}}}; margin:auto;" {{!}} [[Image:{{{alternate_image12}}}|link={{{alternate_link12|}}}{{#if: {{{alternate_name12|}}} |{{!}}{{Translation|{{{alternate_name12}}}}} }}]] | ||
| | {{#if: {{{alternate_image13|}}} | ||
| | |{{!}} style="width:32px; padding:2px; background-color:#EEEEEE; border: 1px solid #{{Infobox nc|{{{name_colour|}}}}}; margin:auto;" {{!}} [[Image:{{{alternate_image13}}}|link={{{alternate_link13|}}}{{#if: {{{alternate_name13|}}} |{{!}}{{Translation|{{{alternate_name13}}}}} }}]] | ||
| | {{#if: {{{alternate_image14|}}} | ||
| | |{{!}} style="width:32px; padding:2px; background-color:#EEEEEE; border: 1px solid #{{Infobox nc|{{{name_colour|}}}}}; margin:auto;" {{!}} [[Image:{{{alternate_image14}}}|link={{{alternate_link14|}}}{{#if: {{{alternate_name14|}}} |{{!}}{{Translation|{{{alternate_name14}}}}} }}]] | ||
}} | {{#if: {{{alternate_image15|}}} | ||
|{{!}} style="width:32px; padding:2px; background-color:#EEEEEE; border: 1px solid #{{Infobox nc|{{{name_colour|}}}}}; margin:auto;" {{!}} [[Image:{{{alternate_image15}}}|link={{{alternate_link15|}}}{{#if: {{{alternate_name15|}}} |{{!}}{{Translation|{{{alternate_name15}}}}} }}]] | |||
{{#if: {{{alternate_image16|}}} | |||
|{{!}} style="width:32px; padding:2px; background-color:#EEEEEE; border: 1px solid #{{Infobox nc|{{{name_colour|}}}}}; margin:auto;" {{!}} [[Image:{{{alternate_image16}}}|link={{{alternate_link16|}}}{{#if: {{{alternate_name16|}}} |{{!}}{{Translation|{{{alternate_name16}}}}} }}]] }} }} }} }} }} }} }} | |||
{{!}}} }} | |||
| imagestyle = padding:10px; | |||
| headerstyle = background-color: #{{Infobox nc|{{{name_colour|}}}}}; color: #{{Infobox nc|{{{name_text_colour|}}}|text}}; | |||
| labelstyle = background-color:#eee; width:50%; | |||
| datastyle = width:50%; | |||
| header1 = {{Translation|General}} | |||
| label2 = {{Translation|Category}} | |||
| data2 = {{Translation|{{{category|Item}}}}} | |||
| label3 = {{Translation|Encumbrance}} [[File:Moodle_Icon_HeavyLoad.png|right|link=Moodles{{Subpage}}#{{Translation|Heavy Load}}|{{Translation|Heavy Load}}]] | |||
| data3 = {{{weight|}}} | |||
| label4 = {{Translation|Function}} | |||
| data4 = {{Translation|{{{function|{{{primary_use|}}}}}}{{#if:{{{secondary_use|}}}|<br>{{{secondary_use}}}}}}} | |||
| label5 = {{Translation|Required tool}} | |||
| data5 = {{Translation|{{{tool|}}}}} | |||
| label6 = {{Translation|Capacity}} | |||
| data6 = {{#if:{{{max_units|}}}|{{{max_units}}} {{Translation|units}}}} | |||
| label7 = {{Translation|Contents}} | |||
| data7= {{{contents|}}} | |||
| label8 = {{Translation|Can boil water}} | |||
| data8 = {{{can_boil_water|}}} | |||
| label9 = {{Translation|Rain factor}} | |||
| data9 = {{{rain_factor|}}} | |||
| label10 = {{Translation|Effect}} | |||
| data10 = {{Translation|{{{effect|}}}}} | |||
| label11 = {{Translation|Alcohol}} [[File:Moodle_Icon_Drunk.png|right|link=Moodles{{Subpage}}#{{Translation|Drunk}}|{{Translation|Drunk}}]] | |||
| data11 = {{{alcohol_power|}}} | |||
| label12 = {{Translation|Fatigue}} [[File:Moodle_Icon_Tired.png|right|link=Moodles{{Subpage}}#{{Translation|Endurance}}|{{Translation|Endurance}}]] | |||
| data12 = {{{fatigue_change|}}} | |||
| label13 = {{Translation|Light distance}} | |||
| data13 = {{#if:{{{light_distance|}}}|{{{light_distance}}} {{Translation|tiles}}}} | |||
| label14 = {{Translation|Light strength}} | |||
| data14 = {{{light_strength|}}} | |||
| label15 = {{Translation|Torch cone}} | |||
| data15 = {{{torch_cone|}}} | |||
| header31 = {{Translation|Technical details}} | |||
| label32 = {{Translation|item ID}} | |||
| data32 = {{#if:{{{no_style|true}}}|{{ID|{{{class_name|[[#Item IDs|Item IDs]]}}}}}|{{{class_name|[[#Item IDs|Item IDs]]}}}}} | |||
}}</includeonly> |
Latest revision as of 05:58, 13 April 2024
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 | Item | ||||||||
Encumbrance | weight | ||||||||
Function |
primary_use secondary_use | ||||||||
Capacity | max_units units | ||||||||
Contents | contents | ||||||||
Can boil water | can_boil_water | ||||||||
Rain factor | rain_factor | ||||||||
Effect | effect | ||||||||
Alcohol | alcohol_power | ||||||||
Fatigue | fatigue_change | ||||||||
Light distance | light_distance tiles | ||||||||
Light strength | light_strength | ||||||||
Torch cone | torch_cone | ||||||||
Technical details | |||||||||
item ID | Item IDs |
{{Infobox drainable |name = |image= |image_width= |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= |alternate_image6= |alternate_name6= |alternate_link6= |alternate_image7= |alternate_name7= |alternate_link7= |alternate_image8= |alternate_name8= |alternate_link8= |alternate_image9= |alternate_name9= |alternate_link9= |alternate_image10= |alternate_name10= |alternate_link10= |alternate_image11= |alternate_name11= |alternate_link11= |alternate_image12= |alternate_name12= |alternate_link12= |alternate_image13= |alternate_name13= |alternate_link13= |alternate_image14= |alternate_name14= |alternate_link14= |alternate_image15= |alternate_name15= |alternate_link15= |alternate_image16= |alternate_name16= |alternate_link16= |weight= |primary_use= |secondary_use= |max_units= |contents= |can_boil_water= |rain_factor= |effect= |alcohol_power= |fatigue_change= |light_distance= |light_strength= |torch_cone= |item_id = }}
Parameters
General
- 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
- Image of the model.
- image_width
- Width of the image model.
- alternate_image
- An alternate image displayed at 32px. Will typically be the icon or icon variants.
- alternate_name
- The name of the alternate item image. Leaving blank will display no name when the image is hovered over.
- alternate_link
- An optional link to the alternate image page. Leaving blank will have no link.
- weight
- The base weight of the item.
- primary_use
- The item's primary use. Can usually be removed if the item isn't considered a tool by the wiki. (remove if value is empty)
- secondary_use
- The item's secondary use if it has one. Can usually be removed if the item isn't considered a tool by the wiki. (remove if value is empty)
- max_units
- The maximum units in a full item. Calculated using the "UseDelta" value:
1 / UseDelta
. - class_name
- The item's class name.
Container
- contents
- The contents of the item, e.g. water, electricity, etc. (remove if value is not considered to have any contents)
- can_boil_water
- Whether this item can be used to boil/cook water. Displayed by the variable "iscookable". (remove if value is not considered a water container)
- rain_factor
- The item's rain factor when it's left on the ground while it's raining. (remove if value is empty)
Medical
- effect
- The alcohol power of this item when used on wounds. (remove if value is not considered a medical item)
- alcohol_power
- The alcohol power of this item when used on wounds. (remove if value is empty)
- fatigue_change
- The value of fatigue that is changed from using/consuming this item. (remove if value is empty)
Light Source
- light_distance
- The distance the light from the source will travel. (remove if value is not considered a light source)
- light_strength
- The intensity/brightness of light the source provides. (remove if value is not considered a light source)
- torch_cone
- Whether the light from this item travels in a single direction, a.k.a torch cone. (remove if value is not considered a light source)
Examples
General items, displaying the Thread infobox
Thread | ||
---|---|---|
| ||
General | ||
Category | Item | |
Encumbrance | 0.1 | |
Function |
Craft mattress Stitch deep wounds | |
Capacity | 10 units | |
Technical details | ||
item ID | Item IDs |
{{Infobox drainable |name =Thread |image=Thread_Model.png |alternate_image=Thread.png |alternate_name=Thread |weight=0.1 |primary_use=Craft [[mattress]] |secondary_use=Stitch [[Health#Types of Injuries|deep wounds]] |max_units=10 |item_id = Base.Thread }}
Power sources, displaying the Battery infobox
Battery | |
---|---|
General | |
Category | Item |
Encumbrance | 0.6 |
Function | Power small items |
Capacity | 100,000 units |
Contents | Electricity |
Technical details | |
item ID | Item IDs |
{{Infobox drainable |name =Battery |image=Battery.png |weight=0.6 |primary_use=Power small items |max_units=100,000 |contents=[[Electricity]] |item_id =Base.Battery }}
Medical items, displaying the Vitamins infobox
Vitamins | |
---|---|
General | |
Category | Item |
Encumbrance | 0.2 |
Function | Reduce tiredness |
Capacity | 10 units |
Fatigue | -2 |
Technical details | |
item ID | Item IDs |
{{Infobox drainable |name =Vitamins |image=Vitamins.png |weight=0.2 |primary_use=Reduce [[Moodles#Tired|tiredness]] |content=Vitamins |max_units=10 |fatigue_change=-2 |item_id =Base.PillsVitamins }}
Water containers, displaying the Bucket infobox
Bucket | |||
---|---|---|---|
| |||
General | |||
Category | Item | ||
Encumbrance |
1 (Empty) 4 (Full) | ||
Function | Cooking utensil | ||
Capacity | 25 units | ||
Contents | Water | ||
Can boil water | True | ||
Rain factor | 1 | ||
Technical details | |||
item ID | Item IDs |
{{Infobox drainable |name =Bucket |image=Bucket Model.png |image_width=200px |alternate_image=MetalBucket.png |alternate_name=Bucket |alternate_link= |alternate_image2=MetalBucket_Water.png |alternate_name2=Bucket of Water |alternate_link2= |weight=1 <small>(Empty)</small><br>4 <small>(Full)</small> |function=[[Cooking]] utensil |max_units=25 |contents=Water |can_boil_water=True |rain_factor=1 |item_id =Base.BucketEmpty<br>Base.BucketWaterFull }}
Editors can experiment in this template's sandbox (create)