Key: Difference between revisions

From PZwiki
(update header & categories & minor)
m (Distribution table update)
(15 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Languages}}
{{Header|Project Zomboid|Items|Equipment|Security}}
{{Header/sandbox2|Project Zomboid|Items|Equipment|Security}}
{{Page version|41.78.16}}
{{Page version|40.40}}
{{reupload|Upload 3D models for other key variants.}}
{{Infobox item
{{Infobox item
|display_name=Key
|name=Key
|model=Key_Model.png
|model=Key_Model.png
|icon=Key1.png
|icon=Key1.png
|icon_name=Key
|icon_name=Key
|model2=Key2_Model.png
|icon2=Key2.png
|icon2=Key2.png
|icon_name2=Key
|icon_name2=Key
|model3=Key3_Model.png
|icon3=Key3.png
|icon3=Key3.png
|icon_name3=Key
|icon_name3=Key
|model4=Key2_Model.png
|icon4=Key4.png
|icon4=Key4.png
|icon_name4=Key
|icon_name4=Key
|model5=Key3_Model.png
|icon5=Key5.png
|icon5=Key5.png
|icon_name5=Key
|icon_name5=Key
Line 20: Line 22:
|function=Lock and unlock doors
|function=Lock and unlock doors
|metal_value=5
|metal_value=5
|item_id=Base.Key1<br>Base.Key2<br>Base.Key3<br>Base.Key4<br>Base.Key5
|item_id=Base.Key1
|item_id2=Base.Key2
|item_id3=Base.Key3
|item_id4=Base.Key4
|item_id5=Base.Key5
}}
}}
{{About|key to open doors|key to open padlocks|Key (Padlock)|a car key|Car Key}}
{{About|key to open doors|key to open padlocks|Key (Padlock)|a car key|Car Key}}
Line 30: Line 36:


==Distribution==
==Distribution==
It can be found on dead zombies.
A key is a common item. Although it is possible to find keys in [[containers]] such as [[Containers#Counters|counters]], [[Containers#Bedroom Storage|dressers]], and [[Containers#Crates|crates]], it is much more common to find them on the [[corpse]]s of [[zombie]]s that were inside or in the vicinity of the building. If a [[door]] exists, it is likely to have a key that corresponds to it.
 
The loot distributions can be found in the table(s) below.
 
<!--BOT FLAG|Key1|41.78.16-->
{{clear}}
<div class="togglebox theme-red">
    <div>Key1 distribution
        <span class="mw-customtoggle-togglebox-Key1" 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-Key1">
    <div class="toggle-content"><div style="display: flex;"><div style="float:left;">
    {| class="wikitable theme-red" style="margin-right:15px; width:95%;"
    |+ {{ll|Containers}}
    ! Building / Room
    ! Container
    ! Rolls
    ! Chance
    |-
    | kitchen
    | {{ll|counter}}
    | 4
    | 0.5
    |}
</div>
    </div><div style="clear:both;"></div>
    </div></div><div class="toggle large mw-customtoggle-togglebox-Key1" title="{{int:show}}/{{int:hide}}"></div></div>
<!--END BOT FLAG|Key1|41.78.16-->
 
<!--BOT FLAG|Key2|41.78.16-->
{{clear}}
<div class="togglebox theme-red">
    <div>Key2 distribution
        <span class="mw-customtoggle-togglebox-Key2" 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-Key2">
    <div class="toggle-content"><div style="display: flex;"><div style="float:left;">
    {| class="wikitable theme-red" style="margin-right:15px; width:95%;"
    |+ {{ll|Containers}}
    ! Building / Room
    ! Container
    ! Rolls
    ! Chance
    |-
    | kitchen
    | {{ll|counter}}
    | 4
    | 0.5
    |}
</div>
    </div><div style="clear:both;"></div>
    </div></div><div class="toggle large mw-customtoggle-togglebox-Key2" title="{{int:show}}/{{int:hide}}"></div></div>
<!--END BOT FLAG|Key2|41.78.16-->


==Code==
==Code==
Line 36: Line 92:
| {{CodeSnip
| {{CodeSnip
   | lang = java
   | lang = java
   | line = false
   | line = true
  | start = 2862
   | source = newitems.txt
   | source = newitems.txt
   | retrieved = true
   | retrieved = true
   | version = 41.50
   | version = 41.78.16
   | code =
   | code =
item Key1
item Key1
{
{
    DisplayCategory     = Security,
    DisplayCategory = Security,
    Weight             = 0,
Weight = 0,
    Type               = Key,
Type = Key,
    DisplayName         = Key,
DisplayName = Key,
    Icon               = Key1,
Icon = Key1,
    MetalValue         = 5,
MetalValue = 5,
    WorldStaticModel   = Key,
WorldStaticModel = Key,
}
}
  }}
}}
}}
}}


Line 59: Line 116:
*[[Car Key]]
*[[Car Key]]


{{Navbox equipment}}
{{Navbox items|household_equipment}}

Revision as of 15:50, 24 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]
Key
Key Model.png
Key2 Model.png
Key3 Model.png
Key2 Model.png
Key3 Model.png
General
Category
Security
Encumbrance
Moodle Icon HeavyLoad.png
0.0
Function
Lock and unlock doors
Technical
Item ID
Base.Key1
Base.Key2
Base.Key3
Base.Key4
Base.Key5
PlushSpiffo.pngThis article is about key to open doors. For key to open padlocks, see Key (Padlock). For a car key, see Car Key.

A key is used to lock and unlock doors in the game.

Usage

Locking and unlocking

Keys are connected to garage doors and regular door around the house, hovering over the key in your inventory will highlight the doors it is connected to in yellow. If it is in the player's inventory, the "Unlock Door" context option will appear when selecting a door.

Distribution

A key is a common item. Although it is possible to find keys in containers such as counters, dressers, and crates, it is much more common to find them on the corpses of zombies that were inside or in the vicinity of the building. If a door exists, it is likely to have a key that corresponds to it.

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

Key1 distribution Show / Hide
Containers
Building / Room Container Rolls Chance
kitchen counter 4 0.5
Key2 distribution Show / Hide
Containers
Building / Room Container Rolls Chance
kitchen counter 4 0.5

Code

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

Source: ProjectZomboid\media\scripts\newitems.txt

Retrieved: Build 41.78.16
item Key1
	{
	    DisplayCategory = Security,
		Weight	=	0,
		Type	=	Key,
		DisplayName	=	Key,
		Icon	=	Key1,
		MetalValue = 5,
		WorldStaticModel = Key,
	}

See also