Spiked Baseball Bat: Difference between revisions

From PZwiki
m (Fixes)
(added sections, removed a lot of jargon, added CodeBox and condition, and updates build 41.78.16)
Line 1: Line 1:
{{Languages}}
{{Languages}}
{{Header|The Game World|Items|Weapons|Melee weapons|type=Weapon|version=Version 41|incver=73}}
{{Header|The Game World|Items|Weapons|Melee weapons|type=Weapon|version=Version 41|incver=78.16}}
{{Infobox weapon
{{Infobox weapon
|display_name=Spiked Baseball Bat
|display_name=Spiked Baseball Bat
Line 18: Line 18:
|type=Slash
|type=Slash
|min_range=0.61
|min_range=0.61
|max_range=1.5
|max_range=1.28
|swing_time=3
|base_speed=0.95
|condition_max=15
|condition_max=15
|skill_type=Blunt
|skill_type=Blunt
|min_damage=1
|min_damage=1
|max_damage=1.5
|max_damage=1.5
|door_damage=7
|tree_damage=1
|push_back=0.5
|push_back=0.5
|knockdown=2
|knockdown=2
|class_name=Base.BaseballBat
|class_name=Base.BaseballBatNails
}}
}}
A '''spiked baseball bat''' is a two-handed melee weapon.
A '''spiked baseball bat''' is a two-handed long blunt melee weapon.


A craftable improvement on the basic [[Baseball Bat|baseball bat]] which does more damage, generally killing [[Zombies]] with one well-charged hit. Since it has good range, pushes zombies away, and deals above average damage, it is an excellent weapon that is relatively easy to find the components for. The extra damage does come with the drawback of causing damage to clothing worn by [[Zombies]].
==Usage==
The spiked baseball bat is a craftable improvement to the basic [[Baseball Bat|baseball bat]] which does more damage, generally killing [[Zombies]] with one well-charged hit, however with an increased probability of damaging it.  


It has lower durability than a standard baseball bat, and as such it is recommended to have a backup weapon for long fights. This lowered durability is counteracted by the ability to repair the weapon with common nails with each nail restoring a full point of condition if successful. This can dramatically extend the life of the bat for not much extra investment.
It has good range, knockback, and deals above average damage, with relatively common components. The improved damage does come with the drawback of causing damage to [[clothing]] worn by [[zombie]]s.


The spiked baseball bat is not for the unfit, any user should prioritize putting a point or two in swinging skills if not already done so to benefit from the output of the bat.
===Breaking doors===
It can be used to bash down [[door]]s, causing 7 damage per swing.  


It can also be used to bash down [[door]]s, causing 7 damage per swing. They can only be found on the bodies of dead survivors and in survivor houses, although it is more reliable to craft one, as the unmodified bat spawns in many locations in the world.
==Condition==
It has lower durability than a standard baseball bat. This is counteracted by the ability to repair it with [[nails]], which are very common. Each nail restores a full point of condition if successful. This can dramatically extend the life of the bat for not much extra investment.


==Crafting==
The spiked baseball bat has a maximum condition of 15. Its rate of degradation is influenced by the [[Skills|long blunt]] and [[Skills|maintenance]] skills. The chance of losing [[durability]] can be simplified to the following formula: <code>1 in (10 + maintenanceMod &times; 2)</code>. Where "maintenanceMod" is calculated using the long blunt and maintenance skills.<br>
{{Crafting header|ing=3}}
Below is an example of the chance of losing durability at varying levels of the [[Skills|maintenance]] and [[Skills|long blunt]] skills.
{{Crafting carpentry|009|ing=3}}
{{Durability weapon|10}}
{{Crafting cooking|402|ing=3}}
|}


==Materials to repair==
==Repairing==
The {{PAGENAME}} has a 1 in 10 chance of losing condition on hit.
* At level 7 carpentry, wood glue will repair 75% durability
* Unlike with all weapons, nails can be used to repair the spiked bat.
** Due to how the repair system work in whole numbers, any successful repair will repair the spiked bat by the minimum amount: 1. Meaning that with the lowest success rate with nails being 50% and a low chance to lose condition on failure, a player may repair the spiked bat upwards of 30 times while still gaining more condition than loss.
* The {{PAGENAME}} has an averaging 150 swings before repair, after 30 repairs via nails, it can easily reach 400+ swings.
{| class="pztable" style="text-align: center;"  
{| class="pztable" style="text-align: center;"  
|-
|-
Line 70: Line 76:
|}
|}


* At level 7 carpentry, wood glue will repair 75% durability
==Distribution==
* Unlike with all weapons, nails can be used to repair the spiked bat.
It can only be found on the bodies of dead survivors and in survivor houses, although it is more reliable to craft one, as the unmodified bat spawns in many locations in the world.
** Due to how the repair system work in whole numbers, any successful repair will repair the spiked bat by the minimum amount: 1. Meaning that with the lowest success rate with nails being 50% and a low chance to lose condition on failure, a player may repair the spiked bat upwards of 30 times while still gaining more condition than loss.
 
* The {{PAGENAME}} has an averaging 150 swings before repair, after 30 repairs via nails, it can easily reach 400+ swings.
==Crafting==
{{Crafting header|ing=3}}
{{Crafting carpentry|009|ing=3}}
{{Crafting cooking|402|ing=3}}
|}


==Code==
==Code==
<pre>
{{CodeBox|
===Item===
{{CodeSnip
  | lang = java
  | line = true
  | start = 2355
  | source = weapons.txt
  | retrieved = true
  | version = 41
  | incver = 78.16
  | code =
item BaseballBatNails
item BaseballBatNails
DisplayCategory = WeaponCrafted,
{
    DisplayCategory = WeaponCrafted,
MaxRange = 1.28,
MaxRange = 1.28,
WeaponSprite = BaseballBatSpiked,
WeaponSprite = BaseballBatSpiked,
Line 105: Line 126:
Icon = BaseballBatNails,
Icon = BaseballBatNails,
RunAnim = Run_Weapon2,
RunAnim = Run_Weapon2,
        TwoHandWeapon = TRUE,
        TwoHandWeapon = TRUE,
        BreakSound  =  SpikedBaseballBatBreak,
        BreakSound  =  SpikedBaseballBatBreak,
        DoorHitSound = SpikedBaseballBatHit,
        DoorHitSound = SpikedBaseballBatHit,
HitSound = SpikedBaseballBatHit,
HitSound = SpikedBaseballBatHit,
HitFloorSound = SpikedBaseballBatHit,
HitFloorSound = SpikedBaseballBatHit,
SwingSound = SpikedBaseballBatSwing,
SwingSound = SpikedBaseballBatSwing,
        TreeDamage  =  1,
        TreeDamage  =  1,
        MetalValue = 5,
        MetalValue = 5,
        CriticalChance = 30,
        CriticalChance = 30,
        critDmgMultiplier = 5,
        critDmgMultiplier = 5,
        MinDamage = 1,
        MinDamage = 1,
        MaxDamage = 1.5,
        MaxDamage = 1.5,
        BaseSpeed = 0.95,
        BaseSpeed = 0.95,
WeaponLength = 0.5,
WeaponLength = 0.5,
        DamageCategory = Slash,
        DamageCategory = Slash,
        DamageMakeHole = TRUE,
        DamageMakeHole = TRUE,
        AttachmentType = Shovel,
        AttachmentType = Shovel,
</pre>
}
}}


===Repair===
===Repair===
<pre>
{{CodeSnip
     fixing Fix Spiked Baseball Bat
  | lang = java
 
  | line = true
    Require : BaseballBatNails,
  | start = 183
  | source = fixing.txt
  | retrieved = true
  | version = 41
  | incver = 78.16
  | code =
     fixing Fix Nailed Baseball Bat
    {
      Require : BaseballBatNails,


       Fixer : Woodglue=2; Woodwork=2,
       Fixer : Woodglue=2; Woodwork=2,
Line 135: Line 165:
       Fixer : Scotchtape=4,
       Fixer : Scotchtape=4,
       Fixer : Nails,
       Fixer : Nails,
</pre>
    }
}}
}}


==See also==
==See also==
*[[Baseball Bat]]
*[[Axe]]
*[[Hammer]]
*[[Spiked Pickaxe Handle]]


{{Navbox weapons}}
{{Navbox weapons}}

Revision as of 12:03, 29 December 2023

The Game WorldItemsWeaponsMelee weaponsSpiked Baseball Bat
Spiked Baseball Bat
Spiked Baseball Bat
Spiked Baseball Bat Baseball Bat
General
Category Weapon
Encumbrance
Heavy Load
2
Equipped Two-handed
Condition max. 15
Skill Long Blunt
Damage
Type Slash
Attack speed 0.95
Range 0.61–1.28 tiles
Damage 1–1.5
Tree damage 1
Door damage 7
Knockback 0.5
Knockdown 2
Technical details
Base ID Base.BaseballBatNails

A spiked baseball bat is a two-handed long blunt melee weapon.

Usage

The spiked baseball bat is a craftable improvement to the basic baseball bat which does more damage, generally killing Zombie with one well-charged hit, however with an increased probability of damaging it.

It has good range, knockback, and deals above average damage, with relatively common components. The improved damage does come with the drawback of causing damage to clothing worn by zombies.

Breaking doors

It can be used to bash down doors, causing 7 damage per swing.

Condition

It has lower durability than a standard baseball bat. This is counteracted by the ability to repair it with nails, which are very common. Each nail restores a full point of condition if successful. This can dramatically extend the life of the bat for not much extra investment.

The spiked baseball bat has a maximum condition of 15. Its rate of degradation is influenced by the long blunt and maintenance skills. The chance of losing durability can be simplified to the following formula: 1 in (10 + maintenanceMod × 2). Where "maintenanceMod" is calculated using the long blunt and maintenance skills.
Below is an example of the chance of losing durability at varying levels of the maintenance and long blunt skills.

For how this is calculated, see: Condition
Maintenance skill Weapon skill Condition lower chance
0 0 1/10 (10%)
0 4 1/12 (8%)
0 8 1/14 (7%)
4 0 1/14 (7%)
8 0 1/18 (6%)
4 4 1/16 (6%)
4 8 1/18 (6%)
8 8 1/22 (5%)
10 10 1/24 (4%)

Repairing

  • At level 7 carpentry, wood glue will repair 75% durability
  • Unlike with all weapons, nails can be used to repair the spiked bat.
    • Due to how the repair system work in whole numbers, any successful repair will repair the spiked bat by the minimum amount: 1. Meaning that with the lowest success rate with nails being 50% and a low chance to lose condition on failure, a player may repair the spiked bat upwards of 30 times while still gaining more condition than loss.
  • The Spiked Baseball Bat has an averaging 150 swings before repair, after 30 repairs via nails, it can easily reach 400+ swings.
Item Repaired 1st Repair Materials =
55% Repaired, 100% Success

20% Repaired, 95% Success

10% Repaired, 95% Success

10% Repaired, 95% Success

5% Repaired, 95% Success
BaseballBatNails.png

Spiked Baseball Bat

Woodglue.png

Wood Glue (2 Uses)
(Requires Carpentry Level 2)

DuctTape.png

Duct Tape (2 Uses)

Glue.png

Glue (2 Uses)

Scotchtape.png

Adhesive Tape (4 Uses)

Nails

Nails (1 Use)

Distribution

It can only be found on the bodies of dead survivors and in survivor houses, although it is more reliable to craft one, as the unmodified bat spawns in many locations in the world.

Crafting

Product XP gained Skill(s) Recipe Ingredient 1 Ingredient 2 Ingredient 3
BaseballBatNails.png
Spiked Baseball Bat
0 XP none Hammer.png
Hammer (tag)
(keep)
BaseballBat.png
Baseball Bat
(consumed)
Nails.png
Nails x5
(consumed)
WatermelonSmashed.png
Watermelon Chunks x5
0.75 Cooking none
(keep)
Watermelon.png
Watermelon
(consumed)

Code

Code icon.png Code snippet! This section contains source code from Project ZomboidShow / Hide

Item

Source: ProjectZomboid\media\scripts\weapons.txt

Retrieved: Build 41.78.16
item BaseballBatNails
	{
	    DisplayCategory = WeaponCrafted,
		MaxRange	=	1.28,
		WeaponSprite	=	BaseballBatSpiked,
		MinAngle	=	0.75,
		Type	=	Weapon,
		MinimumSwingTime	=	3,
		KnockBackOnNoDeath	=	TRUE,
		SwingAmountBeforeImpact	=	0.02,
		Categories	=	Blunt,
		ConditionLowerChanceOneIn	=	10,
		Weight	=	2,
		SplatNumber	=	2,
		PushBackMod	=	0.5,
		SubCategory	=	Swinging,
		ConditionMax	=	15,
		MaxHitCount	=	2,
		DoorDamage	=	7,
		IdleAnim	=	Idle_Weapon2,
		SwingAnim	=	Bat,
		DisplayName	=	Spiked Baseball Bat,
		MinRange	=	0.61,
		SwingTime	=	3,
		HitAngleMod	=	-30,
		KnockdownMod	=	2,
		SplatBloodOnNoDeath	=	TRUE,
		Icon	=	BaseballBatNails,
		RunAnim	=	Run_Weapon2,
        TwoHandWeapon = TRUE,
        BreakSound  =   SpikedBaseballBatBreak,
        DoorHitSound = SpikedBaseballBatHit,
		HitSound = SpikedBaseballBatHit,
		HitFloorSound = SpikedBaseballBatHit,
		SwingSound = SpikedBaseballBatSwing,
        TreeDamage  =   1,
        MetalValue = 5,
        CriticalChance	=	30,
        critDmgMultiplier = 5,
        MinDamage	=	1,
        MaxDamage	=	1.5,
        BaseSpeed = 0.95,
		WeaponLength = 0.5,
        DamageCategory = Slash,
        DamageMakeHole = TRUE,
        AttachmentType = Shovel,
	}

Repair

Source: ProjectZomboid\media\scripts\fixing.txt

Retrieved: Build 41.78.16
fixing Fix Nailed Baseball Bat
    {
       Require : BaseballBatNails,

       Fixer : Woodglue=2; Woodwork=2,
       Fixer : DuctTape=2,
       Fixer : Glue=2,
       Fixer : Scotchtape=4,
       Fixer : Nails,
    }

See also