Help:Boilerplate weapons
![]() |
English |
The current code and result of the code are shown below. Anything starting with !< -- and ends with --> is removable and will not affect the template. |
<!--Comment: This section is for the language and the format of the page. The languages section is used for linking pages. So a example might be {{languages|Nails}} in which every page is connected with a /## on the end will link to that specific page. Eg: Nails/es Nails/fr even if there contain redirects. The header format can be seen in the header template with working explanation. The header connects categories and Version no. PLEASE ENTER THE VERSION AND INCREMENT No. WHEN YOU MAKE A PAGE. It helps everyone else know how old the page is versionwise --> {{languages}} {{header|The Game World|Items|Weapons|Melee Weapons|type=Weapon|version=Version 39|incver=67.5}}<!-- Comment: This section is for the infobox which will be positioned on the right of the page. The information can be pulled from the items/newitems.txt file in [Zomboid Folder\media\scripts]. For more info on how to use the infobox, see: https://pzwiki.net/wiki/Template:Infobox_weapon. -->{{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 |alternate_image3= |alternate_name3= |alternate_link3= <!--GENERAL--> |category=Weapon |weight=2 |function= |equipped=Two-handed |secondary_item= |condition_max=15 |attachment_type= <!--CHARACTERISTICS--> |ammo_type= |clip_size= |sound_radius= |recoil_delay= |reload_time= |aiming_time= <!--DAMAGE--> |type=Blunt |swing_time=3 |min_range=0.61 |max_range=1.5 |hit_chance= |min_damage=0.8 |max_damage=1.2 |push_back=0.5 |knockdown=2 |kill_move= |effect_power= |effect_range= |effect_timer= |effect_type= |sensor_range= <!--TECHNICAL DETAILS--> |ingredients= |class_name=Base.BaseballBat }} <!--Comment: General introductory for the item--> An introduction to the item. Include [[Nails|links]] (example link is to Nails article) to other pages within the wiki where appropriate. __TOC__ <!--Comment: This is where the 'Table Of Contents' will go if it is needed--> ==Usage== <!--Comment: This section contains how the item can be used, weather it be as a weapon, tool or in recipes. --> ===Weapon=== This subsection is about the item's usage as a weapon. You may want to include how many enemies can be hit with a single strike, damage, range and effectiveness. ===Breaking doors=== Include how effective the weapon is at breaking down doors. ===Tree chopping=== Can the item be used to chop down trees? If so, how much damage does it do? ===Recipes=== Include here which recipes this item can be used in. Remove this section if it isn't applicable to the weapon/item. {{Crafting table header}} {{Recipe Carpentry|2011}} {{Recipe Cooking|1001}} {{Crafting table footer}} ==Condition== <!--Comment: This section contains all the info about the condition of the weapon. --> What weapon skill does this weapon apply to? Is it [[Skills#Blunt|blunt]], [[Skills#Blade|blade]] or [[Skills#Firearm|firearm]]? The maintenance skill relates to how often the weapon will take damage from being used. The following equation should be used replacing <ConditionLowerChanceOneIn> with the value for the given item: <code>1 in (<ConditionLowerChanceOneIn> + maintenance x 2)</code> ===Repairing=== <!--Comment: This uses the code found in the repair file [Zomboid Folder\media\scripts\fixing.txt] which defines what it costs to repair the weapon. The table below is a graphical representation of what is required to repair. --> Materials that can be used to repair the baseball bat, based on first time repairing. {{Fixing weapon |item=Baseball Bat |woodglue=2 |woodgluerepairs=20 |woodgluechance=35 |woodwork=2 |ducttape=2 |ducttaperepairs=10 |ducttapechance=95 |glue=2 |gluerepairs=10 |gluechance=95 |scotchtape=4 |scotchtaperepairs=10 |scotchtapechance=95 }} ==Distribution== <!--Comment: The locations this item can be found should be placed here. Spawn locations can be found in the distribution.lua and vehicledistribution.lua files. --> ===Buildings=== Include here the building types that the weapon can be found in, being sure to include links. ===Vehicles=== Include here all the vehicle types/areas the weapon can be found. ===NPCs=== Include here if the weapon can be found on zombies, and where. I.e. Many weapons can be found on zombies in specific areas. E.g. Police baton found on police zombies are found near police stations/roadblocks. Once survivor NPCs are added, they will also be added into this section. ==Trivia== Any interesting facts about the weapon should be bullet-pointed <code>*</code> in this section ==Gallery== Here are a list of images that can be used to show off the weapon. Include screenshots, model variants, or any other images that are relevant to the weapon. <!-- COMMENT: Include a list of clothing variants, in-game screenshots, etc. here --> <gallery> File:BaseballBat Animation.png|Baseball Bat W.I.P. swing animation File:BaseballBatNails 120px.png|Spiked Baseball Bat icon </gallery> ==Code== <!--Comment: all the code related to the item found in txt files should be placed here--> ===Item=== <!--Comment: Current location of Code in directory for updating purposes. Example below shows how to lay it out. ''''' is for bold italic.--> '''''From items.txt (Project Zomboid directory/media/scripts/)''''' <!--Comment: Add the retrieved template so both visitors and editors can tell how old the code is and whether or not it may need to be updated.--> {{Retrieved|version=39|incver=67.5}} <!--Comment: Example code taken from file. Items.txt and Newitems.txt are usually the source of the information at this time for basic items. Nowiki is used to display the text only, example used is BaseballBat.--> <pre> item BaseballBat MaxRange = 1.5, WeaponSprite = Baseballbat, MinAngle = 0.2, Type = Weapon, MinimumSwingTime = 3, KnockBackOnNoDeath = TRUE, SwingAmountBeforeImpact = 0.02, Categories = Blunt, ConditionLowerChanceOneIn = 20, Weight = 2, SplatNumber = 1, PushBackMod = 0.5, MaxDamage = 1.2, SubCategory = Swinging, ConditionMax = 15, MaxHitCount = 2, DoorDamage = 7, IdleAnim = Idle_Weapon2, SwingAnim = Bat, CriticalChance = 10, WeaponWeight = 2, DisplayName = Baseball Bat, MinRange = 0.61, SwingTime = 3, HitAngleMod = -30, MinDamage = 0.8, KnockdownMod = 2, SplatBloodOnNoDeath = FALSE, Icon = BaseballBat, RunAnim = Run_Weapon2, TwoHandWeapon = TRUE, BreakSound = PZ_WoodSnap, TreeDamage = 1,</pre> ===Repair=== <!--Comment: Current location of Code in directory for updating purposes. Example below shows how to lay it out. ''''' is for bold italic.--> '''''From fixing.txt (Project Zomboid directory/media/scripts/)''''' <!--Comment: Add the retrieved template so both visitors and editors can tell how old the code is and whether or not it may need to be updated.--> {{Retrieved|version=39|incver=67.5}} <!--Comment: This is the code found in the repair file [Zomboid Folder\media\scripts\fixing.txt] which defines what it costs to repair the weapon. --> <pre> fixing Fix Baseball Bat Require : BaseballBat, Fixer : Woodglue=2; Woodwork=2, Fixer : DuctTape=2, Fixer : Glue=2, Fixer : Scotchtape=4,</pre> ==See also== <!--Comment: Location of links to relevant guides or other pages that may not have been mentioned on this page but still relate to the item in some way. --> * [[Carpentry Guide]] <!--Comment: Navbox placement goes here. Code example = {{Navbox_weapons}}, (see all current navboxs via the template section)--> {{Navbox_weapons}}
This code would produce the following:
![]() |
English |
An introduction to the item. Include links (example link is to Nails article) to other pages within the wiki where appropriate.
Contents
Usage
Weapon
This subsection is about the item's usage as a weapon. You may want to include how many enemies can be hit with a single strike, damage, range and effectiveness.
Breaking doors
Include how effective the weapon is at breaking down doors.
Tree chopping
Can the item be used to chop down trees? If so, how much damage does it do?
Recipes
Include here which recipes this item can be used in. Remove this section if it isn't applicable to the weapon/item.
Product | Recipe | Description | Skill Level | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
Smack a few nails into your favourite baseball bat to help bash open some zeds. | Carpentry Level 0
| ||||||||||||||||||||||||||||||||||||||||||||
|
|
Smash watermelon. Gain 3 Cooking XP |
Cooking Level 0 |
Condition
What weapon skill does this weapon apply to? Is it blunt, blade or firearm? The maintenance skill relates to how often the weapon will take damage from being used. The following equation should be used replacing <ConditionLowerChanceOneIn> with the value for the given item: 1 in (<ConditionLowerChanceOneIn> + maintenance x 2)
Repairing
Materials that can be used to repair the baseball bat, based on first time repairing.
Repair Baseball Bat | ||||||
| ||||||
| ||||||
| ||||||
| ||||||
Distribution
Buildings
Include here the building types that the weapon can be found in, being sure to include links.
Vehicles
Include here all the vehicle types/areas the weapon can be found.
NPCs
Include here if the weapon can be found on zombies, and where. I.e. Many weapons can be found on zombies in specific areas. E.g. Police baton found on police zombies are found near police stations/roadblocks.
Once survivor NPCs are added, they will also be added into this section.
Trivia
Any interesting facts about the weapon should be bullet-pointed *
in this section
Gallery
Here are a list of images that can be used to show off the weapon. Include screenshots, model variants, or any other images that are relevant to the weapon.
Code
Item
From items.txt (Project Zomboid directory/media/scripts/)
Retrieved | |
---|---|
Version 39.67.5 |
item BaseballBat MaxRange = 1.5, WeaponSprite = Baseballbat, MinAngle = 0.2, Type = Weapon, MinimumSwingTime = 3, KnockBackOnNoDeath = TRUE, SwingAmountBeforeImpact = 0.02, Categories = Blunt, ConditionLowerChanceOneIn = 20, Weight = 2, SplatNumber = 1, PushBackMod = 0.5, MaxDamage = 1.2, SubCategory = Swinging, ConditionMax = 15, MaxHitCount = 2, DoorDamage = 7, IdleAnim = Idle_Weapon2, SwingAnim = Bat, CriticalChance = 10, WeaponWeight = 2, DisplayName = Baseball Bat, MinRange = 0.61, SwingTime = 3, HitAngleMod = -30, MinDamage = 0.8, KnockdownMod = 2, SplatBloodOnNoDeath = FALSE, Icon = BaseballBat, RunAnim = Run_Weapon2, TwoHandWeapon = TRUE, BreakSound = PZ_WoodSnap, TreeDamage = 1,
Repair
From fixing.txt (Project Zomboid directory/media/scripts/)
Retrieved | |
---|---|
Version 39.67.5 |
fixing Fix Baseball Bat Require : BaseballBat, Fixer : Woodglue=2; Woodwork=2, Fixer : DuctTape=2, Fixer : Glue=2, Fixer : Scotchtape=4,
See also
Weapons [iwbums] v • d • e | |
Axe | Hand Axe • Stone Axe • Axe • Wood Axe |
Long Blunt | Acoustic Guitar • Badminton Racket • Barbell • Baseball Bat • Broom • Canoe Paddle • Canoe Paddle - Double-bladed • Chainsaw • Crowbar • Electric Bass • Electric Guitar • Fishing Rod • Fishing Rod (crafted) • Fishing Rod without Line • Garden Hoe • Golf Club • Hockey Stick • Ice Hockey Stick • Keytar • LaCrosse Stick • Leaf Rake • Nightstick • Pickaxe • Plank • Pool Cue • Rake • Saxophone • Shovel • Sledgehammer • Snow Shovel • Spiked Baseball Bat • Spiked Plank • Tennis Racket • Trumpet |
Short Blunt | Ball-peen Hammer • Banjo • Chair Leg • Club Hammer • Dumbbell • Drumstick • Flute • Frying Pan • Griddle Pan • Hammer • Lead Pipe • Metal Bar • Metal Pipe • Plunger • Pipe Wrench • Pickaxe Handle • Rolling Pin • Saucepan • Spiked Pickaxe Handle • Stone Hammer • Table Leg • Violin • Wooden Mallet • Wrench |
Long Blade | Machete • Katana |
Short Blade | Butter Knife • Bread Knife • Fork • Hand Fork • Hand Scythe • Hunting Knife • Ice Pick • Letter Opener • Kitchen Knife • Scalpel • Scissors • Screwdriver • Smashed Bottle • Spoon • Stake • Stone Knife |
Spear | Closed Umbrella • Crafted Spear • Garden Fork • Spear with Bread Knife • Spear with Butter Knife • Spear with Fork • Spear with Hand Fork • Spear with Hunting Knife • Spear with Ice Pick • Spear with Knife • Spear with Letter Opener • Spear with Machete • Spear with Scalpel • Spear with Scissors • Spear with Screwdriver • Spear with Spoon • Wooden Spear |
Firearm | D-E Pistol • Double Barrel Shotgun • JS-2000 Shotgun • M14 Single Shot Assault Rifle • M16 Assault Rifle • M1911 Pistol • M36 Revolver • M625 Revolver • M9 Pistol • Magnum • MSR700 Rifle • MSR788 Rifle • Sawn Off Double Barrel Shotgun • Sawn Off JS-2000 Shotgun |
Ammo | .223 Round • .308 Round • .38 Special Round • .44 Magnum Bullets • .45 Auto Round • 5.56mm Round • 9mm Rounds • Shotgun Shells |
Weapon mods | .223 Magazine • .308 Magazine • .44 Magazine • .45 Auto Magazine • 5.56mm Magazine • Items • Ammo Straps • Choke Tube Improved • Choke Tube Full • Fiberglass Stock • Iron Sight • Laser • Recoil Pad • Red Dot • Sling • x2 Scope • x4 Scope • x8 Scope |
Throwable | Aerosol Bomb • Aerosol Bomb with Sensor • Aerosol Bomb with Timer • Flame Trap • Flame Trap with Sensor • Flame Trap with Timer • Molotov Cocktail • Noise Maker • Noise Maker with Sensor • Noise Maker with Timer • Pipe Bomb • Pipe Bomb with Sensor • Pipe Bomb with Timer • Remote Aerosol Bomb • Remote Flame Trap • Remote Noise Maker • Remote Pipe Bomb • Remote Smoke Bomb • Smoke Bomb • Smoke Bomb with Sensor • Smoke Bomb with Timer |
Other | Bare Hands • Blue Pen • Pen • Pencil • Red Pen |