Template:Infobox weapon/doc: Difference between revisions

From PZwiki
mNo edit summary
m (Automated class_name fix)
 
(17 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<noinclude>{{Documentation subpage}}</noinclude>
{{Documentation subpage}}


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.
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.
Line 10: Line 10:
''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'''.''
''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
{{Infobox weapon
|display_name=display_name
|name =display_name
|name_colour=default
|name_colour=default
|name_text_colour=default
|name_text_colour=default
Line 24: Line 24:
|alternate_name3=alternate_name3
|alternate_name3=alternate_name3
|alternate_link3=
|alternate_link3=
|alternate_image4=image.png{{!}}32px
|alternate_name4=alternate_name4
|alternate_link4=
|alternate_image5=image.png{{!}}32px
|alternate_name5=alternate_name5
|alternate_link5=
|alternate_image6=image.png{{!}}32px
|alternate_name6=alternate_name6
|alternate_link6=
|alternate_image7=image.png{{!}}32px
|alternate_name7=alternate_name7
|alternate_link7=
|alternate_image8=image.png{{!}}32px
|alternate_name8=alternate_name8
|alternate_link8=
|alternate_image9=image.png{{!}}32px
|alternate_name9=alternate_name9
|alternate_link9=
|alternate_image10=image.png{{!}}32px
|alternate_name10=alternate_name10
|alternate_link10=
|alternate_image11=image.png{{!}}32px
|alternate_name11=alternate_name11
|alternate_link11=
|alternate_image12=image.png{{!}}32px
|alternate_name12=alternate_name12
|alternate_link12=
|alternate_image13=image.png{{!}}32px
|alternate_name13=alternate_name13
|alternate_link13=
|alternate_image14=image.png{{!}}32px
|alternate_name14=alternate_name14
|alternate_link14=


|category=category
|category=category
|weight=weight
|weight=weight
|weight2=weight2
|function=function
|function=function
|equipped=equipped
|equipped=equipped
|secondary_item=secondary_item
|secondary_item=secondary_item
|max_units=max_units
|contents=contents
|can_boil_water=can_boil_water
|rain_factor=rain_factor


|type=type
|type=type
|min_range=min_range
|min_range=min_range
|max_range=max_range
|max_range=max_range
|swing_time=swing_time
|base_speed=base_speed
|condition_max=condition_max
|condition_max=condition_max
|skill_type=skill_type
|attachment_type=attachment_type
|attachment_type=attachment_type


|min_damage=min_damage
|min_damage=min_damage
|max_damage=max_damage
|max_damage=max_damage
|crit_chance=crit_chance
|crit_multiplier=crit_multiplier
|tree_damage=tree_damage
|tree_damage=tree_damage
|door_damage=door_damage
|door_damage=door_damage
Line 46: Line 87:
|kill_move=kill_move
|kill_move=kill_move


|ammo_type=ammo_type
|ammo_type=
|ammo=ammo
|clip_size=clip_size
|clip_size=clip_size
|sound_radius=sound_radius
|sound_radius=sound_radius
Line 56: Line 98:
|effect_power=effect_power
|effect_power=effect_power
|effect_range=effect_range
|effect_range=effect_range
|effect_duration=effect_duration
|effect_timer=effect_timer
|effect_timer=effect_timer
|effect_type=effect_type
|effect_type=effect_type
Line 61: Line 104:


|ingredients=ingredients
|ingredients=ingredients
|class_name=class_name
|item_id =class_name
}}<pre>
|class_name2=class_name2
}}
 
<pre>
{{Infobox weapon
{{Infobox weapon
|display_name=
|name =
|name_colour=
|name_colour=
|name_text_colour=
|name_text_colour=
Line 78: Line 124:
|alternate_name3=
|alternate_name3=
|alternate_link3=
|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=
<!--GENERAL-->
<!--GENERAL-->
|category=
|category=
|weight=
|weight=
|weight2=
|function=
|function=
|equipped=
|equipped=
|secondary_item=
|secondary_item=
|max_units=
|contents=
|can_boil_water=
|rain_factor=
|condition_max=
|condition_max=
|skill_type=
|attachment_type=
|attachment_type=
<!--CHARACTERISTICS-->
<!--CHARACTERISTICS-->
|ammo_type=
|ammo_type=
|ammo=
|clip_size=
|clip_size=
|sound_radius=
|sound_radius=
Line 95: Line 181:
<!--DAMAGE-->
<!--DAMAGE-->
|type=
|type=
|swing_time=
|base_speed=
|min_range=
|min_range=
|max_range=
|max_range=
Line 101: Line 187:
|min_damage=
|min_damage=
|max_damage=
|max_damage=
|crit_chance=
|crit_multiplier=
|tree_damage=
|tree_damage=
|door_damage=
|door_damage=
Line 108: Line 196:
|effect_power=
|effect_power=
|effect_range=
|effect_range=
|effect_duration=
|effect_timer=
|effect_timer=
|effect_type=
|effect_type=
Line 113: Line 202:
<!--TECHNICAL DETAILS-->
<!--TECHNICAL DETAILS-->
|ingredients=
|ingredients=
|class_name=
|item_id =
}}</pre>
|class_name2=
}}
 
</pre>
{{clear}}
{{clear}}


Line 122: Line 214:
;name_colour: The background colour for the display name. Codes can be found at [[Template:Infobox nc]].
;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]].
;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.
;image: An image of the icon displayed at 128px.
;alternate_image: An alternate image displayed at 32px. Can be an empty, packaged, open or any other variant.
;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_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.
;alternate_link: An optional link to the alternate image page. Leaving blank will have no link.
===General===
===General===
;Category: The in-game category the item is displayed as in the inventory. Usually "Weapon".
;Category: The in-game category the item is displayed as in the inventory. Often "Weapon".
;weight: The base weight of the item.
;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)
;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)
Line 133: Line 225:
;secondary_item: The item required in the secondary slot to use this item, such as the [[Molotov Cocktail]]. ''(remove if value is empty)''
;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.
;condition_max: The item's maximum condition, i.e. when it's fully repaired.
;skill_type: The weapon's associated skill. ''(remove if value is empty)''
;max_units: The maximum units in a ''full'' item. Calculated using the "UseDelta" value: <code>1 / UseDelta</code>.
;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)''
===Characteristics===
===Characteristics===
;ammo_type: The ammo type this weapon uses if it has one. ''(remove if value is empty)''
;ammo_type: ''**DEPRECATED: use <code>ammo</code> instead**'' The ammo type this weapon uses if it has one. ''(remove if value is empty)''
;ammo: The ammo type this weapon uses. This value is used in {{tlx|img_item}} to automatically generate the ammo icon with link. ''(remove if value is empty)''
;clip_size: The amount of ammo/bullets in a single clip/magazine. ''(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)''
;sound_radius: The radius of sound that is given off from using the item. ''(remove if value is empty)''
Line 142: Line 240:
===Damage===
===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".
;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)''
;base_speed: The time it takes to perform a full swing (previously "swing_time"). ''(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)''
;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.  
;max_range: The item's maximum range, regardless of whether it's melee or ranged.  
Line 148: Line 246:
;min_damage: The item's minimum damage it can deal. ''(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)''
;max_damage: The item's maximum damage it can deal. ''(remove if value is empty)''
;crit_chance: The chance of doing a critical hit. ''(remove if value is empty)''
;crit_multiplier: The damage multiplayer when a critical hit. Appears as an abbr/tooltip for crit_chance. ''(remove if value is empty)''
;tree_damage: The item's damage to trees. ''(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)''
;door_damage: The item's damage to doors. ''(remove if value is empty)''
Line 153: Line 253:
;knockdown: The KnockdownMod. ''(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)''
;kill_move: The special kill move a weapon has, such as Jaw Stab. ''(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)''
;effect_power: The power of the effect caused by the item. ''(remove if value is empty)''
;effect_power: The power of the effect caused by the item. ''(remove if value is empty)''
;effect_range: The range of the trap's effect. Defined by either <code>ExplosionRange</code>, <code>FireRange</code>, <code>SmokeRange</code> or <code>NoiseRange</code>. ''(remove if value is empty)''
;effect_duration: The duration of the trap's effect. Defined by <code>NoiseDuration</code>. ''(remove if value is empty)''
;effect_timer: Time before trap is triggered. Defined by the <code>ExplosionTimer</code> variable. ''(remove if value is empty)''
;effect_timer: Time before trap is triggered. Defined by the <code>ExplosionTimer</code> variable. ''(remove if value is empty)''
;effect_range: The range of the trap's effect. Defined by either <code>ExplosionRange</code>, <code>FireRange</code>, <code>SmokeRange</code> or <code>NoiseRange</code>. ''(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)''
;sensor_range: How close an entity needs to be before the trap is triggered. ''(remove if value is empty)''
===Technical details===
===Technical details===
;ingredients: A list of ingredients required to make this item. Please use the following format: <code>1 × <nowiki>[[</nowiki>Plank]]</code> and separate ingredients into a list with <code><nowiki><</nowiki>br></code>.
;ingredients: A list of ingredients required to make this item. Please use the following format: <code>1 × <nowiki>[[</nowiki>Plank]]</code> and separate ingredients into a list with <code><nowiki><</nowiki>br></code>.
;class_name: The item's class name.
;class_name: The item's module and ID name.


==Examples==
==Examples==
'''Blunt weapons, displaying the [[Baseball Bat]] infobox'''
'''Blunt weapons, displaying the [[Baseball Bat]] infobox'''
{{Infobox weapon
{{Infobox weapon
|display_name=Baseball Bat
|name =Baseball Bat
|name_colour=Weapon
|name_text_colour=Weapon
|image=BaseballBat_Model.png
|image=BaseballBat_Model.png
|image_width=200px
|image_width=200px
Line 173: Line 272:
|alternate_name=Baseball Bat
|alternate_name=Baseball Bat
|alternate_link=
|alternate_link=
|alternate_image2=BaseballBatNails.png
<!--GENERAL-->
|alternate_name2=Spiked Baseball Bat
|category=Sports
|alternate_link2=Spiked Baseball Bat
|category=Weapon
|weight=2
|weight=2
|equipped=Two-handed
|equipped=One-handed
|condition_max=15
|attachment_type=Shovel
<!--DAMAGE-->
|type=Blunt
|type=Blunt
|skill_type=Blunt
|base_speed=1
|min_range=0.61
|min_range=0.61
|max_range=1.5
|max_range=1.25
|swing_time=3
|condition_max=15
|min_damage=0.8
|min_damage=0.8
|max_damage=1.2
|max_damage=1.1
|tree_damage=1
|door_damage=5
|push_back=0.5
|push_back=0.5
|knockdown=2
|knockdown=2
|class_name=Base.BaseballBat
<!--TECHNICAL DETAILS-->
}}<pre>
|ingredients=
|item_id =Base.BaseballBat
}}
 
<pre>
{{Infobox weapon
{{Infobox weapon
|display_name=Baseball Bat
|name =Baseball Bat
|name_colour=Weapon
|name_text_colour=Weapon
|image=BaseballBat_Model.png
|image=BaseballBat_Model.png
|image_width=200px
|image_width=200px
Line 199: Line 303:
|alternate_name=Baseball Bat
|alternate_name=Baseball Bat
|alternate_link=
|alternate_link=
|alternate_image2=BaseballBatNails.png
<!--GENERAL-->
|alternate_name2=Spiked Baseball Bat
|category=Sports
|alternate_link2=Spiked Baseball Bat
|category=Weapon
|weight=2
|weight=2
|equipped=Two-handed
|equipped=One-handed
|condition_max=15
|attachment_type=Shovel
<!--DAMAGE-->
|type=Blunt
|type=Blunt
|skill_type=Blunt
|base_speed=1
|min_range=0.61
|min_range=0.61
|max_range=1.5
|max_range=1.25
|swing_time=3
|condition_max=15
|min_damage=0.8
|min_damage=0.8
|max_damage=1.2
|max_damage=1.1
|tree_damage=1
|door_damage=5
|push_back=0.5
|push_back=0.5
|knockdown=2
|knockdown=2
|class_name=Base.BaseballBat
<!--TECHNICAL DETAILS-->
}}</pre>
|ingredients=
|item_id =Base.BaseballBat
}}
 
</pre>
{{clear}}
{{clear}}


'''Blade weapons, displaying the [[Kitchen Knife]] infobox'''
'''Blade weapons, displaying the [[Kitchen Knife]] infobox'''
{{Infobox weapon
{{Infobox weapon
|display_name=Kitchen Knife
|name =Kitchen Knife
|name_colour=Weapon
|name_text_colour=Weapon
|image=Knife_Model.png
|image=Knife_Model.png
|image_width=200px
|image_width=200px
Line 229: Line 338:
|alternate_link=
|alternate_link=
<!--GENERAL-->
<!--GENERAL-->
|category=Weapon
|category=Cooking
|weight=0.3
|weight=0.3
|function=[[Cooking]]
|equipped=One-handed
|equipped=One-handed
|condition_max=10
|condition_max=10
|attachment_type=Knife
<!--DAMAGE-->
<!--DAMAGE-->
|type=Blade
|type=Slash
|swing_time=2
|skill_type=SmallBlade
|min_range=0.61
|min_range=0.61
|max_range=0.9
|max_range=0.9
|min_damage=0.3
|min_damage=0.3
|max_damage=0.6
|max_damage=0.7
|tree_damage=1
|tree_damage=1
|door_damage=1
|door_damage=1
|push_back=0.3
|push_back=0.3
|knockdown=0
|knockdown=0
|kill_move=Jaw stab
|kill_move=Jaw_Stab
<!--TECHNICAL DETAILS-->
<!--TECHNICAL DETAILS-->
|class_name=Base.KitchenKnife
|ingredients=
}}<pre>
|item_id =Base.KitchenKnife
}}
 
<pre>
{{Infobox weapon
{{Infobox weapon
|display_name=Kitchen Knife
|name =Kitchen Knife
|name_colour=Weapon
|name_text_colour=Weapon
|image=Knife_Model.png
|image=Knife_Model.png
|image_width=200px
|image_width=200px
Line 259: Line 369:
|alternate_link=
|alternate_link=
<!--GENERAL-->
<!--GENERAL-->
|category=Weapon
|category=Cooking
|weight=0.3
|weight=0.3
|function=[[Cooking]]
|equipped=One-handed
|equipped=One-handed
|condition_max=10
|condition_max=10
|attachment_type=Knife
<!--DAMAGE-->
<!--DAMAGE-->
|type=Blade
|type=Slash
|swing_time=2
|skill_type=SmallBlade
|min_range=0.61
|min_range=0.61
|max_range=0.9
|max_range=0.9
|min_damage=0.3
|min_damage=0.3
|max_damage=0.6
|max_damage=0.7
|tree_damage=1
|tree_damage=1
|door_damage=1
|door_damage=1
|push_back=0.3
|push_back=0.3
|knockdown=0
|knockdown=0
|kill_move=Jaw stab
|kill_move=Jaw_Stab
<!--TECHNICAL DETAILS-->
<!--TECHNICAL DETAILS-->
|class_name=Base.KitchenKnife
|ingredients=
}}</pre>
|item_id =Base.KitchenKnife
}}
 
</pre>
{{clear}}
{{clear}}


'''Firearm weapons, displaying the [[Pistol]] infobox'''
'''Firearm weapons, displaying the [[M9 Pistol]] infobox'''
{{Infobox weapon
{{Infobox weapon
|display_name=Pistol
|name =M9 Pistol
|name_colour=Weapon
|image=Handgun03_Model.png
|name_text_colour=Weapon
|image_width=200px
|image=HandGun_120px.png
|alternate_image=HandGun3.png
|alternate_image=40calAmmoBox.png
|alternate_name=M9 Pistol
|alternate_name=9mm Rounds
|alternate_link=
|alternate_link=9mm Rounds
<!--GENERAL-->
<!--GENERAL-->
|category=Weapon
|category=Weapon
|weight=2
|weight=1.5
|equipped=One-handed
|equipped=One-handed
|condition_max=10
|condition_max=10
|attachment_type=Holster
<!--CHARACTERISTICS-->
<!--CHARACTERISTICS-->
|ammo_type=9mm Rounds
|ammo=Bullets9mm
|clip_size=15
|clip_size=15
|sound_radius=150
|sound_radius=40
|recoil_delay=20
|recoil_delay=20
|reload_time=20
|reload_time=30
|aiming_time=40
|aiming_time=15
<!--DAMAGE-->
<!--DAMAGE-->
|type=Gunshot
|type=Gunshot
|skill_type=Firearm
|min_range=0.61
|min_range=0.61
|max_range=10
|max_range=7
|hit_chance=45
|hit_chance=50
|min_damage=1
|min_damage=0.6
|max_damage=1.6
|max_damage=1
|door_damage=5
|door_damage=5
|push_back=0.3
|push_back=0.3
|knockdown=2
|knockdown=2
<!--TECHNICAL DETAILS-->
<!--TECHNICAL DETAILS-->
|class_name=Base.Pistol
|ingredients=
}}<pre>
|item_id =Base.Pistol
}}
 
<pre>
{{Infobox weapon
{{Infobox weapon
|display_name=Pistol
|name =M9 Pistol
|name_colour=Weapon
|image=Handgun03_Model.png
|name_text_colour=Weapon
|image_width=200px
|image=HandGun_120px.png
|alternate_image=HandGun3.png
|alternate_image=40calAmmoBox.png
|alternate_name=M9 Pistol
|alternate_name=9mm Rounds
|alternate_link=
|alternate_link=9mm Rounds
<!--GENERAL-->
<!--GENERAL-->
|category=Weapon
|category=Weapon
|weight=2
|weight=1.5
|equipped=One-handed
|equipped=One-handed
|condition_max=10
|condition_max=10
|attachment_type=Holster
<!--CHARACTERISTICS-->
<!--CHARACTERISTICS-->
|ammo_type=9mm Rounds
|ammo=Bullets9mm
|clip_size=15
|clip_size=15
|sound_radius=150
|sound_radius=40
|recoil_delay=20
|recoil_delay=20
|reload_time=20
|reload_time=30
|aiming_time=40
|aiming_time=15
<!--DAMAGE-->
<!--DAMAGE-->
|type=Gunshot
|type=Gunshot
|skill_type=Firearm
|min_range=0.61
|min_range=0.61
|max_range=10
|max_range=7
|hit_chance=45
|hit_chance=50
|min_damage=1
|min_damage=0.6
|max_damage=1.6
|max_damage=1
|door_damage=5
|door_damage=5
|push_back=0.3
|push_back=0.3
|knockdown=2
|knockdown=2
<!--TECHNICAL DETAILS-->
<!--TECHNICAL DETAILS-->
|class_name=Base.Pistol
|ingredients=
}}</pre>
|item_id =Base.Pistol
}}
 
</pre>
{{clear}}
{{clear}}


'''Throwable weapons, displaying the [[Molotov Cocktail]] infobox'''
'''Throwable weapons, displaying the [[Molotov Cocktail]] infobox'''
{{Infobox weapon
{{Infobox weapon
|display_name=Molotov Cocktail
|name =Molotov Cocktail
|name_colour=Weapon
|image=Molotov_Model.png
|name_text_colour=Weapon
|image_width=200px
|image=Molotov_120px.png
|alternate_image=Molotov.png
|alternate_name=Molotov Cocktail
|alternate_link=
<!--GENERAL-->
<!--GENERAL-->
|category=Weapon
|category=Devices
|weight=1.5
|weight=1.5
|equipped=One-handed
|equipped=One-handed
|secondary_item=[[Lighter]]
|secondary_item=Lighter
<!--DAMAGE-->
<!--DAMAGE-->
|type=Fire
|type=Fire
|swing_time=1.5
|effect_power=90
|min_range=0
|effect_range=4
|effect_type=Fire
|max_range=8
|max_range=8
|min_damage=0
|min_damage=0
|max_damage=0
|max_damage=0
|effect_power=90
|effect_range=4
|effect_type=Fire
<!--TECHNICAL DETAILS-->
<!--TECHNICAL DETAILS-->
|class_name=Base.Molotov
|ingredients=
}}<pre>
|item_id =Base.Molotov
}}
 
<pre>
{{Infobox weapon
{{Infobox weapon
|display_name=Molotov Cocktail
|name =Molotov Cocktail
|name_colour=Weapon
|image=Molotov_Model.png
|name_text_colour=Weapon
|image_width=200px
|image=Molotov_120px.png
|alternate_image=Molotov.png
|alternate_name=Molotov Cocktail
|alternate_link=
<!--GENERAL-->
<!--GENERAL-->
|category=Weapon
|category=Devices
|weight=1.5
|weight=1.5
|equipped=One-handed
|equipped=One-handed
|secondary_item=[[Lighter]]
|secondary_item=Lighter
<!--DAMAGE-->
<!--DAMAGE-->
|type=[[Fire]]
|type=Fire
|swing_time=1.5
|effect_power=90
|min_range=0
|effect_range=4
|effect_type=Fire
|max_range=8
|max_range=8
|min_damage=0
|min_damage=0
|max_damage=0
|max_damage=0
|effect_power=90
|effect_range=4
|effect_type=Fire
<!--TECHNICAL DETAILS-->
<!--TECHNICAL DETAILS-->
|class_name=Base.Molotov
|ingredients=
}}</pre>
|item_id =Base.Molotov
}}
 
</pre>
{{clear}}
{{clear}}


'''Trap weapons, displaying the [[Aerosol Bomb|Aerosol Bomb with Sensor]] infobox'''
'''Trap weapons, displaying the [[Aerosol Bomb|Aerosol Bomb with Sensor]] infobox'''
{{Infobox weapon
{{Infobox weapon
|display_name=Aerosol Bomb
|name =Aerosol Bomb with Timer
|name_colour=Weapon
|image=Molotov_Model.png
|name_text_colour=Weapon
|image_width=200px
|image=Aerosolbomb_120px.png
|alternate_image=AerosolbombTimer.png
|alternate_image=AerosolbombTimer.png
|alternate_name=Aerosol Bomb with Upgrade
|alternate_name=Aerosol Bomb with Timer
|alternate_link=
|alternate_link=
<!--GENERAL-->
<!--GENERAL-->
|category=Weapon
|category=Devices
|weight=1.5
|weight=1.5
|equipped=One-handed
|equipped=One-handed
<!--DAMAGE-->
<!--DAMAGE-->
|type=[[Fire|Explosion]]
|type=Explosion
|swing_time=1.5
|effect_power=70
|min_range=0
|effect_range=6
|effect_timer=10
|effect_type=Explosion
|max_range=10
|max_range=10
|min_damage=0
|min_damage=0
|max_damage=0
|max_damage=0
|effect_power=70
|knockdown=0
|effect_range=6
|effect_timer=50
|effect_type=Explosion
<!--TECHNICAL DETAILS-->
<!--TECHNICAL DETAILS-->
|ingredients=1 × [[Hairspray]]<br>1 × [[Box of Sparklers]]<br>1 × [[Aluminum]]
|ingredients=
|class_name=''See [[#Item IDs|Item IDs]]''
|item_id =Base.AerosolbombTriggered
|no_style=
}}
}}<pre>
 
<pre>
{{Infobox weapon
{{Infobox weapon
|display_name=Aerosol Bomb
|name =Aerosol Bomb with Timer
|name_colour=Weapon
|image=Molotov_Model.png
|name_text_colour=Weapon
|image_width=200px
|image=Aerosolbomb_120px.png
|alternate_image=AerosolbombTimer.png
|alternate_image=AerosolbombTimer.png
|alternate_name=Aerosol Bomb with Upgrade
|alternate_name=Aerosol Bomb with Timer
|alternate_link=
|alternate_link=
<!--GENERAL-->
<!--GENERAL-->
|category=Weapon
|category=Devices
|weight=1.5
|weight=1.5
|equipped=One-handed
|equipped=One-handed
<!--DAMAGE-->
<!--DAMAGE-->
|type=[[Fire|Explosion]]
|type=Explosion
|swing_time=1.5
|effect_power=70
|min_range=0
|effect_range=6
|effect_timer=10
|effect_type=Explosion
|max_range=10
|max_range=10
|min_damage=0
|min_damage=0
|max_damage=0
|max_damage=0
|effect_power=70
|knockdown=0
|effect_range=6
|effect_timer=50
|effect_type=Explosion
<!--TECHNICAL DETAILS-->
<!--TECHNICAL DETAILS-->
|ingredients=1 × [[Hairspray]]<br>1 × [[Box of Sparklers]]<br>1 × [[Aluminum]]
|ingredients=
|class_name=''See [[#Item IDs|Item IDs]]''
|item_id =Base.AerosolbombTriggered
|no_style=
}}
}}</pre>
 
</pre>
{{clear}}
{{clear}}

Latest revision as of 05:18, 18 March 2024

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 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.

display_name
{{{display_name}}}
alternate_name alternate_name2 alternate_name3 alternate_name4 alternate_name5 alternate_name6 alternate_name7
alternate_name8 alternate_name9 alternate_name10 alternate_name11 alternate_name12 alternate_name13 alternate_name14
General
Category category
Encumbrance
Heavy Load

(Empty)
weight
Encumbrance
Heavy Load

(Full)
weight2
Function function
Equipped equipped
Secondary Image.png
Capacity max_units units
Contents contents
Can boil water can_boil_water
Rain factor rain_factor
Condition max. condition_max
Skill skill_type
Attachment attachment_type
Ammo type Image.png
Magazine size clip_size
Noise radius sound_radius tiles
Recoil delay recoil_delay
Reload time reload_time
Aiming time aiming_time
Damage
Type type
Attack speed base_speed
Range min_range–max_range tiles
Damage min_damage–max_damage
Crit chance crit_chance%
Tree damage tree_damage
Door damage door_damage
Accuracy hit_chance
Knockback push_back
Knockdown knockdown
Execution kill_move
effect_type power effect_power
effect_type range effect_range tiles
effect_type duration effect_duration minutes
effect_type timer effect_timer
Sensor range sensor_range tiles
Technical details
Ingredients ingredients
Base ID (Empty) Item IDs
Base ID (Full) class_name2


{{Infobox weapon
|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=
|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=
<!--GENERAL-->
|category=
|weight=
|weight2=
|function=
|equipped=
|secondary_item=
|max_units=
|contents=
|can_boil_water=
|rain_factor=
|condition_max=
|skill_type=
|attachment_type=
<!--CHARACTERISTICS-->
|ammo_type=
|ammo=
|clip_size=
|sound_radius=
|recoil_delay=
|reload_time=
|aiming_time=
<!--DAMAGE-->
|type=
|base_speed=
|min_range=
|max_range=
|hit_chance=
|min_damage=
|max_damage=
|crit_chance=
|crit_multiplier=
|tree_damage=
|door_damage=
|push_back=
|knockdown=
|kill_move=
|effect_power=
|effect_range=
|effect_duration=
|effect_timer=
|effect_type=
|sensor_range=
<!--TECHNICAL DETAILS-->
|ingredients=
|item_id =
|class_name2=
}}

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 128px.
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. Often "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.
skill_type
The weapon's associated skill. (remove if value is empty)
max_units
The maximum units in a full item. Calculated using the "UseDelta" value: 1 / UseDelta.
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)

Characteristics

ammo_type
**DEPRECATED: use ammo instead** The ammo type this weapon uses if it has one. (remove if value is empty)
ammo
The ammo type this weapon uses. This value is used in {{img_item}} to automatically generate the ammo icon with link. (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".
base_speed
The time it takes to perform a full swing (previously "swing_time"). (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)
crit_chance
The chance of doing a critical hit. (remove if value is empty)
crit_multiplier
The damage multiplayer when a critical hit. Appears as an abbr/tooltip for crit_chance. (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_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)
effect_power
The power of the effect caused by the item. (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_duration
The duration of the trap's effect. Defined by NoiseDuration. (remove if value is empty)
effect_timer
Time before trap is triggered. Defined by the ExplosionTimer variable. (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 module and ID name.

Examples

Blunt weapons, displaying the Baseball Bat infobox

Baseball Bat
{{{display_name}}}
Baseball Bat
General
Category Sports
Encumbrance
Heavy Load
2
Equipped One-handed
Condition max. 15
Skill Long Blunt
Attachment Back
Damage
Type Blunt
Attack speed 1
Range 0.61–1.25 tiles
Damage 0.8–1.1
Tree damage 1
Door damage 5
Knockback 0.5
Knockdown 2
Technical details
Base ID Item IDs


{{Infobox weapon
|name =Baseball Bat
|image=BaseballBat_Model.png
|image_width=200px
|alternate_image=BaseballBat.png
|alternate_name=Baseball Bat
|alternate_link=
<!--GENERAL-->
|category=Sports
|weight=2
|equipped=One-handed
|condition_max=15
|attachment_type=Shovel
<!--DAMAGE-->
|type=Blunt
|skill_type=Blunt
|base_speed=1
|min_range=0.61
|max_range=1.25
|min_damage=0.8
|max_damage=1.1
|tree_damage=1
|door_damage=5
|push_back=0.5
|knockdown=2
<!--TECHNICAL DETAILS-->
|ingredients=
|item_id =Base.BaseballBat
}}

Blade weapons, displaying the Kitchen Knife infobox

Kitchen Knife
{{{display_name}}}
Kitchen Knife
General
Category Cooking
Encumbrance
Heavy Load
0.3
Equipped One-handed
Condition max. 10
Skill Short Blade
Attachment Belt
Damage
Type Slash
Range 0.61–0.9 tiles
Damage 0.3–0.7
Tree damage 1
Door damage 1
Knockback 0.3
Knockdown 0
Execution Jaw_Stab
Technical details
Base ID Item IDs


{{Infobox weapon
|name =Kitchen Knife
|image=Knife_Model.png
|image_width=200px
|alternate_image=KnifeChopping.png
|alternate_name=Kitchen Knife
|alternate_link=
<!--GENERAL-->
|category=Cooking
|weight=0.3
|equipped=One-handed
|condition_max=10
|attachment_type=Knife
<!--DAMAGE-->
|type=Slash
|skill_type=SmallBlade
|min_range=0.61
|max_range=0.9
|min_damage=0.3
|max_damage=0.7
|tree_damage=1
|door_damage=1
|push_back=0.3
|knockdown=0
|kill_move=Jaw_Stab
<!--TECHNICAL DETAILS-->
|ingredients=
|item_id =Base.KitchenKnife
}}

Firearm weapons, displaying the M9 Pistol infobox

M9 Pistol
{{{display_name}}}
M9 Pistol
General
Category Weapon
Encumbrance
Heavy Load
1.5
Equipped One-handed
Condition max. 10
Skill Firearm
Attachment Holster
Characteristics
Ammo type 9mm Round
Magazine size 15
Noise radius 40 tiles
Recoil delay 20
Reload time 30
Aiming time 15
Damage
Type Gunshot
Range 0.61–7 tiles
Damage 0.6–1
Door damage 5
Accuracy 50
Knockback 0.3
Knockdown 2
Technical details
Base ID Item IDs


{{Infobox weapon
|name =M9 Pistol
|image=Handgun03_Model.png
|image_width=200px
|alternate_image=HandGun3.png
|alternate_name=M9 Pistol
|alternate_link=
<!--GENERAL-->
|category=Weapon
|weight=1.5
|equipped=One-handed
|condition_max=10
|attachment_type=Holster
<!--CHARACTERISTICS-->
|ammo=Bullets9mm
|clip_size=15
|sound_radius=40
|recoil_delay=20
|reload_time=30
|aiming_time=15
<!--DAMAGE-->
|type=Gunshot
|skill_type=Firearm
|min_range=0.61
|max_range=7
|hit_chance=50
|min_damage=0.6
|max_damage=1
|door_damage=5
|push_back=0.3
|knockdown=2
<!--TECHNICAL DETAILS-->
|ingredients=
|item_id =Base.Pistol
}}

Throwable weapons, displaying the Molotov Cocktail infobox

Molotov Cocktail
{{{display_name}}}
Molotov Cocktail
General
Category Devices
Encumbrance
Heavy Load
1.5
Equipped One-handed
Secondary Lighter
Skill Fire
Damage
Type Fire
Damage 0–0
Fire power 90
Fire range 4 tiles
Technical details
Base ID Item IDs


{{Infobox weapon
|name =Molotov Cocktail
|image=Molotov_Model.png
|image_width=200px
|alternate_image=Molotov.png
|alternate_name=Molotov Cocktail
|alternate_link=
<!--GENERAL-->
|category=Devices
|weight=1.5
|equipped=One-handed
|secondary_item=Lighter
<!--DAMAGE-->
|type=Fire
|effect_power=90
|effect_range=4
|effect_type=Fire
|max_range=8
|min_damage=0
|max_damage=0
<!--TECHNICAL DETAILS-->
|ingredients=
|item_id =Base.Molotov
}}

Trap weapons, displaying the Aerosol Bomb with Sensor infobox

Aerosol Bomb with Timer
{{{display_name}}}
Aerosol Bomb with Timer
General
Category Devices
Encumbrance
Heavy Load
1.5
Equipped One-handed
Skill Explosion
Damage
Type Explosion
Damage 0–0
Knockdown 0
Explosion power 70
Explosion range 6 tiles
Explosion timer 10
Technical details
Base ID Item IDs


{{Infobox weapon
|name =Aerosol Bomb with Timer
|image=Molotov_Model.png
|image_width=200px
|alternate_image=AerosolbombTimer.png
|alternate_name=Aerosol Bomb with Timer
|alternate_link=
<!--GENERAL-->
|category=Devices
|weight=1.5
|equipped=One-handed
<!--DAMAGE-->
|type=Explosion
|effect_power=70
|effect_range=6
|effect_timer=10
|effect_type=Explosion
|max_range=10
|min_damage=0
|max_damage=0
|knockdown=0
<!--TECHNICAL DETAILS-->
|ingredients=
|item_id =Base.AerosolbombTriggered
}}