Keytar: Difference between revisions

From PZwiki
(Added the weapon code information from the project zomboid "items_weapons.txt")
 
(Update distribution file)
 
(31 intermediate revisions by 9 users not shown)
Line 1: Line 1:
== Code ==
{{Header|Project Zomboid|Items|Weapons|Melee weapons|Long blunt weapons}}
===Item===
{{Page version|41.78.16}}
'''''From items_weapons.txt (Project Zomboid directory/media/scripts/)'''''
{{Infobox item
{{Retrieved|version=41|incver=55}}
|name=Keytar
<nowiki>
|model=Keytar_Model.png
    item Keytar
|icon=Keytar.png
|icon_name=Keytar
<!--GENERAL-->
|category=Instrument
|weight=2
|equipped=One-handed
|condition_max=2
|attachment_type=Guitar
<!--DAMAGE-->
|type=Blunt
|skill_type=Long Blunt
|base_speed=1.2
|min_range=0.58
|max_range=1.25
|min_damage=0.2
|max_damage=0.7
|crit_chance=20
|crit_multiplier=2
|tree_damage=10
|door_damage=3
|push_back=0.3
|knockdown=1.9


<!--TECHNICAL DETAILS-->
|item_id=Base.Keytar
}}
A '''keytar''' is a long blunt melee [[weapon]].
==Usage==
===Weapon===
The keytar can attack up to 2 enemies at a time dealing a maximum of 0.7 damage to enemies (unless a critical hit) from up to 1.25 [[tiles]] away at an attack speed of 1.2.
===Breaking doors===
It can be used to bash down [[Door|doors]], but it is ineffective, dealing only 3 damage per hit.
===Chopping trees===
It is not very effective at chopping down trees, dealing 10 damage per hit.
Note: Even if you wanted to chop down trees with a keytar, you'll likely going to break it even with max skills relating with it (From my testing its 6 hits to one tree being chopped Including some crazy 32 hits which chopped two trees down. The average is 15)
==Condition==
The keytar has a maximum condition of 2. 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 (3 + 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 [[Skills|maintenance]] and [[Skills|long blunt]] levels.
{{Durability weapon|3}}
===Repairing===
The keytar cannot be repaired.
==Distribution==
The loot distributions can be found in the table(s) below.
<!--BOT FLAG|Keytar|41.78.16-->
{{Clear}}
<div class="togglebox theme-red">
    <div>Keytar distribution
        <span class="mw-customtoggle-togglebox-Keytar" 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-Keytar">
    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
    |-
    | BandPractice
    | {{ll|crate}}
    | 6.29%
    |-
    | BandPractice
    | {{ll|metal_shelves}}
    | 6.29%
    |-
    | all
    | {{ll|wardrobe}}
    | 1.65%
    |-
    | bedroom
    | {{ll|crate}}
    | 0.53%
    |-
    | bedroom
    | {{ll|crate}}
    | 15.1%
    |-
    | bedroom
    | {{ll|wardrobe}}
    | 1.65%
    |-
    | closet
    | {{ll|crate}}
    | 0.53%
    |-
    | closet
    | {{ll|crate}}
    | 15.1%
    |-
    | closet
    | {{ll|metal_shelves}}
    | 15.1%
    |-
    | daycare
    | {{ll|wardrobe}}
    | 1.65%
    |-
    | garagestorage
    | {{ll|crate}}
    | 0.53%
    |-
    | garagestorage
    | {{ll|crate}}
    | 15.1%
    |-
    | pawnshop
    | {{ll|shelves}}
    | 2.81%
    |-
    | pawnshop
    | {{ll|shelves}}
    | 10.78%
    |-
    | pawnshopstorage
    | {{ll|crate}}
    | 15.1%
    |-
    | pawnshopstorage
    | {{ll|metal_shelves}}
    | 15.1%
    |-
    | storageunit
    | {{ll|crate}}
    | 0.53%
    |-
    | storageunit
    | {{ll|crate}}
    | 15.1%
    |-
    | storageunit
    | {{ll|metal_shelves}}
    | 0.53%
    |-
    | storageunit
    | {{ll|metal_shelves}}
    | 15.1%
    |}
</div>
    </div><div style="clear: both;"></div>
    </div></div><div class="toggle large mw-customtoggle-togglebox-Keytar" title="{{int:show}}/{{int:hide}}"></div></div>
<!--END BOT FLAG|Keytar|41.78.16-->
==Gallery==
<gallery>
File:Keytar.png|Item icon
File:Keytar_Model.png|Item model
</gallery>
==Code==
{{CodeBox
| {{CodeSnip
  | lang = java
  | line = true
  | start = 3098
  | source = items_weapons.txt
  | retrieved = true
  | version = 41.78.16
  | code =
item Keytar
    {
        DisplayCategory = Instrument,
         MaxRange = 1.25,
         MaxRange = 1.25,
         MinAngle = 0.72,
         MinAngle = 0.72,
Line 45: Line 212:
         BaseSpeed = 1.2,
         BaseSpeed = 1.2,
         AttachmentType = Guitar,
         AttachmentType = Guitar,
        {</nowiki>
    }
}}
}}
 
==See also==
*[[Acoustic Guitar]]
*[[Electric Guitar]]
*[[Electric Bass]]
 
{{Navbox items|blunt}}
 
 
[[Category:Instruments]]

Latest revision as of 13:04, 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]
Keytar
Keytar Model.png
General
Category
Instrument
Encumbrance
Moodle Icon HeavyLoad.png
2
Equipped
One-handed
Slot attached
Back
Skill
Properties
Max condition
2
Performance
Damage
0.2–0.7
Door damage
3
Tree damage
10
Range
0.58–1.25
Attack speed
1.2
Knockback
0.3
Knockdown
1.9
Crit chance
20%
Technical
Item ID
Base.Keytar

A keytar is a long blunt melee weapon.

Usage

Weapon

The keytar can attack up to 2 enemies at a time dealing a maximum of 0.7 damage to enemies (unless a critical hit) from up to 1.25 tiles away at an attack speed of 1.2.

Breaking doors

It can be used to bash down doors, but it is ineffective, dealing only 3 damage per hit.

Chopping trees

It is not very effective at chopping down trees, dealing 10 damage per hit. Note: Even if you wanted to chop down trees with a keytar, you'll likely going to break it even with max skills relating with it (From my testing its 6 hits to one tree being chopped Including some crazy 32 hits which chopped two trees down. The average is 15)

Condition

The keytar has a maximum condition of 2. 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 (3 + 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 maintenance and long blunt levels.

For how this is calculated, see: Condition
Maintenance skill Weapon skill Condition lower chance
0 0 1/3 (33%)
0 4 1/5 (20%)
0 8 1/7 (14%)
4 0 1/7 (14%)
8 0 1/11 (9%)
4 4 1/9 (11%)
4 8 1/11 (9%)
8 8 1/15 (7%)
10 10 1/17 (6%)

Repairing

The keytar cannot be repaired.

Distribution

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

Keytar 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
BandPractice crate 6.29%
BandPractice metal_shelves 6.29%
all wardrobe 1.65%
bedroom crate 0.53%
bedroom crate 15.1%
bedroom wardrobe 1.65%
closet crate 0.53%
closet crate 15.1%
closet metal_shelves 15.1%
daycare wardrobe 1.65%
garagestorage crate 0.53%
garagestorage crate 15.1%
pawnshop shelves 2.81%
pawnshop shelves 10.78%
pawnshopstorage crate 15.1%
pawnshopstorage metal_shelves 15.1%
storageunit crate 0.53%
storageunit crate 15.1%
storageunit metal_shelves 0.53%
storageunit metal_shelves 15.1%

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 Keytar
    {
        DisplayCategory = Instrument,
        MaxRange	=	1.25,
        MinAngle	=	0.72,
        WeaponSprite	=	Keytar,
        Type	=	Weapon,
        MinimumSwingTime	=	3.0,
        KnockBackOnNoDeath	=	TRUE,
        Categories	=	Blunt,
        ConditionLowerChanceOneIn	=	3,
        Weight	=	2,
        SplatNumber	=	1,
        PushBackMod	=	0.3,
        SubCategory	=	Swinging,
        ConditionMax	=	2,
        MaxHitCount	=	2,
        DoorDamage	=	3,
        IdleAnim	=	Idle_Weapon2,
        SwingAnim	=	Bat,
        DisplayName	=	Keytar,
        MinRange	=	0.58,
        SwingTime	=	3.0,
        HitAngleMod	=	-30,
        SplatSize	=	5,
        KnockdownMod	=	1.5,
        SplatBloodOnNoDeath	=	TRUE,
        Icon	=	Keytar,
        RunAnim	=	Run_Weapon2,
        TwoHandWeapon = TRUE,
        BreakSound  =   KeytarBreak,
        DoorHitSound = KeytarHit,
		HitSound = KeytarHit,
		HitFloorSound = KeytarHit,
		SwingSound = KeytarSwing,
        TreeDamage  =   10,
        CriticalChance	=	20,
        CritDmgMultiplier = 2,
        MinDamage	=	0.2,
        MaxDamage	=	0.7,
        BaseSpeed = 1.2,
        AttachmentType = Guitar,
    }

See also