Shovel: Difference between revisions

From PZwiki
m (→‎top: New infobox upgrade - initial test)
(→‎Code: Codebox Update)
Tag: Reverted
Line 54: Line 54:
Shovels can commonly be found inside [[Container#Crates|crates]], sheds, and [[Containers#Shelves|work shelves]].
Shovels can commonly be found inside [[Container#Crates|crates]], sheds, and [[Containers#Shelves|work shelves]].


==Code==
{{CodeBox|[[File:TZ_MayonnaiseWFull.png]] {{ID|Base.MayonnaiseWaterFull}}<br>
{{CodeBox|[[File:Shovel.png]] {{ID|Base.Shovel}}<br>
{{CodeSnip
{{CodeSnip
   | lang = java
   | lang = java
   | line = true
   | line = false
  | start = 1727
   | source = farming.txt
   | source = items_weapons.txt
   | retrieved = true
   | retrieved = true
   | version = 41
   | version = 41.68
  | incver = 78.16
   | code =
   | code =
     item Shovel
     item MayonnaiseWaterFull
     {
     {
         DisplayCategory = Gardening,
         DisplayCategory = Water,
         Type = Weapon,
         Type = Drainable,
         DisplayName = Shovel,
         DisplayName = Water Bottle,
         Icon = Shovel,
         Icon = TZ_MayonnaiseWFull,
         Weight = 2.0,
         Weight = 0.5,
        SubCategory    =    Swinging,
         ReplaceOnDeplete = MayonnaiseEmpty,
        MinAngle = 0.85,
         UseWhileEquipped = false,
         MaxRange = 1.6,
         UseDelta = 0.16,
         MinRange = 0.61,
         ReplaceOnUseOn = WaterSource-MayonnaiseWaterFull,
         PushBackMod = 0.5,
         IsWaterSource = true,
         HitAngleMod = -30.0,
         CanStoreWater = true,
         SwingAnim = Bat,
         FillFromDispenserSound = GetWaterFromDispenserPlasticMedium,
         MaxHitCount = 3,
         FillFromTapSound = GetWaterFromTapPlasticMedium,
         WeaponSprite = Shovel,
         StaticModel = MayoJar,
         IdleAnim = Idle_Weapon2,
         WorldStaticModel = MayoJar_Ground,
         RunAnim = Run_Weapon2,
    }
         Weight = 1.5,
}}<br>
        DoorDamage = 10,
[[File:TZ_MayonnaiseEmpty.png]] {{ID|Base.MayonnaiseEmpty}}<br>
        MinimumSwingTime = 2.1,
        SwingTime = 2.1,
        SwingAmountBeforeImpact = 0.02,
        ConditionLowerChanceOneIn = 10,
        ConditionMax = 10,
        Categories = Blunt,
        TwoHandWeapon = TRUE,
        BreakSound  =  ShovelBreak,
        DoorHitSound = ShovelHit,
HitSound = ShovelHit,
HitFloorSound = ShovelHit,
SwingSound = ShovelSwing,
        KnockdownMod = 2,
        KnockBackOnNoDeath = TRUE,
        MetalValue = 70,
        TreeDamage = 1,
        CriticalChance = 40,
        CritDmgMultiplier = 2,
        MaxDamage = 1.9,
        MinDamage = 0.8,
        BaseSpeed = 0.8,
      WeaponLength = 0.55,
        DamageCategory = Slash,
        DamageMakeHole = TRUE,
        AttachmentType = Shovel,
        Tags = ClearAshes;DigGrave;DigPlow;TakeDirt,
    }
}}
 
[[File:Shovel2.png]] {{ID|Base.Shovel2}}<br>
{{CodeSnip
{{CodeSnip
   | lang = java
   | lang = java
   | line = true
   | line = false
  | start = 1775
   | source = farming.txt
   | source = items_weapons.txt
   | retrieved = true
   | retrieved = true
   | version = 41
   | version = 41.68
  | incver = 78.16
   | code =
   | code =
     item Shovel2
     item MayonnaiseEmpty
     {
     {
         DisplayCategory = Gardening,
         DisplayCategory = WaterContainer,
         Type = Weapon,
         Type = Normal,
         DisplayName = Shovel,
         DisplayName = Empty Bottle,
         Icon = Shovel2,
         Icon = TZ_MayonnaiseEmpty,
         Weight = 2.0,
         Weight = 0.1,
        SubCategory    =    Swinging,
         ReplaceOnUseOn = WaterSource-MayonnaiseWaterFull,
        MinAngle = 0.85,
         CanStoreWater = true,
        MaxRange = 1.6,
         StaticModel = MayoJar,
        MinRange = 0.61,
         WorldStaticModel = MayoJarEmpty_Ground,
         PushBackMod = 0.5,
    }
        HitAngleMod = -30.0,
         SwingAnim = Bat,
         MaxHitCount = 3,
         WeaponSprite = Shovel02,
        IdleAnim = Idle_Weapon2,
        RunAnim = Run_Weapon2,
        Weight = 1.5,
        DoorDamage = 5,
        MinimumSwingTime = 2.1,
        SwingTime = 2.1,
        SwingAmountBeforeImpact = 0.02,
        ConditionLowerChanceOneIn = 10,
        ConditionMax = 10,
        Categories = Blunt,
        TwoHandWeapon = TRUE,
        BreakSound  =  ShovelBreak,
        DoorHitSound = ShovelHit,
        HitSound = ShovelHit,
        HitFloorSound = ShovelHit,
        SwingSound = ShovelSwing,
        KnockdownMod = 2,
        KnockBackOnNoDeath = TRUE,
        MetalValue = 70,
        TreeDamage = 1,
        CriticalChance = 40,
        CritDmgMultiplier = 2,
        MinDamage = 0.8,
        MaxDamage = 1.9,
        BaseSpeed = 0.8,
      WeaponLength = 0.55,
        DamageCategory = Slash,
        DamageMakeHole = TRUE,
        AttachmentType = Shovel,
        Tags = ClearAshes;DigGrave;DigPlow;TakeDirt,
    }
}}
}}
}}
}}

Revision as of 07:01, 1 February 2024

Template:Header/sandbox2

UI Tick.png
This page has been revised for the current stable version (41.78.16).
Help by adding any missing content. [edit]
Frame.png
This article contains outdated/low-quality images.
Reason: Missing 3D model variant
Please help the PZwiki by uploading an improved/updated version of the image(s) found on this page.
Shovel
Shovel Model.png
Shovel
General
Category
Gardening
Encumbrance
Moodle Icon HeavyLoad.png
1.5
Equipped
Two-handed
Function
Skill
Properties
Max condition
10
Performance
Damage
0.8–1.9
Range
0.61–1.6
Knockback
0.5
Knockdown
2
Technical
Item ID
Base.Shovel
Base.Shovel2

A shovel is a farming tool or long blunt weapon that can move dirt, sand, and gravel. It can also till soil.

Usage

General

Shovels can be used to dig graves to permanently dispose of up to 5 corpses and all the items the corpses are wearing/carrying. It also fulfills the same functions as a trowel or hand fork in that they can be used to till grass and dirt tiles and to find worms.

Moving tiles

While the player has the shovel and an empty sack in their main inventory, a new contextual option will appear when right-clicking any one of these aforementioned tiles. This new option allows the player to move up to four tiles of dirt, sand or gravel into a single sack, upon changing the sack to a dirt bag, sandbag or gravel bag, respectively. Each filled sack can then be "spilled" over any other pre-existing tile, changing it to the contents of the sack.

This option only works with the spade variant of the shovel, not the square head.

This mechanic is ideal when a specific location is desired for farming in which doesn't already contain dirt tiles. There generally isn't much use in spreading sand around, but areas that have been covered in gravel will not be overgrown by erosion and saplings cannot grow there, allowing for the creation of artificial driveways. Finally, bags full of sand or gravel can be used to set up sandbag walls and gravel bag walls, which offer some protection from gunfire.

Weapon

The shovel may also be used as a blunt melee weapon with a fast attack speed and intermediate damage, however it is fairly fragile and caps at around 20-50 zombie kills before breaking, depending on long blunt level.

Condition

The shovel has a maximum condition of 10. 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 short 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%)

Distribution

Shovels can commonly be found inside crates, sheds, and work shelves.

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

TZ MayonnaiseWFull.png Base.MayonnaiseWaterFull
Source: ProjectZomboid\media\scripts\farming.txt

Retrieved: Build 41.68
item MayonnaiseWaterFull
    {
        DisplayCategory = Water,
        Type = Drainable,
        DisplayName = Water Bottle,
        Icon = TZ_MayonnaiseWFull,
        Weight = 0.5,
        ReplaceOnDeplete = MayonnaiseEmpty,
        UseWhileEquipped = false,
        UseDelta = 0.16,
        ReplaceOnUseOn = WaterSource-MayonnaiseWaterFull,
        IsWaterSource = true,
        CanStoreWater = true,
        FillFromDispenserSound = GetWaterFromDispenserPlasticMedium,
        FillFromTapSound = GetWaterFromTapPlasticMedium,
        StaticModel = MayoJar,
        WorldStaticModel = MayoJar_Ground,
    }

TZ MayonnaiseEmpty.png Base.MayonnaiseEmpty
Source: ProjectZomboid\media\scripts\farming.txt

Retrieved: Build 41.68
item MayonnaiseEmpty
    {
        DisplayCategory = WaterContainer,
        Type = Normal,
        DisplayName = Empty Bottle,
        Icon = TZ_MayonnaiseEmpty,
        Weight = 0.1,
        ReplaceOnUseOn = WaterSource-MayonnaiseWaterFull,
        CanStoreWater = true,
        StaticModel = MayoJar,
        WorldStaticModel = MayoJarEmpty_Ground,
    }

See also