Padlock: Difference between revisions

From PZwiki
m (Fixed code formatting!)
(Much needed updates.)
Line 1: Line 1:
{{languages}}
{{languages}}
 
{{Infobox normal
{{Consumables
|display_name=Padlock
|image = Padlock.png
|name_colour=Normal
|weight = 0.2
|name_text_colour=Normal
|image=Padlock.png
|image_width=120px
|weight=0.2
|primary_use=Lock containers
|class_name=Padlock
}}
}}
The '''Padlock''' is an item that can be used to control access to player-crafted crates. It can be found only in "tool store" zones, such as the one in downtown West Point. Padlocks are effectively useless in single-player games, but since a padlocked crate cannot be used or even viewed by a player who does not hold a matching key, it can deter looters on a multi-player server.  However, a locked crate can be bashed to pieces, spilling its contents, just as easily as an unlocked crate can.
The '''Padlock''' is an item that can be used to control access to player-crafted crates.


== How to Use ==
== Usage ==
# Construct a [[Crate|Wooden Crate]]. This requires two [[Plank|Planks]], two [[Nails]], and [[Carpentry Guide|Carpentry]] level 3. Note that the player-crafted Wooden Crate is the ''only'' container that can be padlocked; other crafted containers like shelves cannot be, nor can pre-existing crates like those in warehouses.
=== Locking ===
# Place a Padlock in your personal inventory. Padlocks cannot be used from inside a bag.
Padlocks can be attached to crafted crates. If it is in the player's inventory, the "Put Padlock" context option will appear when selecting a crate. Upon attaching, the player will receive two keys that can be used to open the locked crate.
# Open the context menu for the crate and select "Put Padlock".
# See that the padlock has been replaced in your inventory by two keys. These are weightless and can be stored on your [[Key Ring]] like door keys, although they have a different icon.


While the padlock is in place, the crate's tab in the inventory window will have a lock icon on it. If you hold the correct key, the icon is an open lock, and the container works normally. Otherwise, it is a closed lock, and the container's tab cannot even be viewed.
While the padlock is in place, the crate's tab in the inventory window will have a lock icon on it. If you hold the correct key, the icon is an open lock, and the container works normally. Otherwise, it is a closed lock, and the container's tab cannot even be viewed.


Holding the key also adds the "Remove Padlock" option to the crate's context menu so that you can return it to its original unrestricted state and reuse the padlock. Removing a padlock will remove one of its keys from your inventory, while re-adding an already used padlock will return one key (not two) to you.
Padlocks are effectively useless in single-player games, but since a padlocked crate cannot be used or even viewed by a player who does not hold a matching key, it can deter looters on a multi-player server. A locked crate can be destroyed, spilling its contents, just as easily as an unlocked crate can.


The two keys from each padlock are identical. You can keep them both or share one with a trusted friend.
Pre-existing crates, like those in warehouses, cannot be locked.


As with door keys, you can check which key opens which crate. Just select any individual key on your person (expanding stacks if needed), and the corresponding crate will be highlighted yellow if it is in view. However, as of build 32 it seems that all padlock keys will open all padlocks, at least in single-player games<ref>http://theindiestone.com/forums/index.php/tracker/issue-2095-padlock-keys-are-universal</ref>.
=== Removing Padlock ===
Holding the key also adds the "Remove Padlock" option to the crate's context menu so that you can return it to its original unrestricted state and reuse the padlock. Removing a padlock will remove one of its keys from your inventory, while re-adding an already used padlock will return one key (not two) to you.


=== Padlock Key ===
[[File:KeyPadlock1.png]]
The two keys from each padlock are identical.


Padlock Key [[File:KeyPadlock1.png]]
== Distribution ==
It can be found only in "tool store" zones, such as the one in downtown West Point.


<!--
== Crafting ==
{| class="wikitable sortable" style="text-align:center;"
|-
! Name
! class="unsortable" | Recipe
! class="unsortable" | Description
! Crafting Level
{{RecipeLookup|}}
|}
-->
== Code ==
== Code ==
<nowiki>item Padlock
'''''From newitems.txt (Project Zomboid directory/media/scripts/)'''''
{
{{Retrieved|version=41|incver=50}}
Weight = 0.2,
<pre> item Padlock
Type = Key,
Weight = 0.2,
DisplayName = Padlock,
Type = Key,
Icon = Padlock,
DisplayName = Padlock,
        Padlock =   TRUE,
Icon = Padlock,
}</nowiki>
Padlock = TRUE,
 
MetalValue = 15,
== History ==
Tooltip = Tooltip_Padlock,
</pre>


{| class="wikitable" width="550" style="text-align:center;"
|-
! Alpha || 
|-
| Ver31.9 || -
|}


==See Also==
==See Also==

Revision as of 21:44, 6 July 2021

Padlock
Padlock
General
Category Item
Encumbrance
Heavy Load
0.2
Function Lock containers
Technical details
Base ID Padlock

The Padlock is an item that can be used to control access to player-crafted crates.

Usage

Locking

Padlocks can be attached to crafted crates. If it is in the player's inventory, the "Put Padlock" context option will appear when selecting a crate. Upon attaching, the player will receive two keys that can be used to open the locked crate.

While the padlock is in place, the crate's tab in the inventory window will have a lock icon on it. If you hold the correct key, the icon is an open lock, and the container works normally. Otherwise, it is a closed lock, and the container's tab cannot even be viewed.

Padlocks are effectively useless in single-player games, but since a padlocked crate cannot be used or even viewed by a player who does not hold a matching key, it can deter looters on a multi-player server. A locked crate can be destroyed, spilling its contents, just as easily as an unlocked crate can.

Pre-existing crates, like those in warehouses, cannot be locked.

Removing Padlock

Holding the key also adds the "Remove Padlock" option to the crate's context menu so that you can return it to its original unrestricted state and reuse the padlock. Removing a padlock will remove one of its keys from your inventory, while re-adding an already used padlock will return one key (not two) to you.

Padlock Key

KeyPadlock1.png The two keys from each padlock are identical.

Distribution

It can be found only in "tool store" zones, such as the one in downtown West Point.

Code

From newitems.txt (Project Zomboid directory/media/scripts/) Retrieved: Build 41.50

	item Padlock
		Weight		= 0.2,
		Type		= Key,
		DisplayName	= Padlock,
		Icon		= Padlock,
		Padlock		= TRUE,
		MetalValue	= 15,
		Tooltip		= Tooltip_Padlock,


See Also


Template:Navbox/Tools