Violin: Difference between revisions

From PZwiki
(Added basic weapon information and weapon code information from item_weapons.txt)
 
(Update distribution file)
 
(26 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Header|Project Zomboid|Items|Weapons|Melee weapons|Short blunt weapons}}
{{Page version|41.78.16}}
{{Infobox item
|name=Violin
|model=Violin_Model.png
|icon=Violin.png
|icon_name=Violin
<!--GENERAL-->
|category=Instrument
|weight=0.7
|equipped=One-handed
|condition_max=1
<!--DAMAGE-->
|type=Blunt
|skill_type=Short Blunt
|base_speed=1.2
|min_range=0.61
|max_range=1
|min_damage=0.2
|max_damage=0.4
|crit_chance=5
|tree_damage=0
|door_damage=5
|push_back=0.3
|knockdown=2
<!--TECHNICAL DETAILS-->
|item_id=Base.Violin
}}
A '''violin''' is a short blunt melee [[weapon]].
==Usage==
===Weapon===
===Weapon===
Underwhelming in nearly every regard a weapon can be underwhelming in, the violin really is a novelty item more than it is a weapon.
The violin can attack up to 2 enemies at a time dealing a maximum of 0.4 damage to enemies (unless a critical hit) from up to 1 [[tiles]] away at an attack speed of 1.2.
 
===Breaking doors===
It can be used to bash down [[Door|doors]], dealing 5 damage per hit.
 
==Condition==
The violin has a maximum condition of 1. Its rate of degradation is influenced by the [[Skills|short blunt]] and [[Skills|maintenance]] skills. The chance of losing [[durability]] can be simplified to the following formula: <code>1 in (1 + maintenanceMod &times; 2)</code>. Where "maintenanceMod" is calculated using the short blunt and maintenance skills.<br>
Below is an example of the chance of losing durability at varying levels of [[Skills|maintenance]] and [[Skills|short blunt]] levels.
{{Durability weapon|1}}
 
==Distribution==
The loot distributions can be found in the table(s) below.
 
<!--BOT FLAG|Violin|41.78.16-->
{{Clear}}
<div class="togglebox theme-red">
    <div>Violin distribution
        <span class="mw-customtoggle-togglebox-Violin" 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-Violin">
    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
    |-
    | bedroom
    | {{ll|crate}}
    | 0.53%
    |-
    | bedroom
    | {{ll|crate}}
    | 10.78%
    |-
    | closet
    | {{ll|crate}}
    | 0.53%
    |-
    | closet
    | {{ll|crate}}
    | 10.78%
    |-
    | closet
    | {{ll|metal_shelves}}
    | 10.78%
    |-
    | garagestorage
    | {{ll|crate}}
    | 0.53%
    |-
    | garagestorage
    | {{ll|crate}}
    | 10.78%
    |-
    | livingroom
    | {{ll|wardrobe}}
    | 10.78%
    |-
    | musicstore
    | {{ll|shelves}}
    | 5.21%
    |-
    | musicstore
    | {{ll|shelves}}
    | 19.27%
    |-
    | pawnshop
    | {{ll|shelves}}
    | 5.21%
    |-
    | pawnshop
    | {{ll|shelves}}
    | 19.27%
    |-
    | pawnshopstorage
    | {{ll|crate}}
    | 10.78%
    |-
    | pawnshopstorage
    | {{ll|metal_shelves}}
    | 10.78%
    |-
    | storageunit
    | {{ll|crate}}
    | 0.53%
    |-
    | storageunit
    | {{ll|crate}}
    | 10.78%
    |-
    | storageunit
    | {{ll|metal_shelves}}
    | 0.53%
    |-
    | storageunit
    | {{ll|metal_shelves}}
    | 10.78%
    |}
</div>
    </div><div style="clear: both;"></div>
    </div></div><div class="toggle large mw-customtoggle-togglebox-Violin" title="{{int:show}}/{{int:hide}}"></div></div>
<!--END BOT FLAG|Violin|41.78.16-->
 
==Gallery==
<gallery>
File:Violin.png|Item icon
File:Violin_Model.png|Item model
</gallery>


===Item===
==Code==
'''''From items.txt (Project Zomboid directory/media/scripts/)'''''
{{CodeBox
{{Retrieved|version=41|incver=55}}
| {{CodeSnip
<nowiki>
  | lang = java
  | line = true
  | start = 524
  | source = items_weapons.txt
  | retrieved = true
  | version = 41.78.16
  | code =
item Violin
    {
        DisplayCategory = Instrument,
         MaxRange = 1,
         MaxRange = 1,
         WeaponSprite = Violin,
         WeaponSprite = Violin,
Line 39: Line 188:
         MaxDamage = 0.4,
         MaxDamage = 0.4,
         BaseSpeed = 1.2,
         BaseSpeed = 1.2,
        {</nowiki>
    }
}}
}}
 
==See also==
*[[Keytar]]
*[[Banjo]]
*[[Trumpet]]
 
{{Navbox items|blunt}}
 
 
[[Category:Instruments]]

Latest revision as of 14:14, 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]
Violin
Violin Model.png
General
Category
Instrument
Encumbrance
Moodle Icon HeavyLoad.png
0.7
Equipped
One-handed
Skill
Properties
Max condition
1
Performance
Damage
0.2–0.4
Door damage
5
Tree damage
0
Range
0.61–1
Attack speed
1.2
Knockback
0.3
Knockdown
2
Crit chance
5%
Technical
Item ID
Base.Violin

A violin is a short blunt melee weapon.

Usage

Weapon

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

Breaking doors

It can be used to bash down doors, dealing 5 damage per hit.

Condition

The violin has a maximum condition of 1. Its rate of degradation is influenced by the short blunt and maintenance skills. The chance of losing durability can be simplified to the following formula: 1 in (1 + 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 maintenance and short blunt levels.

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

Distribution

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

Violin 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
bedroom crate 0.53%
bedroom crate 10.78%
closet crate 0.53%
closet crate 10.78%
closet metal_shelves 10.78%
garagestorage crate 0.53%
garagestorage crate 10.78%
livingroom wardrobe 10.78%
musicstore shelves 5.21%
musicstore shelves 19.27%
pawnshop shelves 5.21%
pawnshop shelves 19.27%
pawnshopstorage crate 10.78%
pawnshopstorage metal_shelves 10.78%
storageunit crate 0.53%
storageunit crate 10.78%
storageunit metal_shelves 0.53%
storageunit metal_shelves 10.78%

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 Violin
    {
        DisplayCategory = Instrument,
        MaxRange	=	1,
        WeaponSprite	=	Violin,
        MinAngle	=	0.65,
        Type	=	Weapon,
        MinimumSwingTime	=	4,
        KnockBackOnNoDeath	=	FALSE,
        SwingAmountBeforeImpact	=	0.02,
        Categories	=	SmallBlunt,
        ConditionLowerChanceOneIn	=	1,
        Weight	=	0.7,
        SplatNumber	=	1,
        PushBackMod	=	0.3,
        SubCategory	=	Swinging,
        ConditionMax	=	1,
        MaxHitCount	=	2,
        DoorDamage	=	5,
        SwingAnim	=	Bat,
        DisplayName	=	Violin,
        MinRange	=	0.61,
        SwingTime	=	4,
        KnockdownMod	=	2,
        SplatBloodOnNoDeath	=	FALSE,
        Icon	=	Violin,
        BreakSound  =   ViolinBreak,
        DoorHitSound = ViolinHit,
		HitSound = ViolinHit,
		HitFloorSound = ViolinHit,
		SwingSound = ViolinSwing,
        TreeDamage  =   0,
        CriticalChance	=	5,
        MinDamage	=	0.2,
        MaxDamage	=	0.4,
        BaseSpeed = 1.2,
    }

See also