Template:Infobox drainable/doc

From PZwiki
Notebook.png
This is a documentation subpage for Template:Infobox drainable.
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 any drainable item, such as light sources, water containers, medicals or other tools.

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_name2 alternate_name3
General
Category Item
Encumbrance
Heavy Load
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
Drunk
alcohol_power
Fatigue
Endurance
fatigue_change
Light distance light_distance tiles
Light strength light_strength
Torch cone torch_cone
Technical details
item ID class_name
{{Infobox drainable
|display_name=
|name_colour=
|name_text_colour=
|image=
|image_width=
|alternate_image=
|alternate_name=
|alternate_link=
|alternate_image2=
|alternate_name2=
|alternate_link2=
|alternate_image3=
|alternate_name3=
|alternate_link3=
|weight=
|primary_use=
|secondary_use=
|max_units=
|contents=
|can_boil_water=
|rain_factor=
|effect=
|alcohol_power=
|fatigue_change=
|light_distance=
|light_strength=
|torch_cone=
|class_name=
}}


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
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.
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 conents)
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
Thread
General
Category Item
Encumbrance
Heavy Load
0.1
Function Craft mattress
Stitch deep wounds
Capacity 10 units
Technical details
item ID Base.Thread
{{Infobox drainable
|display_name=Thread
|name_colour=Construction
|name_text_colour=Construction
|image=thread.png
|weight=0.1
|primary_use=Craft [[mattress]]
|secondary_use=Stitch [[Health#Types of Injuries|deep wounds]]
|max_units=10
|class_name=Base.Thread
}}

Power sources, displaying the Battery infobox

Battery
Battery
General
Category Item
Encumbrance
Heavy Load
0.6
Function Power small items
Capacity 100,000 units
Contents Electricity
Technical details
item ID Base.Battery
{{Infobox drainable
|display_name=Battery
|name_colour=Electrical
|name_text_colour=Electrical
|image=Battery_120px.png
|weight=0.6
|primary_use=Power small items
|max_units=100,000
|contents=[[Electricity]]
|class_name=Base.Battery
}}

Medical items, displaying the Vitamins infobox

Vitamins
Vitamins
General
Category Item
Encumbrance
Heavy Load
0.2
Function Reduce fatigue
Capacity 10 units
Fatigue
Endurance
-2
Technical details
item ID Base.PillsVitamins
{{Infobox drainable
|display_name=Vitamins
|name_colour=Medical
|name_text_colour=Medical
|image=Vitamins.png
|weight=0.2
|primary_use=Reduce [[Moodles#Tired|fatigue]]
|max_units=10
|fatigue_change=-2
|class_name=Base.PillsVitamins
}}

Water containers, displaying the Bucket infobox

Bucket of Water
Bucket of Water
Bucket
General
Category Item
Encumbrance
Heavy Load
4
Contents Water
Can boil water False
Rain factor 1
Technical details
item ID Base.BucketWaterFull
{{Infobox drainable
|display_name=Bucket of Water
|name_colour=Water
|name_text_colour=Water
|image=Bucket_Water.png
|alternate_image=Bucket_Empty.png
|alternate_name=Bucket
|alternate_link=Bucket
|weight=4
|contents=[[Water]]
|can_boil_water=False
|rain_factor=1
|class_name='Base.BucketWaterFull
}}