Key: Difference between revisions

From PZwiki
m (Move alt images to infobox, remove gallery since packlock model belons to Key (Padlock))
m (Distribution table update)
(27 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{Languages}}{{Header|The Game World|Items|Tools|type=Tool|version=Version 40|incver=40}}{{Infobox normal
{{Header|Project Zomboid|Items|Equipment|Security}}
|display_name=Key (Door)
{{Page version|41.78.16}}
|name_colour=Normal
{{Infobox item
|name_text_colour=Normal
|name=Key
|image=Key_Model.png
|model=Key_Model.png
|image_width=120px
|icon=Key1.png
|alternate_image=Key1.png
|icon_name=Key
|alternate_name=Key
|model2=Key2_Model.png
|alternate_image2=Key2.png
|icon2=Key2.png
|alternate_name2=Key
|icon_name2=Key
|alternate_image3=Key3.png
|model3=Key3_Model.png
|alternate_name3=Key
|icon3=Key3.png
|alternate_image4=Key4.png
|icon_name3=Key
|alternate_name4=Key
|model4=Key2_Model.png
|alternate_image5=Key5.png
|icon4=Key4.png
|alternate_name5=Key
|icon_name4=Key
|model5=Key3_Model.png
|icon5=Key5.png
|icon_name5=Key
|category=Security
|weight=0.0
|weight=0.0
|primary_use=Lock doors and unlock doors
|function=Lock and unlock doors
|class_name=Base.Key
|metal_value=5
|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}}
A '''key''' is used to lock and unlock [[doors]] in the game.


==Usage==
==Usage==
===Locking and unlocking===
===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.
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==
==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==
'''''From newitems.txt (Project Zomboid directory/media/scripts/)'''''
{{CodeBox
{{Retrieved|version=41|incver=50}}
| {{CodeSnip
<pre>
  | lang = java
item Key1
  | line = true
        DisplayCategory = Security,
  | start = 2862
  | source = newitems.txt
  | retrieved = true
  | version = 41.78.16
  | code =
item Key1
{
    DisplayCategory = Security,
Weight = 0,
Weight = 0,
Type = Key,
Type = Key,
Line 40: Line 107:
MetalValue = 5,
MetalValue = 5,
WorldStaticModel = Key,
WorldStaticModel = Key,
</pre>
}
}}
}}


==See also==
==See also==
Line 47: 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