======Lock======
//example image tbd//
=====Description=====
A lock either keeps a [[patterns:container|container]] from being opened to access the [[patterns:item|items]] inside or creates a [[Patterns:blockade|blockade]] by preventing a [[patterns:portal|portal]] from being opened.
A lock can either require that a [[patterns:key|key]] be found, that a [[patterns:skill action|skill action]] be taken to open it, that some other sort of action be taken, such as getting an [[patterns:NPC|NPC]] to open it, or multiple of these possibilities. Once a requirement is satisfied, the player may open the [[patterns:container|container]] or pass through the [[patterns:portal|portal]].
=====Variables and Affordances=====
* **Unlock Criteria**: ways the lock can be opened. This might be by finding a [[patterns:key]], which might be acquired in many different ways. Or it might involve a [[patterns:skill action|skill check]], which might be any number of different skills with different difficulty ratings. Or there may be some other, less common, method for unlocking the lock.
=====Examples=====
* [[games:fallout3|Fallout 33]]. In the Museum of Technology there is a locked safe which can be opened in one of three ways:
* use lockpicking to crack the safe (//skill action//)
* use hacking to crack the computer and open the safe (//skill action//)
* find the password to the computer (//other method: exploration//)
* [[games:bg2|Baldur's Gate II Shadows of Amn]]. In Irenicus's Dungeon, there are several portals which cannot be accessed until the player finds the proper [[patterns:key]] for them, yet there are several containers which can be opened with a successful lockpicking [[patterns:skill action|skill check]].
==== In Worked Examples ====
* [[examples:big_trouble_in_big_town|Big Trouble In Big Town]]
* [[examples:the_professor|Dossier: The Professor]]
=====Related Patterns=====
* [[patterns:key|Key]]
* [[patterns:container|Container]]
* [[patterns:item|Item]]
* [[Patterns:blockade|Blockade]]
* [[patterns:portal|Portal]]
=====Quest-Level Relationships=====
* [[patterns:quest tied item|Quest Tied Item]]
* [[patterns:skill action|Skill Action]]
{{tag>level:PhysicalElement games:bg2 games:fallout3}}