Crafted Spear: Difference between revisions

From PZwiki
No edit summary
m (Distribution table fix)
 
(60 intermediate revisions by 15 users not shown)
Line 1: Line 1:
{{languages}}
{{Header|Project Zomboid|Items|Weapons|Melee weapons|Spears}}
{{header|The Game World|Items|Tools|version=Version 41|incver=52}}
{{Page version|41.78.16}}
{{Infobox weapon
{{Infobox item
|display_name=Crafted Spear
|name=Crafted Spear
|name_colour=Weapon
|model=SpearCrafted_Model.png
|name_text_colour=Weapon
|icon=SpearStick.png
|image=SpearCrafted_Model.png
|icon_name=Crafted Spear
|image_width=200px
|alternate_image=SpearStick.png
|alternate_name=Crafted Spear
|alternate_link=
|alternate_image2=SpearButterKnife.png
|alternate_name2=Spear with Bread Knife
|alternate_link2=Spear with Bread Knife#Spear with Bread Knife
|alternate_image3=SpearButterKnife.png
|alternate_name3=Spear with Butter Knife
|alternate_link3=Spear with Butter Knife#Spear with Butter Knife
|alternate_image4=SpearFork.png
|alternate_name4=Spear with Fork
|alternate_link4=Spear with Fork#Spear with Fork
|alternate_image5=SpearKnife.png
|alternate_name5=Spear with Letter Opener
|alternate_link5=Spear with Letter Opener#Spear with Letter Opener
|alternate_image6=SpearScalpel.png
|alternate_name6=Spear with Scalpel
|alternate_link6=Spear with Scalpel#Spear with Scalpel
|alternate_image7=SpearSpoon.png
|alternate_name7=Spear with Spoon
|alternate_link7=Spear with Spoon#Spear with Spoon
|alternate_image8=SpearScissors.png
|alternate_name8=Spear with Scissors
|alternate_link8=Spear with Scissors#Spear with Scissors
|alternate_image9=SpearGardeningFork.png
|alternate_name9=Spear with Hand Fork
|alternate_link9=Spear with Hand Fork#Spear with Hand Fork
|alternate_image10=SpearScrewdriver.png
|alternate_name10=Spear with Screwdriver
|alternate_link10=Spear with Screwdriver#Spear with Screwdriver
|alternate_image11=SpearKnife.png
|alternate_name11=Spear with Kitchen Knife
|alternate_link11=Spear with Kitchen Knife#Spear with Kitchen Knife
|alternate_image12=SpearHuntingKnife.png
|alternate_name12=Spear with Hunting Knife
|alternate_link12=Spear with Hunting Knife#Spear with Hunting Knife
|alternate_image13=SpearMachete.png
|alternate_name13=Spear with Machete
|alternate_link13=Spear with Machete#Spear with Machete
|alternate_image14=SpearIcePick.png
|alternate_name14=Spear with Ice Pick
|alternate_link14=Spear with Ice Pick#Spear with Ice Pick
<!--GENERAL-->
<!--GENERAL-->
|category=Weapon
|category=Weapon - Crafted
|weight=1.7
|weight=1.7
|condition_max=Default: 5<br>Crafted: <small>''See [[#Crafting|Crafting]]''</small>
|condition_max=5
|attachment_type=Shovel
|attachment_type=Shovel
<!--CHARACTERISTICS-->
|skill_type=Spear
<!--DAMAGE-->
<!--DAMAGE-->
|type=Spear
|type=Slash
|swing_time=2
|damage_make_hole=true
|base_speed=N/A
|min_range=0.98
|min_range=0.98
|max_range=1.4
|max_range=1.4
Line 65: Line 23:
|knockdown=0
|knockdown=0
<!--TECHNICAL DETAILS-->
<!--TECHNICAL DETAILS-->
|ingredients=<!-- Omitted because there's many variations -->
|item_id=Base.SpearCrafted
|class_name=Base.SpearCrafted
}}
}}
A '''crafted spear''', previously called '''wooden spear''', is a weapon and tool that is crafted by a player and cannot be randomly found in containers. Spears can be attached to the character's back for quick access and weight reduction.
{{About|the wooden spear that can be crafted|the wooden spear that can be found impapled on zombies|Wooden Spear}}
A '''crafted spear''' is a weapon and tool that is crafted by a player and cannot be randomly found in containers. Spears can be attached to the character's back for quick access and weight reduction.


== Usage ==
==Usage==
{{pros-cons
{{Pros-cons
<!-- #PROS# - below this line -->
|pros1=Long reach, great for not getting too close to zombies.
|pros1 = Long reach, great for not getting too close to zombies.
|pros2=Spear charge ability.
|pros2 = Spear charge ability.
|pros3=Easy to gather the resources required to craft it.
|pros3 = Easy to gather the resources required to craft it.
|pros4=Able to attach short blades to the spear, making it more powerful.
|pros4 = Able to attach short blades to the spear, making it more powerful.
|pros5=Can be used to fish.
|pros5 = Can be used to fish.  
|cons1=Weapon condition influenced by crafter's [[carpentry]] skill level.
<!-- #CONS# - below this line -->
|cons2=Weak durability. Carrying additional spears or backup weapons is recommended.
|cons1 = Weapon condition influenced by crafter's [[Skills#Crafting|Carpentry]] skill level.
|cons3=Likely to break when fishing.
|cons2 = Weak durability. Carrying additional spears or backup weapons is recommended.
|cons3 = Likely to break when fishing.  
}}
}}
===Condition/Durability===
The spear suffers from a low maximum Condition and takes damage at an exceedingly high rate until [[Skills#Combat|Maintenance]] is leveled. At level 0 Maintenance, it has a 50% chance  of lowering its condition each attack. The chance of losing durability is: <code>1 in (2 + (maintenance x 2 + weapon level/2))</code>


There is a workaround for maintaining a single upgraded spear, you can remove the attached weapon and re-attach it, this will reset the number of times repaired to 0, allowing it to be repaired effectively again, note that this consumes a good deal of duct tape in the process.
===Critical bonus===
Attacking a lone Zombie (no other Zombie within 1.7 tiles of the target) between the range of 1.25 and 1.40 yields a +20% chance to a critical strike. Like all critical damage, negative moodles do not affect the damage output of the strike: meaning this can often save a player who would otherwise not inflict lethal damage. When this is triggered, a special animation will occur to signal to the player that the critical was successful. '''Be warned''', as the animation can be lengthy, and other zombies can cover the extremely small distance of 1.7 tiles, especially dangerous if fighting against a horde.
 
===Spear charge===
Every spear has the ability to use a unique spear charge attack. To use the spear charge ability, you must sprint (Left Alt key by default), after a few seconds of sprinting, the character will begin a spear charge and any zombie on the receiving end of the charge will be killed in one blow. Spear charges are best used against lone zombies due to your character being vulnerable during the kill animation. There are other risks such as nearby zombies being alerted by your sprinting, more difficult for your character to turn while sprinting and your character falling over if they sprint into a wall.


===Special Ability: Spear Charge===
Every spear has the ability to use a unique spear charge attack. To use the spear charge ability, you must sprint(Left Alt key by default), after a few seconds of sprinting, the character will begin a spear charge and any zombie on the receiving end of the charge will be killed in one blow. Spear charges are best used against lone zombies due to your character being vulnerable during the kill animation. There are other risks such as nearby zombies being alerted by your sprinting, more difficult for your character to turn while sprinting and your character falling over if they sprint into a wall.
===Spear-fishing===
===Spear-fishing===
[[File:SpearFishingAnim.gif|thumb|Fishing with a crafted spear.]]
[[File:SpearFishingAnim.gif|thumb|Fishing with a crafted spear.]]
{{Main|Fishing}}<!-- Needs more content please -->
{{Main|Fishing}}
A crafted spear can be used in fishing instead of a [[Fishing Rod|fishing rod]]. Although easier to obtain, a crafted spear is just as likely to break as a [[Twine|twine]] line on a [[Fishing Rod (crafted)|crafted fishing rod]].
All crafted spears can be used in fishing instead of a [[Fishing Rod|fishing rod]]. Although crafted spear is easier to obtain, it is just as likely to break as a [[twine]] line on a [[Fishing Rod (crafted)|crafted fishing rod]].
 
A crafted spear has a lower chance of catching a fish, equal to the benefits gained when fishing during dawn or dusk, regardless of the player's fishing level. It also takes less time to complete a fishing cycle compared to any other fishing gear.  


A crafted spear has a lower chance of catching a fish, equal to the benefits gained when fishing during dawn or dusk, regardless of the player's fishing level. It also takes less time to complete a fishing cycle compared to any other fishing gear.


==Condition==
The spear suffers from a low maximum condition and takes damage at an exceedingly high rate until [[Skills#Combat|maintenance]] and [[Skills#Spears|spears]] is leveled. At level 0 maintenance and spear, it has a 50% chance of lowering its condition each attack.


Below is an example of the chance of losing durability at varying levels of the [[Skills|maintenance]] and [[Skills|spear]] skills.
{{Durability weapon|2}}


===Repairing===
A spear can be repaired with the following:
*2 × [[Wood Glue]] and level 2 [[Carpentry]]
*2 × [[Duct Tape]]
*2 × [[Glue]]
*4 × [[Adhesive Tape]]


It should be noted that each time a spear is repaired, its probability of success is reduced.


{{ExploitBox|
There is a workaround for maintaining a single upgraded spear, you can remove the attached weapon and re-attach it, this will reset the number of times repaired to 0, allowing it to be repaired effectively again, note that this consumes a good deal of duct tape in the process.
}}


==Crafting==
A crafted spear is created by sharpening a [[Tree Branch|tree branch]] or [[plank]] with a [[Kitchen Knife|kitchen knife]], [[Hunting Knife|hunting knife]], [[Chipped Stone|chipped stone]], [[Stone Knife|stone knife]], [[Meat Cleaver|meat cleaver]], or [[machete]].<br>
The crafted spear's starting condition is dependent on the player's [[carpentry]] [[skill]]. This is defined by a random number between <code>2 + carpentry</code> and <code>4 + carpentry</code> capped to the maximum condition of 5. A [[carpentry]] [[skill]] of 3 or above will therefore always produce a crafted spear with the full 5 condition. The tool used to craft the spear will then lose 1 condition, excluding the chipped stone. The chipped stone has a <code>1 in 3</code> chance of being consumed, where as making the chipped stone into a stone knife will allow for 13 uses.
{{Crafting/sandbox2
|crafted_spear
}}


 
===Upgrading===
 
 
 
 
 
== Crafting ==
A crafted spear is created by sharpening a [[Tree Branch|tree branch]] or [[Plank|plank]] with a [[Kitchen Knife|kitchen knife]], [[Hunting Knife|hunting knife]], [[Chipped Stone|chipped stone]], [[Stone Knife|stone knife]], [[Meat Cleaver|meat cleaver]], or [[Machete|machete]].<br>
The crafted spear's starting condition is dependant on the player's [[carpentry]] [[skill]]. This is defined by a random number between: <code>2 + carpentry</code> and <code>4 + carpentry</code>. The tool used to craft the spear will then lose 1 durability, excluding the chipped stone. The chipped stone has a <code>1 in 4</code> chance of being consumed.
{{Crafting header|ing=2}}
{{Crafting survivalist|101|ing=2}}
|}
 
=== Upgrading ===
A spear may have many different attachments, each can be applied with two units of duct tape.<br>
A spear may have many different attachments, each can be applied with two units of duct tape.<br>
The upgraded spear's max condition is dependant on the items used to craft it. If the tools are damaged, the spear will have a lower condition.  
The upgraded spear's max condition is dependent on the items used to craft it. If the tools are damaged, the spear will have a lower condition.<br>
{{Crafting header|ing=3}}
The initial condition of an upgraded spear is determined by a combination of the condition of the chosen Crafted Spear and Hand Weapon.
{{Crafting survivalist|102|ing=3}}
<br>The formula is as follows:<br>
{{Crafting survivalist|103|ing=3}}
<code>condition = spearCondition - ((weaponConditionMax - weaponCondition) / 2)</code><br>
{{Crafting survivalist|104|ing=3}}
If the final result is greater than the upgraded spear's maximum condition, the condition will be set to the upgraded spear's maximum condition. If the final result is less than 2, the upgraded spear's condition will be set to 2.
{{Crafting survivalist|105|ing=3}}
{{Crafting/sandbox2
{{Crafting survivalist|106|ing=3}}
|spear_with_bread_knife
{{Crafting survivalist|107|ing=3}}
|spear_with_butter_knife
{{Crafting survivalist|108|ing=3}}
|spear_with_fork
{{Crafting survivalist|109|ing=3}}
|spear_with_letter_opener
{{Crafting survivalist|110|ing=3}}
|spear_with_scalpel
{{Crafting survivalist|111|ing=3}}
|spear_with_spoon
{{Crafting survivalist|112|ing=3}}
|spear_with_scissors
{{Crafting survivalist|113|ing=3}}
|spear_with_hand_fork
{{Crafting survivalist|114|ing=3}}
|spear_with_screwdriver
|}
|spear_with_knife
|spear_with_hunting_knife
|spear_with_machete
|spear_with_ice_pick
}}


== Stats of spear upgrades ==
==Stats of spear upgrades==
Each of the upgraded spears mostly have different stats from the other, but will always be better than the normal spear in at least one stat.
Each of the upgraded spears mostly have different stats from the other, but will always be better than the normal spear in at least one stat.


<small>''Also see [[Weapons]]''</small>
<small>''Also see [[Weapons]]''</small>
{| class="pztable sortable" style="text-align:center;"  
{| class="wikitable theme-red sortable" style="text-align:center;"
|-  
|-
! rowspan=2 | {{Translation|Icon}}
! rowspan=2 | {{Translation|Icon}}
! rowspan=2 | {{Translation|Name}}
! rowspan=2 | {{Translation|Name}}
! rowspan=2 | [[File:Moodle_heavyLoad.png|link=|Weight]]
! rowspan=2 | [[File:Moodle_Icon_HeavyLoad.png|link=|Weight]]
! rowspan=2 | Attack<br>Type
! rowspan=2 | Attack<br>Type
! colspan=4 | Damage
! colspan=4 | Damage
Line 181: Line 147:
| [[File:SpearButterKnife.png|link=Spear with Bread Knife]]
| [[File:SpearButterKnife.png|link=Spear with Bread Knife]]
| [[Spear with Bread Knife]]
| [[Spear with Bread Knife]]
| 1.5
| 2.0
| Spear
| Spear
| 1
| 1
Line 198: Line 164:
| [[File:SpearButterKnife.png|link=Spear with Butter Knife]]
| [[File:SpearButterKnife.png|link=Spear with Butter Knife]]
| [[Spear with Butter Knife]]
| [[Spear with Butter Knife]]
| 1.5
| 2.0
| Spear
| Spear
| 1
| 1
Line 215: Line 181:
| [[File:SpearFork.png|link=Spear with Fork]]
| [[File:SpearFork.png|link=Spear with Fork]]
| [[Spear with Fork]]
| [[Spear with Fork]]
| 1.5
| 2.0
| Spear
| Spear
| 1
| 1
Line 232: Line 198:
| [[File:SpearKnife.png|link=Spear with Letter Opener]]
| [[File:SpearKnife.png|link=Spear with Letter Opener]]
| [[Spear with Letter Opener]]
| [[Spear with Letter Opener]]
| 1.5
| 2.0
| Spear
| Spear
| 1
| 1
Line 249: Line 215:
| [[File:SpearScalpel.png|link=Spear with Scalpel]]
| [[File:SpearScalpel.png|link=Spear with Scalpel]]
| [[Spear with Scalpel]]
| [[Spear with Scalpel]]
| 1.5
| 2.0
| Spear
| Spear
| 1
| 1
Line 266: Line 232:
| [[File:SpearSpoon.png|link=Spear with Spoon]]
| [[File:SpearSpoon.png|link=Spear with Spoon]]
| [[Spear with Spoon]]
| [[Spear with Spoon]]
| 1.5
| 2.0
| Spear
| Spear
| 1
| 1
Line 283: Line 249:
| [[File:SpearScissors.png|link=Spear with Scissors]]
| [[File:SpearScissors.png|link=Spear with Scissors]]
| [[Spear with Scissors]]
| [[Spear with Scissors]]
| 1.5
| 2.1
| Spear
| Spear
| 1
| 1
Line 300: Line 266:
| [[File:SpearGardeningFork.png|link=Spear with Hand Fork]]
| [[File:SpearGardeningFork.png|link=Spear with Hand Fork]]
| [[Spear with Hand Fork]]
| [[Spear with Hand Fork]]
| 1.5
| 2.2
| Spear
| Spear
| 1.1
| 1.1
Line 317: Line 283:
| [[File:SpearScrewdriver.png|link=Spear with Screwdriver]]
| [[File:SpearScrewdriver.png|link=Spear with Screwdriver]]
| [[Spear with Screwdriver]]
| [[Spear with Screwdriver]]
| 1.5
| 2.1
| Spear
| Spear
| 1.2
| 1.2
Line 334: Line 300:
| [[File:SpearHuntingKnife.png|link=Spear with Hunting Knife]]
| [[File:SpearHuntingKnife.png|link=Spear with Hunting Knife]]
| [[Spear with Hunting Knife]]
| [[Spear with Hunting Knife]]
| 1.5
| 2.2
| Spear
| Spear
| 1.2
| 1.2
Line 351: Line 317:
| [[File:SpearMachete.png|link=Spear with Machete]]
| [[File:SpearMachete.png|link=Spear with Machete]]
| [[Spear with Machete]]
| [[Spear with Machete]]
| 1.5
| 3.7
| Spear
| Spear
| 1.3
| 1.3
Line 368: Line 334:
| [[File:SpearIcePick.png|link=Spear with Ice Pick]]
| [[File:SpearIcePick.png|link=Spear with Ice Pick]]
| [[Spear with Ice Pick]]
| [[Spear with Ice Pick]]
| 1.5
| 2.0
| Spear
| Spear
| 1
| 1
Line 385: Line 351:
| [[File:SpearKnife.png|link=Spear with Knife]]
| [[File:SpearKnife.png|link=Spear with Knife]]
| [[Spear with Knife]]
| [[Spear with Knife]]
| 1.5
| 2.0
| Spear
| Spear
| 1
| 1
Line 402: Line 368:
|}
|}


== Distribution ==
==Distribution==
Any spear may be randomly generated inside a zombie's stomach after having survived for 30 days. Approximately 0.16% of zombies will have a Spear or Spear with attachments on them.
The loot distributions can be found in the table(s) below.
 
<!--BOT FLAG|SpearCrafted|41.78.16-->
{{Clear}}
<div class="togglebox theme-red">
    <div>SpearCrafted distribution
        <span class="mw-customtoggle-togglebox-SpearCrafted" title="{{int:show}} / {{int:hide}}" style="float: right; padding-right: 30px; padding-top: 4px; font-size: 0.7em; font-weight: normal;">{{int:show}} / {{int:hide}}</span></div>
    <div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-togglebox-SpearCrafted">
    Effective chance calculations are based off of default loot settings, and median zombie density. The higher the density of zombies in an area, the higher the effective chance of an item spawning. Chance is also influenced by the [[lucky]] and [[unlucky]] traits.    <div class="toggle-content">
<div class="pz-container">
<div id="containers" style="flex-basis:30%">
    {| class="wikitable theme-red" style="margin-right: 15px; width: 95%;"
    |+ {{ll|Containers}}
    ! Building/Room
    ! Container
    ! Effective chance
    |-
    | SafehouseLoot
    | {{ll|counter}}
    | 23.28%
    |-
    | SafehouseLoot
    | {{ll|crate}}
    | 23.28%
    |-
    | SafehouseLoot
    | {{ll|metal_shelves}}
    | 23.28%
    |-
    | SafehouseLoot
    | {{ll|wardrobe}}
    | 23.28%
    |-
    | SurvivorCache1
    | {{ll|counter}}
    | 23.28%
    |-
    | SurvivorCache2
    | {{ll|counter}}
    | 23.28%
    |}
</div>
<div id="zombies" style="flex-basis:30%">
    {| class="wikitable theme-red" style="margin-right: 15px; width: 95%;"
    |+ {{ll|Zombies}}
    ! Outfit
    ! Days survived
    ! Chance
    |-
    | All
    | 30
    | 5
    |}
</div>
    </div><div style="clear: both;"></div>
    </div></div><div class="toggle large mw-customtoggle-togglebox-SpearCrafted" title="{{int:show}}/{{int:hide}}"></div></div>
<!--END BOT FLAG|SpearCrafted|41.78.16-->
Any spear may be randomly generated inside a zombie's stomach after having survived for 30 days. Approximately 0.16% of zombies will have a spear or spear with attachments on them. It is also possible to obtain a [[Wooden Spear|wooden spear]] this way, which acts like a spear while having the old inventory icon, name and can't be upgraded or used for [[fishing]].
 
==Gallery==
==Gallery==
<gallery>
<gallery>
File:HoldingWoodenSpear.jpg|Survivor wielding the crafted spear.
HoldingWoodenSpear.jpg|Survivor wielding the crafted spear
File:SpearChargeAbility.jpg|Survivor spear charging a [[zombie]].
SpearChargeAbility.jpg|Survivor spear charging a [[zombie]]
</gallery>
</gallery>
== Code ==
'''''From items_weapons.txt (Project Zomboid directory/media/scripts/)'''''


{{Retrieved|version=41|incver=50}}
==Code==
<pre>item SpearCrafted
{{CodeBox|
        MaxRange = 1.4,
        WeaponSprite = SpearCrafted,
        MinAngle = 0.8,
        Type = Weapon,
        MinimumSwingTime = 2,
        KnockBackOnNoDeath = FALSE,
        SwingAmountBeforeImpact = 0.02,
        Categories = Improvised;Spear,
        ConditionLowerChanceOneIn = 2,
        Weight = 1.7,
        SplatNumber = 1,
        PushBackMod = 0.3,
        SubCategory = Spear,
        ConditionMax = 5,
        MaxHitCount = 2,
        DoorDamage = 5,
        SwingAnim = Spear,
        DisplayName = Crafted Spear,
        MinRange = 0.98,
        SwingTime = 2,
        KnockdownMod = 0,
        SplatBloodOnNoDeath = FALSE,
        Icon = SpearStick,
        RunAnim = Run_Weapon2,
        IdleAnim = Idle_Weapon2,
        BreakSound  = BreakWoodItem,
        TreeDamage  = 0,
        TwoHandWeapon = TRUE,
        CriticalChance = 30,
        CritDmgMultiplier = 10,
        MinDamage = 1,
        MaxDamage = 1.5,
        DamageCategory = Slash,
        DamageMakeHole = TRUE,
        HitFloorSound = BladeHit,
        ImpactSound = BladeHit,
HitSound = BladeHit,
AttachmentType = Shovel,
        Tags = FishingSpear,
</pre>


'''''From AttachedWeaponDefinitions.lua (Project Zomboid directory/media/lua/shared/Definitions/)'''''
===Item===
{{CodeSnip
  | lang = java
  | line = true
  | start = 5023
  | source = items_weapons.txt
  | retrieved = true
  | version = 41.78.16
  | code =
item SpearCrafted
    {
        DisplayCategory = WeaponCrafted,
        MaxRange = 1.4,
        WeaponSprite = SpearCrafted,
        MinAngle = 0.8,
        Type = Weapon,
        MinimumSwingTime = 2,
        KnockBackOnNoDeath = FALSE,
        SwingAmountBeforeImpact = 0.02,
        Categories = Improvised;Spear,
        ConditionLowerChanceOneIn = 2,
        Weight = 1.7,
        SplatNumber = 1,
        PushBackMod = 0.3,
        SubCategory = Spear,
        ConditionMax = 5,
        MaxHitCount = 2,
        DoorDamage = 5,
        SwingAnim = Spear,
        DisplayName = Crafted Spear,
        MinRange = 0.98,
        SwingTime = 2,
        KnockdownMod = 0,
        SplatBloodOnNoDeath = FALSE,
        Icon = SpearStick,
        RunAnim = Run_Weapon2,
        IdleAnim = Idle_Weapon2,
        TreeDamage  =  0,
        TwoHandWeapon = TRUE,
        CriticalChance = 30,
        CritDmgMultiplier = 10,
        MinDamage = 1,
        MaxDamage = 1.5,
        DamageCategory = Slash,
        DamageMakeHole = TRUE,
        BreakSound  =  SpearCraftedBreak,
        HitFloorSound = SpearCraftedHit,
        ImpactSound = SpearCraftedHit,
        DoorHitSound = SpearCraftedHit,
        HitSound = SpearCraftedHit,
        SwingSound = SpearCraftedSwing,
        SoundMap = SpearStab SpearCraftedStab,
AttachmentType = Shovel,
        Tags = FishingSpear,
    }
}}


{{Retrieved|version=41|incver=50}}
===Finding spear in stomach===
<pre>
{{CodeSnip
  | lang = lua
  | line = true
  | start = 9
  | path = ProjectZomboid\media\lua\shared\Definitions
  | source = AttachedWeaponDefinitions.lua
  | retrieved = true
  | version = 41.78.16
  | code =
-- random spear in the stomach
AttachedWeaponDefinitions.spearStomach = {
AttachedWeaponDefinitions.spearStomach = {
chance = 5, -- chance is total, we'll get the chance of every definition and take one from there
chance = 5, -- chance is total, we'll get the chance of every definition and take one from there
Line 476: Line 522:
},
},
}
}
</pre>
}}
}}


==See also==
==See also==
* [[Foraging]]
*[[Fishing]]
*[[Wooden Spear]]
 
{{Navbox items|spears}}
 
 


{{Navbox_equipment}}
[[Category:Fishing tools]]
{{Navbox_weapons}}
[[Category:Tools]]
[[Category:Weapons]]
[[Category:Melee Weapons]]

Latest revision as of 19:06, 30 April 2024

UI Tick.png
This page has been revised for the current stable version (41.78.16).
Help by adding any missing content. [edit]
Crafted Spear
SpearCrafted Model.png
General
Category
Weapon - Crafted
Encumbrance
Moodle Icon HeavyLoad.png
1.7
Slot attached
Back
Skill
Spear
Properties
Max condition
5
Performance
Damage
1–1.5
Range
0.98–1.4
Attack speed
N/A
Knockback
0.3
Knockdown
0
Technical
Item ID
Base.SpearCrafted
PlushSpiffo.pngThis article is about the wooden spear that can be crafted. For the wooden spear that can be found impapled on zombies, see Wooden Spear.

A crafted spear is a weapon and tool that is crafted by a player and cannot be randomly found in containers. Spears can be attached to the character's back for quick access and weight reduction.

Usage

Pros Cons
  • Long reach, great for not getting too close to zombies.
  • Spear charge ability.
  • Easy to gather the resources required to craft it.
  • Able to attach short blades to the spear, making it more powerful.
  • Can be used to fish.
  • Weapon condition influenced by crafter's carpentry skill level.
  • Weak durability. Carrying additional spears or backup weapons is recommended.
  • Likely to break when fishing.

Critical bonus

Attacking a lone Zombie (no other Zombie within 1.7 tiles of the target) between the range of 1.25 and 1.40 yields a +20% chance to a critical strike. Like all critical damage, negative moodles do not affect the damage output of the strike: meaning this can often save a player who would otherwise not inflict lethal damage. When this is triggered, a special animation will occur to signal to the player that the critical was successful. Be warned, as the animation can be lengthy, and other zombies can cover the extremely small distance of 1.7 tiles, especially dangerous if fighting against a horde.

Spear charge

Every spear has the ability to use a unique spear charge attack. To use the spear charge ability, you must sprint (Left Alt key by default), after a few seconds of sprinting, the character will begin a spear charge and any zombie on the receiving end of the charge will be killed in one blow. Spear charges are best used against lone zombies due to your character being vulnerable during the kill animation. There are other risks such as nearby zombies being alerted by your sprinting, more difficult for your character to turn while sprinting and your character falling over if they sprint into a wall.

Spear-fishing

Fishing with a crafted spear.
Main article: Fishing

All crafted spears can be used in fishing instead of a fishing rod. Although crafted spear is easier to obtain, it is just as likely to break as a twine line on a crafted fishing rod.

A crafted spear has a lower chance of catching a fish, equal to the benefits gained when fishing during dawn or dusk, regardless of the player's fishing level. It also takes less time to complete a fishing cycle compared to any other fishing gear.

Condition

The spear suffers from a low maximum condition and takes damage at an exceedingly high rate until maintenance and spears is leveled. At level 0 maintenance and spear, it has a 50% chance of lowering its condition each attack.

Below is an example of the chance of losing durability at varying levels of the maintenance and spear skills.

For how this is calculated, see: Condition
Maintenance skill Weapon skill Durability lower chance
0 0 1/2 (50%)
0 4 1/4 (25%)
0 8 1/6 (17%)
4 0 1/6 (17%)
8 0 1/10 (10%)
4 4 1/8 (13%)
4 8 1/10 (10%)
8 8 1/14 (7%)
10 10 1/16 (6%)

Repairing

A spear can be repaired with the following:

It should be noted that each time a spear is repaired, its probability of success is reduced.

Cheese.png Exploit warning! This section contains unethical tactics that are not intended gameplay.Show / Hide

There is a workaround for maintaining a single upgraded spear, you can remove the attached weapon and re-attach it, this will reset the number of times repaired to 0, allowing it to be repaired effectively again, note that this consumes a good deal of duct tape in the process.

Crafting

A crafted spear is created by sharpening a tree branch or plank with a kitchen knife, hunting knife, chipped stone, stone knife, meat cleaver, or machete.
The crafted spear's starting condition is dependent on the player's carpentry skill. This is defined by a random number between 2 + carpentry and 4 + carpentry capped to the maximum condition of 5. A carpentry skill of 3 or above will therefore always produce a crafted spear with the full 5 condition. The tool used to craft the spear will then lose 1 condition, excluding the chipped stone. The chipped stone has a 1 in 3 chance of being consumed, where as making the chipped stone into a stone knife will allow for 13 uses.

Product Ingredients Tools Requirements Workstation XP
SpearStick.png
Crafted Spear
One of:
Branch.png Tree Branch ×1
Plank.png Plank ×1
One of:
KnifeChopping.png Kitchen Knife ×1
Machete.png Machete ×1
Cleaver.png Meat Cleaver ×1
KnifeFlint.png Stone Knife ×1
none none none 1.25 Carpentry

Upgrading

A spear may have many different attachments, each can be applied with two units of duct tape.
The upgraded spear's max condition is dependent on the items used to craft it. If the tools are damaged, the spear will have a lower condition.
The initial condition of an upgraded spear is determined by a combination of the condition of the chosen Crafted Spear and Hand Weapon.
The formula is as follows:
condition = spearCondition - ((weaponConditionMax - weaponCondition) / 2)
If the final result is greater than the upgraded spear's maximum condition, the condition will be set to the upgraded spear's maximum condition. If the final result is less than 2, the upgraded spear's condition will be set to 2.

Product Ingredients Tools Requirements Workstation XP
SpearButterKnife.png
Spear with Bread Knife
SpearStick.png Crafted Spear ×1
KnifeButter.png Bread Knife ×1
DuctTape.png Duct Tape ×2 unit(s)
none none none none
SpearButterKnife.png
Spear with Butter Knife
SpearStick.png Crafted Spear ×1
KnifeButter.png Butter Knife ×1
DuctTape.png Duct Tape ×1
none none none none
SpearFork.png
Spear with Fork
SpearStick.png Crafted Spear ×1
Fork.png Fork ×1
DuctTape.png Duct Tape ×2 unit(s)
none none none none
SpearKnife.png
Spear with Letter Opener
SpearStick.png Crafted Spear ×1
LetterOpener.png Letter Opener ×1
DuctTape.png Duct Tape ×2 unit(s)
none none none none
SpearScalpel.png
Spear with Scalpel
SpearStick.png Crafted Spear ×1
Scalpel.png Scalpel ×1
DuctTape.png Duct Tape ×2 unit(s)
none none none none
SpearSpoon.png
Spear with Spoon
SpearStick.png Crafted Spear ×1
Spoon.png Spoon ×1
DuctTape.png Duct Tape ×2 unit(s)
none none none none
SpearScissors.png
Spear with Scissors
SpearStick.png Crafted Spear ×1
Scissors.png Scissors ×1
DuctTape.png Duct Tape ×2 unit(s)
none none none none
SpearGardeningFork.png
Spear with Hand Fork
SpearStick.png Crafted Spear ×1
GardeningFork.png Hand Fork ×1
DuctTape.png Duct Tape ×2 unit(s)
none none none none
SpearScrewdriver.png
Spear with Screwdriver
SpearStick.png Crafted Spear ×1
DuctTape.png Duct Tape ×2 unit(s)
Screwdriver.png Screwdriver ×1
none none none none
SpearKnife.png
Spear with Knife
SpearStick.png Crafted Spear ×1
KnifeChopping.png Kitchen Knife ×1
DuctTape.png Duct Tape ×2 unit(s)
none none none none
SpearHuntingKnife.png
Spear with Hunting Knife
SpearStick.png Crafted Spear ×1
HuntingKnife.png Hunting Knife ×1
DuctTape.png Duct Tape ×2 unit(s)
none none none none
SpearMachete.png
Spear with Machete
SpearStick.png Crafted Spear ×1
Machete.png Machete ×1
DuctTape.png Duct Tape ×2 unit(s)
none none none none
SpearIcePick.png
Spear with Ice Pick
SpearStick.png Crafted Spear ×1
IcePick.png Ice Pick ×1
DuctTape.png Duct Tape ×2 unit(s)
none none none none

Stats of spear upgrades

Each of the upgraded spears mostly have different stats from the other, but will always be better than the normal spear in at least one stat.

Also see Weapons

Icon Name Weight Attack
Type
Damage Range Swing Time Critical Hit Chance Knockback Knockdown Weapon Durability Base ID
Minimum Maximum Damage done to doors Damage done to trees Minimum Maximum
SpearStick.png Crafted Spear 1.7 Spear 1 1.5 5 - 0.98 1.4 2 30 0.3 - 5 Base.SpearCrafted
SpearButterKnife.png Spear with Bread Knife 2.0 Spear 1 1.6 5 - 0.98 1.55 2 30 0.3 - 6 Base.SpearBreadKnife
SpearButterKnife.png Spear with Butter Knife 2.0 Spear 1 1.6 5 - 0.98 1.42 2 30 0.3 - 6 Base.SpearButterKnife
SpearFork.png Spear with Fork 2.0 Spear 1 1.6 5 - 0.98 1.42 2 30 0.3 - 6 Base.SpearFork
SpearKnife.png Spear with Letter Opener 2.0 Spear 1 1.6 5 - 0.98 1.42 2 30 0.3 - 6 Base.SpearLetterOpener
SpearScalpel.png Spear with Scalpel 2.0 Spear 1 1.6 5 - 0.98 1.42 2 30 0.3 - 6 Base.SpearScalpel
SpearSpoon.png Spear with Spoon 2.0 Spear 1 1.6 5 - 0.98 1.4 2 30 0.3 - 6 Base.SpearSpoon
SpearScissors.png Spear with Scissors 2.1 Spear 1 1.6 5 - 0.98 1.42 2 30 0.3 - 6 Base.SpearScissors
SpearGardeningFork.png Spear with Hand Fork 2.2 Spear 1.1 1.6 6 - 0.98 1.45 2 30 0.3 - 7 Base.SpearHandFork
SpearScrewdriver.png Spear with Screwdriver 2.1 Spear 1.2 1.6 7 - 0.98 1.45 2 30 0.3 - 7 Base.SpearScrewdriver
SpearHuntingKnife.png Spear with Hunting Knife 2.2 Spear 1.2 1.7 7 - 0.98 1.48 2 30 0.3 - 9 Base.SpearHuntingKnife
SpearMachete.png Spear with Machete 3.7 Spear 1.3 2 10 - 0.98 1.55 2 30 0.3 - 12 Base.SpearMachete
SpearIcePick.png Spear with Ice Pick 2.0 Spear 1 1.6 5 - 0.98 1.42 2 30 0.3 - 6 Base.SpearIcePick
SpearKnife.png Spear with Knife 2.0 Spear 1 1.6 5 - 0.98 1.45 2 30 0.3 - 7 Base.SpearKnife

Distribution

The loot distributions can be found in the table(s) below.

SpearCrafted distribution Show / Hide
Effective chance calculations are based off of default loot settings, and median zombie density. The higher the density of zombies in an area, the higher the effective chance of an item spawning. Chance is also influenced by the lucky and unlucky traits.
Containers
Building/Room Container Effective chance
SafehouseLoot counter 23.28%
SafehouseLoot crate 23.28%
SafehouseLoot metal_shelves 23.28%
SafehouseLoot wardrobe 23.28%
SurvivorCache1 counter 23.28%
SurvivorCache2 counter 23.28%
Zombie
Outfit Days survived Chance
All 30 5

Any spear may be randomly generated inside a zombie's stomach after having survived for 30 days. Approximately 0.16% of zombies will have a spear or spear with attachments on them. It is also possible to obtain a wooden spear this way, which acts like a spear while having the old inventory icon, name and can't be upgraded or used for fishing.

Gallery

Code

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

Item

Source: ProjectZomboid\media\scripts\items_weapons.txt

Retrieved: Build 41.78.16
item SpearCrafted
    {
        DisplayCategory = WeaponCrafted,
        MaxRange	=	1.4,
        WeaponSprite	=	SpearCrafted,
        MinAngle	=	0.8,
        Type	=	Weapon,
        MinimumSwingTime	=	2,
        KnockBackOnNoDeath	=	FALSE,
        SwingAmountBeforeImpact	=	0.02,
        Categories	=	Improvised;Spear,
        ConditionLowerChanceOneIn	=	2,
        Weight	=	1.7,
        SplatNumber	=	1,
        PushBackMod	=	0.3,
        SubCategory	=	Spear,
        ConditionMax	=	5,
        MaxHitCount	=	2,
        DoorDamage	=	5,
        SwingAnim	=	Spear,
        DisplayName	=	Crafted Spear,
        MinRange	=	0.98,
        SwingTime	=	2,
        KnockdownMod	=	0,
        SplatBloodOnNoDeath	=	FALSE,
        Icon	=	SpearStick,
        RunAnim	=	Run_Weapon2,
        IdleAnim	=	Idle_Weapon2,
        TreeDamage  =   0,
        TwoHandWeapon = TRUE,
        CriticalChance	=	30,
        CritDmgMultiplier = 10,
        MinDamage	=	1,
        MaxDamage	=	1.5,
        DamageCategory = Slash,
        DamageMakeHole = TRUE,
        BreakSound  =   SpearCraftedBreak,
        HitFloorSound	=	SpearCraftedHit,
        ImpactSound	=	SpearCraftedHit,
        DoorHitSound = SpearCraftedHit,
        HitSound	=	SpearCraftedHit,
        SwingSound	=	SpearCraftedSwing,
        SoundMap = SpearStab SpearCraftedStab,
		AttachmentType = Shovel,
        Tags = FishingSpear,
    }

Finding spear in stomach

Source: ProjectZomboid\media\lua\shared\Definitions\AttachedWeaponDefinitions.lua

Retrieved: Build 41.78.16
-- random spear in the stomach
AttachedWeaponDefinitions.spearStomach = {
	chance = 5, -- chance is total, we'll get the chance of every definition and take one from there
	weaponLocation = {"Stomach"}, -- defined in AttachedLocations.lua
	bloodLocations = {"Torso_Lower","Back"}, -- we add blood & hole on this part
	addHoles = true, -- if true, you need at least one bloodLocation
	daySurvived = 30, -- needed day of survival before seeing this one
	weapons = { -- list of possible weapons, we'll take one randomly from there
		"Base.SpearKnife",
		"Base.SpearCrafted",
		"Base.SpearHuntingKnife",
		"Base.SpearScrewdriver",
		"Base.SpearScissors",
		"Base.SpearScalpel",
		"Base.SpearButterKnife",
		"Base.SpearHuntingKnife",
	},
}

See also