Barbell: Difference between revisions

From PZwiki
m (Removed Testing tag due to Build 41 being stable.)
(added CodeBox, Condition and other fixes/updates/adjustments)
Line 1: Line 1:
{{languages|Barbell}}
{{languages}}
{{header|The Game World|Items|Tools|version=Version 41|incver=50}}
{{header|The Game World|Items|Tools|version=Version 41|incver=78.16}}
{{Infobox weapon
{{Infobox weapon
|display_name=Barbell
|display_name=Barbell
Line 9: Line 9:
|alternate_image=Barbell.png
|alternate_image=Barbell.png
<!--GENERAL-->
<!--GENERAL-->
|category=Tool
|category=Sports
|weight=6
|weight=6
|function=[[Exercise]]
|function=[[Exercise]]
|equipped=Two-handed
|equipped=Two-handed
|condition_max=15
|condition_max=15
<!--CHARACTERISTICS-->
|skill_type=Blunt
|attachment_type=N/A
<!--DAMAGE-->
<!--DAMAGE-->
|type=Blunt
|type=Blunt
|swing_time=2
|base_speed=0.7
|min_range=0.61
|min_range=0.61
|max_range=1.35
|max_range=1.35
|min_damage=1.8
|min_damage=1.8
|max_damage=2.8
|max_damage=2.8
|door_damage=35
|tree_damage=55
|push_back=0.3
|push_back=0.3
|knockdown=2
|knockdown=2
<!--TECHNICAL DETAILS-->
<!--TECHNICAL DETAILS-->
|class_name=BarBell
|class_name=Base.BarBell
}}
}}
A '''barbell''' is a fitness item and [[Weapons#Two-Handed|heavy weapon]].
A '''barbell''' is a fitness item and [[Weapons#Two-Handed|heavy weapon]].
Line 31: Line 34:
== Usage ==
== Usage ==
=== Fitness ===
=== Fitness ===
:''For main article, see [[Exercise]]''
{{Main|Exercise}}
While the player has a barbell in their inventory, they can perform the [[Exercise#Barbell Curl|Barbell Curl]] exercise. This exercise is 20% more effective than its weightless alternative, [[Exercise#Pushups|pushups]].
While the player has a barbell in their inventory, they can perform the [[Exercise#Barbell Curl|barbell curl]] exercise. This exercise is 20% more effective than its weightless alternative, [[Exercise#Pushups|pushups]].


=== Weapon ===
=== Weapon ===
A barbell is considered a heavy weapon and requires two hands to use at all. Its high damage, ability to break down doors and trees, and durability make it seem a desirable weapon. This is offset, however, by the high [[Moodles#Exhausted|exhaustion]] rate of the weapon and its incredibly high weight.
A barbell is considered a heavy weapon and requires two hands to use at all. It has high damage to [[door]]s, [[tree]]s and enemies, always knocking them over, along with a high durability, making it seem a desirable weapon. This is offset, however, by the high [[Moodles#Exhausted|exhaustion]] rate of the weapon and its incredibly high weight.
 
It is one of the only weapons that cannot be attached anywhere ([[belt]], back, or [[holster]]).
 
==Condition==
The barbell 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 (25 + maintenanceMod &times; 2)</code>. Where "maintenanceMod" is calculated using the long blunt and maintenance skills.<br>
Below is an example of the chance of losing durability at varying levels of the [[Skills|maintenance]] and [[Skills|long blunt]] skills.
{{Durability weapon|25}}
===Repairing===
The barbell cannot be repaired. However, once broken it can still be used for exercise.  


== Gallery ==
== Gallery ==
Line 43: Line 55:


== Code ==
== Code ==
{{Retrieved|version=41|incver=50}}
{{CodeBox|
'''''From items_weapons.txt (Project Zomboid directory/media/scripts/)'''''
{{CodeSnip
<pre> item BarBell
  | lang = java
MaxRange = 1.35,
  | line = true
WeaponSprite = BarBell,
  | start = 2768
MinAngle = 0.8,
  | source = items_weapons.txt
Type = Weapon,
  | retrieved = true
MinimumSwingTime = 3.0,
  | version = 41
KnockBackOnNoDeath = TRUE,
  | incver = 78.16
SwingAmountBeforeImpact = 0.002,
  | code =
Categories = Blunt,
    item BarBell
ConditionLowerChanceOneIn = 25,
    {
Weight = 6,
        DisplayCategory = Sports,
SplatNumber = 3,
        MaxRange = 1.35,
PushBackMod = 0.3,
        WeaponSprite = BarBell,
EnduranceMod = 3,
        MinAngle = 0.8,
SubCategory = Swinging,
        Type = Weapon,
ConditionMax = 15,
        MinimumSwingTime = 3.0,
MaxHitCount = 2,
        KnockBackOnNoDeath = TRUE,
DoorDamage = 35,
        SwingAmountBeforeImpact = 0.002,
IdleAnim = Idle_Weapon2,
        Categories = Blunt,
SwingAnim = Heavy,
        ConditionLowerChanceOneIn = 25,
DisplayName = Barbell,
        Weight = 6,
MinRange = 0.61,
        SplatNumber = 3,
SwingTime = 2,
        PushBackMod = 0.3,
HitAngleMod = -30,
        EnduranceMod = 3,
SplatSize = 5,
        SubCategory = Swinging,
KnockdownMod = 2,
        ConditionMax = 15,
SplatBloodOnNoDeath = TRUE,
        MaxHitCount = 3,
Icon = Barbell,
        DoorDamage = 35,
RunAnim = Run_Weapon2,
        IdleAnim = Idle_Weapon2,
TwoHandWeapon = TRUE,
        SwingAnim = Heavy,
BreakSound = BreakWoodItem,
        DisplayName = Barbell,
TreeDamage = 55,
        MinRange = 0.61,
MetalValue = 120,
        SwingTime = 2,
CritDmgMultiplier = 2,
        HitAngleMod = -30,
MinDamage = 1.8,
        SplatSize = 5,
MaxDamage = 2.8,
        KnockdownMod = 2,
BaseSpeed = 0.7,
        SplatBloodOnNoDeath = TRUE,
WeaponLength = 0.5,
        Icon = Barbell,
RequiresEquippedBothHands = TRUE,
        RunAnim = Run_Weapon2,
AlwaysKnockdown = TRUE,
        TwoHandWeapon = TRUE,
</pre>
        SwingSound = BarbellSwing,
        DoorHitSound = BarbellHit,
        HitSound = BarbellHit,
        HitFloorSound = BarbellHit,
        BreakSound = BarbellBreak,
        TreeDamage = 55,
        MetalValue = 120,
        CritDmgMultiplier = 2,
        MinDamage = 1.8,
        MaxDamage = 2.8,
        BaseSpeed = 0.7,
  WeaponLength = 0.5,
  RequiresEquippedBothHands = TRUE,
  AlwaysKnockdown = TRUE,
  }
}}
}}


== See also ==
== See also ==

Revision as of 14:15, 30 December 2023

Barbell
Barbell
Barbell.png
General
Category Sports
Encumbrance
Heavy Load
6
Function Exercise
Equipped Two-handed
Condition max. 15
Skill Long Blunt
Attachment N/A
Damage
Type Blunt
Attack speed 0.7
Range 0.61–1.35 tiles
Damage 1.8–2.8
Tree damage 55
Door damage 35
Knockback 0.3
Knockdown 2
Technical details
Base ID Base.BarBell

A barbell is a fitness item and heavy weapon.

Usage

Fitness

Main article: Exercise

While the player has a barbell in their inventory, they can perform the barbell curl exercise. This exercise is 20% more effective than its weightless alternative, pushups.

Weapon

A barbell is considered a heavy weapon and requires two hands to use at all. It has high damage to doors, trees and enemies, always knocking them over, along with a high durability, making it seem a desirable weapon. This is offset, however, by the high exhaustion rate of the weapon and its incredibly high weight.

It is one of the only weapons that cannot be attached anywhere (belt, back, or holster).

Condition

The barbell 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 (25 + 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/25 (4%)
0 4 1/27 (4%)
0 8 1/29 (3%)
4 0 1/29 (3%)
8 0 1/33 (3%)
4 4 1/31 (3%)
4 8 1/33 (3%)
8 8 1/37 (3%)
10 10 1/39 (3%)

Repairing

The barbell cannot be repaired. However, once broken it can still be used for exercise.

Gallery

Code

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

Source: ProjectZomboid\media\scripts\items_weapons.txt

Retrieved: Build 41.78.16
item BarBell
    {
        DisplayCategory = Sports,
        MaxRange	=	1.35,
        WeaponSprite	=	BarBell,
        MinAngle	=	0.8,
        Type	=	Weapon,
        MinimumSwingTime	=	3.0,
        KnockBackOnNoDeath	=	TRUE,
        SwingAmountBeforeImpact	=	0.002,
        Categories	=	Blunt,
        ConditionLowerChanceOneIn	=	25,
        Weight	=	6,
        SplatNumber	=	3,
        PushBackMod	=	0.3,
        EnduranceMod	=	3,
        SubCategory	=	Swinging,
        ConditionMax	=	15,
        MaxHitCount	=	3,
        DoorDamage	=	35,
        IdleAnim	=	Idle_Weapon2,
        SwingAnim	=	Heavy,
        DisplayName	=	Barbell,
        MinRange	=	0.61,
        SwingTime	=	2,
        HitAngleMod	=	-30,
        SplatSize	=	5,
        KnockdownMod	=	2,
        SplatBloodOnNoDeath	=	TRUE,
        Icon	=	Barbell,
        RunAnim	=	Run_Weapon2,
        TwoHandWeapon = TRUE,
        SwingSound = BarbellSwing,
        DoorHitSound = BarbellHit,
        HitSound = BarbellHit,
        HitFloorSound = BarbellHit,
        BreakSound = BarbellBreak,
        TreeDamage = 55,
        MetalValue = 120,
        CritDmgMultiplier = 2,
        MinDamage	=	1.8,
        MaxDamage	=	2.8,
        BaseSpeed = 0.7,
  		WeaponLength = 0.5,
  		RequiresEquippedBothHands = TRUE,
  		AlwaysKnockdown = TRUE,
  }

See also