Template:Infobox weapon/doc

From PZwiki
< Template:Infobox weapon
Revision as of 02:14, 20 June 2018 by Vaileasys (talk | contribs) (added new variables)
Notebook.png
This is a documentation subpage for Template:Infobox weapon.
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
General
Category Weapon
Encumbrance
Heavy Load
weight
Function primary_use
secondary_use
Equipped equipped
Secondary Image.png
Condition max. condition_max
Characteristics
Ammo type Image.png
Magazine size clip_size
Noise radius sound_radius tiles
Damage
Range min_range–max_range tiles
Damage min_damage–max_damage
effect_type range effect_range tiles
Sensor range sensor_range tiles
Technical details
Base ID class_name
{{Infobox weapon
|display_name=
|image=
|alternate_image=
|alternate_name=
|alternate_link=
|weight=
|weight_bkg=
|weapon_type=
|weapon_type_bkg=
|primary_use=
|primary_use_bkg=
|secondary_use=
|secondary_use_bkg=
|equipped=
|equipped_bkg=
|secondary_item=
|secondary_item_bkg=
|ammo=
|ammo_bkg=
|clip_size=
|clip_size_bkg=
|condition_max=
|condition_max_bkg=
|min_range=
|max_range=
|range_bkg=
|min_damage=
|max_damage=
|damage_bkg=
|sound_radius=
|sound_radius_bkg=
|explosion_power=
|explosion_power_bkg=
|sensor_range=
|sensor_range_bkg=
|explosion_timer=
|explosion_timer_bkg=
|effect_range=
|effect_range_bkg=
|effect_type=
|effect_type_bkg=
|class_name=
|class_name_bkg=
}}


Parameters

General

display_name
The display name of the item as it appears in-game. Leaving blank will display the pagename.
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.
"_bkg" suffix
Will display a slightly darker background over the row; used for simpler identification between each row. Leaving blank will leave white, whereas inserting anything will give the darkened background. (same for each parameter with _bkg)
weapon_type
The skill this item belongs to, such as: blunt, blade or firearm. Any throwable weapon should be given the "Throwable" value.
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)
equipped
In which hand this item needs to be equipped: primary, secondary or both; one-hand or two-hands.
secondary_item
The item required in the secondary slot to use this item, such as the Molotov Cocktail. (remove if value is empty)
min_range
The item's minimum range, regardless of whether it's melee or ranged.
max_range
The item's maximum range, regardless of whether it's melee or ranged. (remove if value is empty)
min_damage
The item's minimum damage it can deal. (remove if value is empty)
max_damage
The item's maximum damage it can deal. (remove if value is empty)
class_name
The item's class name.


Firearms

ammo
The ammo type this weapon uses if it has one. (remove if value is empty)
clip_size
The amount of ammo/bullets in a single clip/magazine. (remove if value is empty)
sound_radius
The radius of sound that is given off from using the item. (remove if value is empty)


Throwables

secondary_item
The item that must be in the secondary hand/slot to use this weapon. (remove if value is empty)
explosion_power
The power of the explosion caused by the item. (remove if value is empty)
sensor_range
How close an entity needs to be before the trap is triggered. (remove if value is empty)
explosion_timer
Time before trap is triggered. Defined by the ExplosionTimer variable. (remove if value is empty)
effect_range
The range of the trap's effect. Defined by either ExplosionRange, FireRange, SmokeRange or NoiseRange. (remove if value is empty)
effect_type
The effect given-off by the trap. Can be either: "explosion", "fire", "smoke" or "noise". Any other value will display as "Effect range". (remove if value is empty)


Examples

Blunt weapons, displaying the Baseball Bat infobox

Baseball Bat
Baseball Bat
Spiked Baseball Bat
General
Category Weapon
Encumbrance
Heavy Load
2
Equipped Two-handed
Condition max. 15
Damage
Range 0.61–1.5 tiles
Damage 0.8–1.5
Technical details
Base ID Base.BaseballBat
{{Infobox weapon
|display_name=Baseball Bat
|image=Baseballbat.png
|alternate_image=BaseballBatNails.png
|alternate_name=Spiked Baseball Bat
|alternate_link=Spiked Baseball Bat
|weight=2
|weight_bkg=1
|weapon_type=Blunt
|equipped=Two-handed
|equipped_bkg=1
|condition_max=15
|min_range=0.61
|max_range=1.5
|range_bkg=1
|min_damage=0.8
|max_damage=1.5
|class_name=Base.BaseballBat
|class_name_bkg=1
}}





Blade weapons, displaying the Kitchen Knife infobox

Kitchen Knife
Kitchen Knife
General
Category Weapon
Encumbrance
Heavy Load
0.3
Function Weapon
Knife in recipes
Equipped One-handed
Condition max. 10
Damage
Range 0.61–0.9 tiles
Damage 0.3–0.3
Technical details
Base ID Base.KitchenKnife
{{Infobox weapon
|display_name=Kitchen Knife
|image=KnifeChopping.png
|weight=0.3
|weight_bkg=1
|weapon_type=Blade
|primary_use=Weapon
|primary_use_bkg=1
|secondary_use=Knife in recipes
|equipped=One-handed
|equipped_bkg=1
|condition_max=10
|min_range=0.61
|max_range=0.9
|range_bkg=1
|min_damage=0.3
|max_damage=0.3
|class_name=Base.KitchenKnife
|class_name_bkg=1
}}





Firearm weapons, displaying the Pistol (disambiguation) infobox

Pistol
Pistol
General
Category Weapon
Encumbrance
Heavy Load
2
Equipped One-handed
Condition max. 10
Characteristics
Ammo type Image.png
Magazine size 15
Noise radius 150 tiles
Damage
Range 0.61–10 tiles
Damage 1–1.6
Technical details
Base ID Base.Pistol
{{Infobox weapon
|display_name=Pistol
|image=HandGun.png
|weight=2
|weight_bkg=1
|weapon_type=Firearm
|equipped=One-handed
|equipped_bkg=1
|condition_max=10
|ammo=[[9mm Rounds]]<br>[[9mm Magazine]]
|ammo_bkg=1
|clip_size=15
|clip_size_bkg=1
|min_range=0.61
|max_range=10
|range_bkg=1
|min_damage=1
|max_damage=1.6
|sound_radius=150
|sound_radius_bkg=1
|class_name=Base.Pistol
}}





Throwable weapons, displaying the Molotov Cocktail infobox

Molotov Cocktail
Molotov Cocktail
General
Category Weapon
Encumbrance
Heavy Load
1.5
Equipped One-handed
Secondary Image.png
Damage
fire range 4 tiles
Technical details
Base ID Base.Molotov
{{Infobox weapon
|display_name=Molotov Cocktail
|image=Molotov_120px.png
|weight=1.5
|weight_bkg=1
|weapon_type=Throwable
|equipped=One-handed
|equipped_bkg=1
|secondary_item=[[Lighter]]
|min_range=0
|max_range=8
|range_bkg=1
|effect_type=fire
|effect_range=4
|class_name=Base.Molotov
|class_name_bkg=1
}}





Trap weapons, displaying the Aerosol Bomb with Timer infobox

Aerosol Bomb with Timer
Aerosol Bomb with Timer
Aerosol Bomb
General
Category Weapon
Encumbrance
Heavy Load
1.5
Equipped One-Handed
Damage
Range 0–10 tiles
explosion range 6 tiles
Technical details
Base ID Base.AerosolbombTriggered
{{Infobox weapon
|display_name=Aerosol Bomb with Timer
|image=AerosolbombTimer.png
|alternate_image=Aerosolbomb.png
|alternate_name=Aerosol Bomb
|alternate_link=Aerosol Bomb
|weight=1.5
|weight_bkg=1
|weapon_type=Throwable
|equipped=One-Handed
|equipped_bkg=1
|min_range=0
|max_range=10
|explosion_power=70
|explosion_power_bkg=1
|explosion_timer=10
|effect_type=explosion
|effect_range=6
|effect_bkg=1
|class_name=Base.AerosolbombTriggered
}}