Trumpet: Difference between revisions

From PZwiki
(Added the weapon code information from the project zomboid "items_weapons.txt")
 
(Update distribution file)
 
(26 intermediate revisions by 5 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=Trumpet
<nowiki>
|model=Trumpet_Model.png
    item Trumpet
|icon=Trumpet.png
|icon_name=Trumpet
<!--GENERAL-->
|category=Instrument
|weight=1
|equipped=One-handed
|condition_max=5
|attachment_type=BigWeapon
<!--DAMAGE-->
|type=Blunt
|skill_type=Long Blunt
|base_speed=1
|min_range=0.61
|max_range=1.15
|min_damage=0.4
|max_damage=0.8
|crit_chance=20
|crit_multiplier=2
|tree_damage=0
|door_damage=5
|push_back=0.3
|knockdown=2
<!--TECHNICAL DETAILS-->
|item_id=Base.Trumpet
}}
A '''trumpet''' is a long blunt melee [[Weapons|weapon]].


==Usage==
===Weapon===
The trumpet can attack up to 2 enemies at a time dealing a maximum of 0.8 damage to enemies (unless a critical hit) from up to 1.15 [[tiles]] away at an attack speed of 1.
===Breaking doors===
It can be used to bash down [[Door|doors]], dealing 5 damage per hit.
==Condition==
The trumpet has a maximum condition of 5. 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 (2 + 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|2}}
==Distribution==
The loot distributions can be found in the table(s) below.
<!--BOT FLAG|Trumpet|41.78.16-->
{{Clear}}
<div class="togglebox theme-red">
    <div>Trumpet distribution
        <span class="mw-customtoggle-togglebox-Trumpet" 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-Trumpet">
    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.65%
    |-
    | bedroom
    | {{ll|crate}}
    | 10.78%
    |-
    | bedroom
    | {{ll|wardrobe}}
    | 1.65%
    |-
    | closet
    | {{ll|crate}}
    | 0.65%
    |-
    | closet
    | {{ll|crate}}
    | 10.78%
    |-
    | closet
    | {{ll|metal_shelves}}
    | 10.78%
    |-
    | daycare
    | {{ll|wardrobe}}
    | 1.65%
    |-
    | garagestorage
    | {{ll|crate}}
    | 0.65%
    |-
    | garagestorage
    | {{ll|crate}}
    | 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.65%
    |-
    | storageunit
    | {{ll|crate}}
    | 10.78%
    |-
    | storageunit
    | {{ll|metal_shelves}}
    | 0.65%
    |-
    | storageunit
    | {{ll|metal_shelves}}
    | 10.78%
    |}
</div>
    </div><div style="clear: both;"></div>
    </div></div><div class="toggle large mw-customtoggle-togglebox-Trumpet" title="{{int:show}}/{{int:hide}}"></div></div>
<!--END BOT FLAG|Trumpet|41.78.16-->
==Code==
{{CodeBox
| {{CodeSnip
  | lang = java
  | line = true
  | start = 484
  | source = items_weapons.txt
  | retrieved = true
  | version = 41.78.16
  | code =
item Trumpet
    {
        DisplayCategory = Instrument,
         MaxRange = 1.15,
         MaxRange = 1.15,
         WeaponSprite = Trumpet,
         WeaponSprite = Trumpet,
Line 41: Line 190:
         BaseSpeed = 1,
         BaseSpeed = 1,
         AttachmentType = BigWeapon,
         AttachmentType = BigWeapon,
        {</nowiki>
    }
}}
}}
 
==See also==
*[[Flute]]
*[[Saxophone]]
*[[Violin]]
 
{{Navbox items|blunt}}
 
[[Category:Instruments]]

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

A trumpet is a long blunt melee weapon.

Usage

Weapon

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

Breaking doors

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

Condition

The trumpet has a maximum condition of 5. 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 (2 + 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 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%)

Distribution

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

Trumpet 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.65%
bedroom crate 10.78%
bedroom wardrobe 1.65%
closet crate 0.65%
closet crate 10.78%
closet metal_shelves 10.78%
daycare wardrobe 1.65%
garagestorage crate 0.65%
garagestorage crate 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.65%
storageunit crate 10.78%
storageunit metal_shelves 0.65%
storageunit metal_shelves 10.78%

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 Trumpet
    {
        DisplayCategory = Instrument,
        MaxRange	=	1.15,
        WeaponSprite	=	Trumpet,
        MinAngle	=	0.67,
        Type	=	Weapon,
        MinimumSwingTime	=	4,
        KnockBackOnNoDeath	=	FALSE,
        SwingAmountBeforeImpact	=	0.02,
        Categories	=	Blunt,
        ConditionLowerChanceOneIn	=	2,
        Weight	=	1,
        SplatNumber	=	1,
        PushBackMod	=	0.3,
        SubCategory	=	Swinging,
        ConditionMax	=	5,
        MaxHitCount	=	2,
        DoorDamage	=	5,
        SwingAnim	=	Bat,
        DisplayName	=	Trumpet,
        MinRange	=	0.61,
        SwingTime	=	4,
        KnockdownMod	=	2,
        SplatBloodOnNoDeath	=	FALSE,
        Icon	=	Trumpet,
        BreakSound  =   TrumpetBreak,
        DoorHitSound = TrumpetHit,
		HitSound = TrumpetHit,
		HitFloorSound = TrumpetHit,
		SwingSound = TrumpetSwing,
        TreeDamage  =   0,
        CriticalChance	=	20,
        CritDmgMultiplier = 2,
        MinDamage	=	0.4,
        MaxDamage	=	0.8,
        BaseSpeed = 1,
        AttachmentType = BigWeapon,
    }

See also