Katana: Difference between revisions

From PZwiki
(→‎Code: updated katana code)
m (Remove duplicate section)
 
(40 intermediate revisions by 11 users not shown)
Line 1: Line 1:
{{languages}}{{testing|build=[[Build 41]]}}
{{Header|Project Zomboid|Items|Weapons|Melee weapons|Long blade weapons}}
{{header|The Game World|Items|Weapons|Melee Weapons|type=Weapon|version=Version 41|incver=53}}{{Infobox weapon
{{Page version|41.78.16}}
|display_name=Katana
{{Infobox item
|name_colour=Weapon
|name=Katana
|name_text_colour=Weapon
|model=Katana_Model.png
|image=Katana_Model.png
|icon=Katana.png
|image_width=200px
|icon_name=Katana
|alternate_image=Katana.png
|alternate_name=Katana
|alternate_link=
|category=Weapon
|category=Weapon
|weight=2
|weight=2
|weapon_type=LongBlade
|primary_use=Weapon
|primary_use=Weapon
|equipped=Two-handed
|equipped=Two-handed
|condition_max=10
|condition_max=10
|type=Blade
|skill_type=LongBlade
|swing_time=3
<!--DAMAGE-->
|type=Slash
|base_speed=1
|min_range=0.61
|min_range=0.61
|max_range=1.4
|max_range=1.4
Line 24: Line 22:
|door_damage=8
|door_damage=8
|push_back=0.5
|push_back=0.5
|class_name=Base.Katana
<!--TECHNICAL-->
|item_id=Base.Katana
}}
}}
A '''katana''' is a two-handed long blade weapon. The katana can alternatively be used as a one-handed weapon at the cost of reduced impact. The weapon can be attached to the character's back for quick access and weight reduction.
A '''katana''' is a two-handed long blade [[Weapons|weapon]].


==Usage==
==Usage==
{{pros-cons
{{Pros-cons
<!-- #PROS# - below this line -->
<!-- #PROS# - below this line -->
|pros1 = Highest damage of any weapon in the game.
|pros1 = Highest damage of any weapon in the game.
|pros2 = Good durability.
|pros2 = Good durability and range.
<!-- #CONS# - below this line -->
<!-- #CONS# - below this line -->
|cons1 = Hard to level up long blade skill due to the katana and [[Machete]] being the only long blade weapons.
|cons1 = Hard to level up long blade skill (The katana and [[machete]] are the only long blade weapons).
|cons2 = Cannot be repaired, ideal to make it last longer by levelling up your maintenance skill before using it.
|cons2 = Cannot be repaired.
|cons3 = Very difficult to find.
|cons3 = Very difficult to find.
}}
}}
===Multi-hit===
In modes with multi-hit enabled, a katana can hit a maximum of three targets in one swing.


===Breaking Doors===
==Weapon==
The katana is quite ineffective at breaking down [[Door|doors]], dealing only 8 damage. For comparison, an [[Axe#Breaking Doors|axe]] deals 35.
The katana has the highest damage output of any weapon in the game, surpassing all melee weapons and firearms. It can frequently kill zombies in just one hit, and has a good range and attack speed. However, katanas are very rare if not ''the'' rarest making it difficult to level up the long blade skill.


===Chopping Trees===
It can hit up to 3 enemies at a time (with multi-hit enabled), dealing 8 damage to enemies (unless a critical hit) from up to 1.4 tiles away at an attack speed of 1. Although equipped in two hands, it can be used as a one-handed weapon at the cost of reduced impact.
The katana is very ineffective at chopping down trees, dealing 1 damage. For comparison, an [[Axe#Chopping Trees|axe]] deals 35.
 
The weapon can be attached to the character's back for quick access and encumbrance reduction.
 
===Breaking doors===
The katana is quite ineffective at breaking down [[door]]s, dealing only 8 damage. For comparison, an [[Axe#Breaking doors|axe]] deals 35.
 
===Chopping trees===
The katana is very ineffective at chopping down trees, as it only deals 1 damage. For comparison, an [[Axe#Chopping trees|axe]] deals 35.
 
==Condition==
The katanas has a maximum condition of 10. 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 (15 + 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 blade]] skills.
{{Durability weapon|15}}


==Distribution==
==Distribution==
The loot distributions can be found in the table(s) below.
<!--BOT FLAG|Katana|41.78.16-->
{{Clear}}
<div class="togglebox theme-red">
    <div>Katana distribution
        <span class="mw-customtoggle-togglebox-Katana" 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-Katana">
    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
    |-
    | SafehouseLoot
    | {{ll|counter}}
    | 2.81%
    |-
    | SafehouseLoot
    | {{ll|crate}}
    | 2.81%
    |-
    | SafehouseLoot
    | {{ll|metal_shelves}}
    | 2.81%
    |-
    | SafehouseLoot
    | {{ll|wardrobe}}
    | 2.81%
    |-
    | SurvivorCache1
    | {{ll|counter}}
    | 2.81%
    |-
    | SurvivorCache2
    | {{ll|counter}}
    | 2.81%
    |-
    | closet
    | {{ll|crate}}
    | 1.63%
    |-
    | garagestorage
    | {{ll|crate}}
    | 1.63%
    |-
    | livingroom
    | {{ll|wardrobe}}
    | 1.63%
    |-
    | pawnshop
    | {{ll|displaycase}}
    | 1.87%
    |-
    | storageunit
    | {{ll|crate}}
    | 1.63%
    |}
</div>
<div id="zombies" style="flex-basis:30%">
    {| class="wikitable theme-red" style="margin-right: 15px; width: 95%;"
    |+ {{ll|Zombies}}
    ! Outfit
    ! Days survived
    ! Chance
    |-
    | All
    | 60
    | 1
    |}
</div>
    </div><div style="clear: both;"></div>
    </div></div><div class="toggle large mw-customtoggle-togglebox-Katana" title="{{int:show}}/{{int:hide}}"></div></div>
<!--END BOT FLAG|Katana|41.78.16-->
===Buildings===
===Buildings===
The katana can be found in residential buildings in furniture such as [[Containers#Bedrooom Storage|wardrobes and drawers]]. Another possible place are gun shops such as the one located in [[West Point, KY]].
*The best place to find a katana is in a boarded up survivor house.
===Zombies===
*Very rarely, the katana can be found in residential buildings in furniture such as [[Containers#Bedrooom Storage|wardrobes and drawers]].
After 60 days have passed, The katana can very rarely be found impaled in the stomach of a [[zombie]].
*Katanas can also be found in gun shops such as the one located in [[West Point]], and pawn shops, which can be found in [[Louisville]].
 
==Gallery==
==Gallery==
<gallery>
<gallery>
File:HoldingKatana.jpg|Survivor wielding the katana.
HoldingKatana.jpg|Survivor wielding the katana
</gallery>
</gallery>
==Code==
==Code==
'''''From items_weapons.txt (Project Zomboid directory/media/scripts/)'''''
{{CodeBox
 
| {{CodeSnip
{{Retrieved|version=41|incver=56}}
  | lang = java
<pre>    item Katana
  | line = true
  | start = 1501
  | source = items_weapons.txt
  | retrieved = true
  | version = 41.78.16
  | code =
item Katana
     {
     {
        DisplayCategory = Weapon,
         MaxRange = 1.4,
         MaxRange = 1.4,
         WeaponSprite = Katana,
         WeaponSprite = Katana,
Line 105: Line 201:
         WeaponLength = 0.4,
         WeaponLength = 0.4,
         AttachmentType = BigBlade,
         AttachmentType = BigBlade,
     }</pre>
     }
}}
}}


==See also==
==See also==
*[[Machete]]
*[[Machete]]


{{Navbox_weapons}}
{{Navbox items|blade}}

Latest revision as of 15:24, 1 May 2024

UI Tick.png
This page has been revised for the current stable version (41.78.16).
Help by adding any missing content. [edit]
Katana
Katana Model.png
General
Category
Weapon
Encumbrance
Moodle Icon HeavyLoad.png
2
Equipped
Two-handed
Function
Weapon
Skill
Properties
Max condition
10
Performance
Damage
8–8
Door damage
8
Tree damage
1
Range
0.61–1.4
Attack speed
1
Knockback
0.5
Technical
Item ID
Base.Katana

A katana is a two-handed long blade weapon.

Usage

Pros Cons
  • Highest damage of any weapon in the game.
  • Good durability and range.
  • Hard to level up long blade skill (The katana and machete are the only long blade weapons).
  • Cannot be repaired.
  • Very difficult to find.

Weapon

The katana has the highest damage output of any weapon in the game, surpassing all melee weapons and firearms. It can frequently kill zombies in just one hit, and has a good range and attack speed. However, katanas are very rare if not the rarest making it difficult to level up the long blade skill.

It can hit up to 3 enemies at a time (with multi-hit enabled), dealing 8 damage to enemies (unless a critical hit) from up to 1.4 tiles away at an attack speed of 1. Although equipped in two hands, it can be used as a one-handed weapon at the cost of reduced impact.

The weapon can be attached to the character's back for quick access and encumbrance reduction.

Breaking doors

The katana is quite ineffective at breaking down doors, dealing only 8 damage. For comparison, an axe deals 35.

Chopping trees

The katana is very ineffective at chopping down trees, as it only deals 1 damage. For comparison, an axe deals 35.

Condition

The katanas 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 (15 + 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 blade skills.

For how this is calculated, see: Condition
Maintenance skill Weapon skill Condition lower chance
0 0 1/15 (7%)
0 4 1/17 (6%)
0 8 1/19 (5%)
4 0 1/19 (5%)
8 0 1/23 (4%)
4 4 1/21 (5%)
4 8 1/23 (4%)
8 8 1/27 (4%)
10 10 1/29 (3%)

Distribution

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

Katana 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
SafehouseLoot counter 2.81%
SafehouseLoot crate 2.81%
SafehouseLoot metal_shelves 2.81%
SafehouseLoot wardrobe 2.81%
SurvivorCache1 counter 2.81%
SurvivorCache2 counter 2.81%
closet crate 1.63%
garagestorage crate 1.63%
livingroom wardrobe 1.63%
pawnshop displaycase 1.87%
storageunit crate 1.63%
Zombie
Outfit Days survived Chance
All 60 1

Buildings

  • The best place to find a katana is in a boarded up survivor house.
  • Very rarely, the katana can be found in residential buildings in furniture such as wardrobes and drawers.
  • Katanas can also be found in gun shops such as the one located in West Point, and pawn shops, which can be found in Louisville.

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 Katana
    {
        DisplayCategory = Weapon,
        MaxRange	=	1.4,
        WeaponSprite	=	Katana,
        MinAngle	=	0.8,
        Type	=	Weapon,
        MinimumSwingTime	=	3,
        HitFloorSound	=	KatanaHit,
		ImpactSound	=	KatanaHit,
        DoorHitSound = KatanaHit,
		HitSound	=	KatanaHit,
		SwingSound = KatanaSwing,
        KnockBackOnNoDeath = TRUE,
        SwingAmountBeforeImpact	=	0.02,
        Categories	=	LongBlade,
        Weight	=	2,
        ConditionLowerChanceOneIn	=	15,
        PushBackMod	=	0.5,
        SubCategory	=	Swinging,
        ConditionMax	=	10,
        MaxHitCount	=	3,
        DoorDamage	=	8,
        SwingAnim	=	Bat,
        CriticalChance	=	35,
        CritDmgMultiplier = 6,
        DisplayName	=	Katana,
        MinRange	=	0.61,
        SwingTime	=	3,
        HitAngleMod	=	-30,
        KnockdownMod	=	0,
        Icon	=	Katana,
        RunAnim	=	Run_Weapon2,
        BreakSound  =   KatanaBreak,
        TreeDamage  =   1,
        CriticalChance	=	30,
        CritDmgMultiplier = 10,
        MinDamage	=	8,
        MaxDamage	=	8,
        BaseSpeed = 1,
        WeaponLength = 0.3,
        DamageCategory = Slash,
        DamageMakeHole = TRUE,
        TwoHandWeapon = TRUE,
        WeaponLength = 0.4,
        AttachmentType = BigBlade,
    }

See also