Lockpick Minigames

Locked doors, containers and items in Foundry VTT become real lock-picking minigames. Seven games, fifteen difficulty tiers, keys, tools, skill-scaled difficulty and live spectating.

Version 1.7.1 Foundry v13 – v14 System agnostic, tuned for dnd5e License MIT Free and open source

Disclaimer and credits

I own none of this code

I claim no ownership of this code. I only steered the project: what the games should feel like, how hard they should be, what a GM needs. I release the whole module as free, open-source software under the MIT License, so anyone can use it, study it, change it and redistribute it.

No code, art, sound or other asset from any other module or author has been copied into this project. There is no warranty of any kind; use it at your own risk and keep backups of your world.

Credit for the original idea: Reslin

The idea of turning locked doors into playable lock-picking minigames inside Foundry VTT is not mine. It comes from the Lock Picking module by Reslin (foundryvtt.com/packages/lock-picking). This module is an independent take on that idea, built from scratch for my own table. It contains none of Reslin's code or assets, and it is not affiliated with or endorsed by Reslin.

If you like the concept, please support the person who came up with it: patreon.com/cw/Reslinfvtt. Reslin's original is the polished, supported module; this one is a free community alternative.

What it does

Normally a locked door in Foundry is a dead end until the GM unlocks it. With Lockpick Minigames a player clicks the locked door (or a locked container token, or a locked item such as a collar) while standing within reach, and a lock window opens. They play a short skill-based minigame. Win, and the GM's client unlocks or opens the door, container or item. Fail, and the attempt is recorded, a cooldown may start, their tools may break, and the lock may eventually jam.

How a player uses it

  1. Move your token within reach of the lock (10 ft by default).
  2. Click the locked door, double-click the locked container token, press the Pick lock button on a locked item sheet, or just press L to pick the nearest lock in reach.
  3. If you carry the lock's key item, it opens at once (the key can be consumed). Otherwise the minigame opens.
  4. Read the How-to line, play, and watch the pick-health and progress bars.
  5. The outcome is whispered to you and the GM. On success the door unlocks (or opens), the container opens, or the item is unlocked, unequipped or removed, as the GM configured.

The seven minigames

Sweet Spot Lock

The pick follows the mouse through a full circle. Hold the left button to turn the cylinder: on the sweet spot it turns all the way, elsewhere it stops part-way and the pick strains, reddens and breaks. One pick.

Tiers 1–2 glow on the spot. From tier 7 the mechanism settles after a strained push and the spot shifts.

Dual Rotation Lock

Two phases. First sweep the cursor over the dial: a blue glow grows brighter near a hidden spot; hold still on it. Then the spot wanders: hold Space (or the left button) and keep the cursor on it while the rotation fills.

From tier 9 the spot blinks out briefly while you track it.

Pin Tumbler Lock

Oblivion-style pins with hidden notch heights that bind in a hidden random order. Push a pin to test it: only the binding pin pauses at its notch, the rest spring back and turn dull. Click the binder during its pause to set it. A pin's first push per round is free; re-pushing a tested pin costs pick health.

Low tiers glow the binder. Fake pauses from tier 7. Wrong-time clicks drop the last set pin from tier 6 and every set pin from tier 11.

Skill Check Lock

A needle sweeps the ring while the highlighted arc drifts the other way. Click or press Space inside the arc: yellow counts one, the thin blue caps count two. A red trap arc makes a miss cost half again as much.

From tier 8 the needle "breathes" (speeds up and slows down).

Tension Lock

Click the dial to start. Hold Space, the right mouse button, or the left button on the gauge to build tension; keep the marker in the moving green band and left-click the glowing targets before their ring runs out. The red cap burns the pick.

From tier 7 the band breathes. From tier 10 the pick slips and tension drops suddenly.

Ward Trace Lock

Click S and trace the keyway to E without touching the walls. Ten pattern families: zigzag, wave, stairs, switchbacks, hairpins, orbits, petals, spirals, grid walks and grid mazes with safe dead ends.

Higher tiers are narrower, longer and fogged except near the cursor; from tier 9 the walls breathe and a timer runs.

Arcane Lock

A magical ward. Runes orbit a sigil and flare in a sequence that grows each round; click them back in order while they keep moving. Wrong runes damage the pick and replay the sequence; the mana ring drains while you cast and ends the attempt when empty.

Never part of the random pick: choose it on a lock. Tools do not apply; Arcana plus the spellcasting modifier lower the tier. High tiers add runes and rounds, spin and flip the orbit, and shuffle rune positions. A failed Arcane Lock can alert the caster who placed it through the failure macro.

Difficulty and skill

Every lock has a difficulty tier from 1 (Trivial) to 15 (Legendary). The tier the player actually plays is the lock's tier minus a reduction earned from their character, so a master thief breezes through a tier 8 lock that would stump a paladin. The reduction applies to all seven games.

dnd5e formula (default)

points = Sleight of Hand total + thieves' tools proficiency bonus + flat amount of the best carried tool, doubled when the character is proficient in both Sleight of Hand and thieves' tools. The tier drops by floor(points / divisor) (divisor 2 by default). An unproficient character still benefits from carrying tools.

Arcane Locks use Arcana total + spellcasting ability modifier, doubled when proficient in Arcana and a spellcaster, and ignore tools.

Other systems

Switch the dnd5e formula off and give the module any actor data path, for example system.abilities.dex.mod or system.skills.slt.total. Carried tools from the tools list then lower the tier directly. Arcane Locks have their own path setting.

Tools and keys

GM features

Door locks

Lock a door as usual (right-click its control). With Locked doors are pickable on, every locked door uses the world defaults. Open the wall's config sheet and press Lock settings… to give a door its own minigame, tier, key item, attempt limit, cooldown and macros. GMs hold Ctrl and click a locked door to try its minigame for real.

Puzzle Locks doors

With theripper93's Puzzle Locks installed, a door that carries an unsolved puzzle follows the world setting Doors with a Puzzle Lock: open the puzzle only (default), ask the player whether to solve the puzzle or pick the lock, or pick the lock and ignore the puzzle. A solved puzzle hands the door back to normal picking.

Container locks

Select a token and press the lock button in its HUD, set Pickable to Yes and press Lock. Locked Item Piles containers open their inventory automatically after a successful pick, and Lock / Unlock also lock or unlock the pile.

Item locks

Open an item's sheet (a collar, manacles, a strongbox in a pack) and press the lock button in its header. The wearer, or anyone within reach of the wearer's token, can pick it. On success the item is marked unlocked, unequipped, or removed from the inventory, and the success macro runs.

Attempts, cooldowns, jamming

Per-player attempt limits and failure cooldowns, set globally or per lock. When attempts run out the lock can jam until the GM resets it (or a key is used). The lock settings window shows state, failed attempts, and Lock / Unlock / Reset / Test buttons.

Macros

Name a macro to run on success or failure. It receives actor, token, lockDocument, user, success, via and jammed, so a failed pick can trigger an alarm, a trap, or alert the wizard who cast the Arcane Lock.

Spectators

While a player picks a lock, everyone else (or only the GM, or nobody) gets a small prompt at the top of the screen: "X is picking Y — Watch". Pressing Watch opens a live read-only window of the same game, joining at the current state. Each client can choose prompt, open automatically, or never. The window closes itself two seconds after the result.

Playground

Module Settings → Lockpick Minigames → Open the playground runs any game at any tier with no lock attached, for learning the games or tuning difficulty.

Chat and smoothness

Every outcome is whispered to the GM and the player. While a lock window is open the client caps Foundry's scene canvas at 20 FPS (per client, 0 to disable) so the minigame gets the frames on heavy scenes.

An active GM client must be connected while players pick locks. Optional modules: lib-wrapper (safer wrapping of door and token click handlers next to other modules) and Item Piles (locked container piles open after a successful pick).

Settings reference

World settings

SettingWhat it does
Locked doors are pickableEvery locked door can be picked with the world defaults unless its own lock settings say otherwise. Tokens and items must always be configured.
Doors with a Puzzle LockWith theripper93's Puzzle Locks installed: open the puzzle only (default), ask the player whether to solve the puzzle or pick the lock, or pick the lock and ignore the puzzle. Solved puzzles fall back to normal picking.
Default minigameUsed by locks that do not choose their own (random or a specific game).
Default difficultyTier 1–15 used by locks that do not set their own.
Interaction distanceMaximum distance in scene units from the player's token to the lock. 0 disables the check.
Default max attempts per player0 is unlimited. Locks can override this.
Jam the lock when attempts run outA jammed lock refuses further picking until the GM resets it or a key is used.
Default cooldown after failureSeconds; 0 is none. Locks can override this.
dnd5e skill formulaOn: Sleight of Hand + thieves' tools + carried tool, doubled with both; Arcane Locks use Arcana + spellcasting modifier. Off: use the attribute paths below.
Skill attribute pathActor data path of the number that lowers the difficulty on other systems or with the formula off.
Arcane skill attribute pathSame, for Arcane Locks.
Skill divisorThe tier drops by floor(points / divisor).
Lock-picking toolsItem names and amounts, separated by semicolons. The best tool carried counts.
Tools requiredPlayers without one of the listed tools cannot attempt a lock.
Tool break chance on failure (%)Chance that one tool item is consumed when an attempt fails.
Open doors on successOff: a picked door becomes unlocked and the player opens it with a second click.
Chat messagesWhisper the outcome of every attempt to the GM and the player.
Others can watch attemptsNobody / the GM only / everyone gets the live spectator window.
PlaygroundMenu button that opens the playground.

Client settings

SettingWhat it does
When someone else picks a lockAsk me (prompt with a Watch button) / open the window automatically / never.
Scene frame rate while a lock window is openCaps Foundry's own canvas at this many FPS while you pick, watch or play in the playground. 0 leaves the scene alone.

Per-lock settings (door, token or item)

FieldWhat it does
PickableWorld default / Yes / No.
MinigameWorld default, random, or one of the seven games.
Difficulty tier1–15; the character's skill and tools lower the tier they actually play.
Key itemItem name(s); a carrier opens the lock without a minigame. Optional Consume the key.
Max attempts per player-1 uses the world setting, 0 is unlimited.
Cooldown after failureSeconds; -1 uses the world setting, 0 is none.
Macro on success / failureMacro names, run by the GM client with the lock context.
When unlocked (item)Just mark it unlocked / unequip it / remove it from the inventory.
State & buttonsLocked / Unlocked / Jammed, failed attempts, Lock, Unlock, Reset attempts, Test.

Keybinding

L — pick the nearest lock in reach (doors, container tokens, and locked items on tokens in reach). Rebindable in Configure Controls.

API

const api = game.modules.get("lockpick-minigames").api;
api.attempt(doc);     // start an attempt on a WallDocument, TokenDocument or Item
api.configure(doc);   // open the lock settings window
api.lock(doc);
api.unlock(doc);
api.resetState(doc);  // clear attempts, cooldowns and jam
api.getLock(doc);     // effective configuration
api.demo();           // playground

Lock configuration lives in flags.lockpick-minigames.lock, attempt state in flags.lockpick-minigames.state, and a token's or item's locked state in flags.lockpick-minigames.locked. Lock requests resolve documents by UUID.

Install

In Foundry's setup screen open Add-on Modules → Install Module and paste this manifest URL:

Or download module.zip from the releases page and upload it to The Forge or unzip it into Data/modules. Then enable Lockpick Minigames in the world's Manage Modules. To install a specific older version use https://github.com/teshaman/lockpick-minigames/releases/download/<version>/module.json.

Compatibility
Foundry VTTv13 minimum, verified on v14
Game systemAny. dnd5e gets the built-in skill formula; other systems use an attribute path.
Optional moduleslib-wrapper, Item Piles, Puzzle Locks

Changelog

The full history is in CHANGELOG.md. Highlights:

License

Lockpick Minigames is released under the MIT License. You may use, copy, modify, merge, publish, distribute, sublicense and sell copies, provided the license notice stays with it. The software is provided "as is", without warranty of any kind.

See the disclaimer above: I claim no ownership of the code. The idea belongs to Reslin, whose Lock Picking module you can support at patreon.com/cw/Reslinfvtt.