Template:Infobox weapon/doc
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 any type of weapon, whether they be melee, ranged, throwable, or a trap.
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.
{{Infobox weapon |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= <!--GENERAL--> |category= |weight= |function= |equipped= |secondary_item= |condition_max= |attachment_type= <!--CHARACTERISTICS--> |ammo_type= |clip_size= |sound_radius= |recoil_delay= |reload_time= |aiming_time= <!--DAMAGE--> |type= |swing_time= |min_range= |max_range= |hit_chance= |min_damage= |max_damage= |tree_damage= |door_damage= |push_back= |knockdown= |kill_move= |effect_power= |effect_range= |effect_timer= |effect_type= |sensor_range= <!--TECHNICAL DETAILS--> |ingredients= |class_name= }}
Parameters
Heading/Image
- 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.
General
- Category
- The in-game category the item is displayed as in the inventory. Usually "Weapon".
- weight
- The base weight of the item.
- Function
- What the item is used for. 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-handed or two-handed.
- secondary_item
- The item required in the secondary slot to use this item, such as the Molotov Cocktail. (remove if value is empty)
- condition_max
- The item's maximum condition, i.e. when it's fully repaired.
Characteristics
- ammo_type
- 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)
- recoil_delay
- The time required between each shot before maximum accuracy. remove if value is empty)
- reload_time
- The time it takes to reload the weapon. (remove if value is empty)
- aiming_time
- The time taken to aim the weapon. (remove if value is empty)
Damage
- type
- The damage type this weapon does, such as blunt and blade. Firearms should be "gunshot". Throwables should be the same is their "effect_type".
- swing_time
- The time it takes to perform a full swing. (remove if value is empty)
- min_range
- The item's minimum range, regardless of whether it's melee or ranged. (make 0 if value is empty)
- max_range
- The item's maximum range, regardless of whether it's melee or ranged.
- hit_chance
- The chance of hitting an enemy for a firearm. Should be the "HitChance" variable. (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)
- tree_damage
- The item's damage to trees. (remove if value is empty)
- door_damage
- The item's damage to doors. (remove if value is empty)
- push_back
- The PushBackMod. (remove if value is empty)
- knockdown
- The KnockdownMod. (remove if value is empty)
- kill_move
- The special kill move a weapon has, such as Jaw Stab. (remove if value is empty)
- effect_power
- The power of the effect caused by the item. (remove if value is empty)
- effect_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
orNoiseRange
. (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)
- sensor_range
- How close an entity needs to be before the trap is triggered. (remove if value is empty)
Technical details
- ingredients
- 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 item's class name.
Examples
Blunt weapons, displaying the Baseball Bat infobox
Baseball Bat | |||
---|---|---|---|
| |||
General | |||
Category | Weapon | ||
Encumbrance | 2 | ||
Equipped | Two-handed | ||
Condition max. | 15 | ||
Skill | Long Blunt | ||
Damage | |||
Type | Blunt | ||
Attack speed | 3 | ||
Range | 0.61–1.5 tiles | ||
Damage | 0.8–1.2 | ||
Knockback | 0.5 | ||
Knockdown | 2 | ||
Technical details | |||
Base ID | Base.BaseballBat | ||
{{Infobox weapon |display_name=Baseball Bat |name_colour=Weapon |name_text_colour=Weapon |image=BaseballBat_Model.png |image_width=200px |alternate_image=BaseballBat.png |alternate_name=Baseball Bat |alternate_link= |alternate_image2=BaseballBatNails.png |alternate_name2=Spiked Baseball Bat |alternate_link2=Spiked Baseball Bat |category=Weapon |weight=2 |equipped=Two-handed |type=Blunt |min_range=0.61 |max_range=1.5 |swing_time=3 |condition_max=15 |min_damage=0.8 |max_damage=1.2 |push_back=0.5 |knockdown=2 |class_name=Base.BaseballBat }}
Blade weapons, displaying the Kitchen Knife infobox
Kitchen Knife | ||
---|---|---|
| ||
General | ||
Category | Weapon | |
Encumbrance | 0.3 | |
Function | Cooking | |
Equipped | One-handed | |
Condition max. | 10 | |
Skill | Blade | |
Damage | ||
Type | Blade | |
Attack speed | 2 | |
Range | 0.61–0.9 tiles | |
Damage | 0.3–0.6 | |
Tree damage | 1 | |
Door damage | 1 | |
Knockback | 0.3 | |
Knockdown | 0 | |
Execution | Jaw stab | |
Technical details | ||
Base ID | Base.KitchenKnife | |
{{Infobox weapon |display_name=Kitchen Knife |name_colour=Weapon |name_text_colour=Weapon |image=Knife_Model.png |image_width=200px |alternate_image=KnifeChopping.png |alternate_name=Kitchen Knife |alternate_link= <!--GENERAL--> |category=Weapon |weight=0.3 |function=[[Cooking]] |equipped=One-handed |condition_max=10 <!--DAMAGE--> |type=Blade |swing_time=2 |min_range=0.61 |max_range=0.9 |min_damage=0.3 |max_damage=0.6 |tree_damage=1 |door_damage=1 |push_back=0.3 |knockdown=0 |kill_move=Jaw stab <!--TECHNICAL DETAILS--> |class_name=Base.KitchenKnife }}
Firearm weapons, displaying the Pistol (disambiguation) infobox
Pistol | ||
---|---|---|
Pistol | ||
| ||
General | ||
Category | Weapon | |
Encumbrance | 2 | |
Equipped | One-handed | |
Condition max. | 10 | |
Skill | Gunshot | |
Characteristics | ||
Ammo type | 9mm Rounds | |
Magazine size | 15 | |
Noise radius | 150 tiles | |
Recoil delay | 20 | |
Reload time | 20 | |
Aiming time | 40 | |
Damage | ||
Type | Gunshot | |
Range | 0.61–10 tiles | |
Damage | 1–1.6 | |
Door damage | 5 | |
Accuracy | 45 | |
Knockback | 0.3 | |
Knockdown | 2 | |
Technical details | ||
Base ID | Base.Pistol | |
{{Infobox weapon |display_name=Pistol |name_colour=Weapon |name_text_colour=Weapon |image=HandGun_120px.png |alternate_image=40calAmmoBox.png |alternate_name=9mm Rounds |alternate_link=9mm Rounds <!--GENERAL--> |category=Weapon |weight=2 |equipped=One-handed |condition_max=10 <!--CHARACTERISTICS--> |ammo=9mm Rounds |clip_size=15 |sound_radius=150 |recoil_delay=20 |reload_time=20 |aiming_time=40 <!--DAMAGE--> |type=Gunshot |min_range=0.61 |max_range=10 |hit_chance=45 |min_damage=1 |max_damage=1.6 |door_damage=5 |push_back=0.3 |knockdown=2 <!--TECHNICAL DETAILS--> |class_name=Base.Pistol }}
Throwable weapons, displaying the Molotov Cocktail infobox
Molotov Cocktail | |
---|---|
Molotov Cocktail | |
General | |
Category | Weapon |
Encumbrance | 1.5 |
Equipped | One-handed |
Secondary | |
Skill | Fire |
Damage | |
Type | Fire |
Attack speed | 1.5 |
Range | 0–8 tiles |
Damage | 0–0 |
Fire power | 90 |
Fire range | 4 tiles |
Technical details | |
Base ID | Base.Molotov |
{{Infobox weapon |display_name=Molotov Cocktail |name_colour=Weapon |name_text_colour=Weapon |image=Molotov_120px.png <!--GENERAL--> |category=Weapon |weight=1.5 |equipped=One-handed |secondary_item=[[Lighter]] <!--DAMAGE--> |type=[[Fire]] |swing_time=1.5 |min_range=0 |max_range=8 |min_damage=0 |max_damage=0 |effect_power=90 |effect_range=4 |effect_type=Fire <!--TECHNICAL DETAILS--> |class_name=Base.Molotov }}
Trap weapons, displaying the Aerosol Bomb with Sensor infobox
Aerosol Bomb | ||
---|---|---|
Aerosol Bomb | ||
| ||
General | ||
Category | Weapon | |
Encumbrance | 1.5 | |
Equipped | One-handed | |
Skill | Explosion | |
Damage | ||
Type | Explosion | |
Attack speed | 1.5 | |
Range | 0–10 tiles | |
Damage | 0–0 | |
Explosion power | 70 | |
Explosion range | 6 tiles | |
Explosion timer | 50 | |
Technical details | ||
Ingredients |
1 × Hairspray 1 × Box of Sparklers 1 × Aluminum | |
Base ID | See Item IDs |
{{Infobox weapon |display_name=Aerosol Bomb |name_colour=Weapon |name_text_colour=Weapon |image=Aerosolbomb_120px.png |alternate_image=AerosolbombTimer.png |alternate_name=Aerosol Bomb with Upgrade |alternate_link= <!--GENERAL--> |category=Weapon |weight=1.5 |equipped=One-handed <!--DAMAGE--> |type=[[Fire|Explosion]] |swing_time=1.5 |min_range=0 |max_range=10 |min_damage=0 |max_damage=0 |effect_power=70 |effect_range=6 |effect_timer=50 |effect_type=Explosion <!--TECHNICAL DETAILS--> |ingredients=1 × [[Hairspray]]<br>1 × [[Box of Sparklers]]<br>1 × [[Aluminum]] |class_name=''See [[#Item IDs|Item IDs]]'' |no_style= }}