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.
- Seven minigames: Sweet Spot, Dual Rotation, Pin Tumbler, Skill Check, Tension, Ward Trace and the magical Arcane Lock. Each lock can pick its own game, or draw a random one.
- Fifteen difficulty tiers from Trivial to Legendary. Every game scales: narrower zones, faster movement, more pins and targets, shorter pauses, fewer allowed errors, extra hazards at high tiers.
- The character's skill matters in every game. On dnd5e the Sleight of Hand total, thieves' tools proficiency and carried tools lower the tier the player actually plays. Arcane Locks use Arcana and the spellcasting modifier instead. Other systems point the module at any actor data path.
- Keys, tools, attempts, cooldowns, jamming, success and failure macros, chat whispers, Item Piles support, an L hotkey, a playground, and live read-only spectating for the rest of the table.
- Safe by design: players never write to the scene. Results go over the module socket to the active GM client, which does the unlocking, bookkeeping and item changes.
- Every lock window shows a short "How to" text, so players learn each game at the table.
How a player uses it
- Move your token within reach of the lock (10 ft by default).
- 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.
- If you carry the lock's key item, it opens at once (the key can be consumed). Otherwise the minigame opens.
- Read the How-to line, play, and watch the pick-health and progress bars.
- 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
- Tools are listed by item name with their amount, for example
Thieves' Tools=2; Masterwork Picks=4. The best tool carried counts. Tools can be required to attempt a lock, and can break (be consumed) on failure with a configurable chance. - Keys: a character carrying an item named like the lock's key (several names allowed) opens it without a minigame. The key can optionally be consumed.
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
| Setting | What it does |
|---|---|
| Locked doors are pickable | Every 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 Lock | With 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 minigame | Used by locks that do not choose their own (random or a specific game). |
| Default difficulty | Tier 1–15 used by locks that do not set their own. |
| Interaction distance | Maximum distance in scene units from the player's token to the lock. 0 disables the check. |
| Default max attempts per player | 0 is unlimited. Locks can override this. |
| Jam the lock when attempts run out | A jammed lock refuses further picking until the GM resets it or a key is used. |
| Default cooldown after failure | Seconds; 0 is none. Locks can override this. |
| dnd5e skill formula | On: Sleight of Hand + thieves' tools + carried tool, doubled with both; Arcane Locks use Arcana + spellcasting modifier. Off: use the attribute paths below. |
| Skill attribute path | Actor data path of the number that lowers the difficulty on other systems or with the formula off. |
| Arcane skill attribute path | Same, for Arcane Locks. |
| Skill divisor | The tier drops by floor(points / divisor). |
| Lock-picking tools | Item names and amounts, separated by semicolons. The best tool carried counts. |
| Tools required | Players 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 success | Off: a picked door becomes unlocked and the player opens it with a second click. |
| Chat messages | Whisper the outcome of every attempt to the GM and the player. |
| Others can watch attempts | Nobody / the GM only / everyone gets the live spectator window. |
| Playground | Menu button that opens the playground. |
Client settings
| Setting | What it does |
|---|---|
| When someone else picks a lock | Ask me (prompt with a Watch button) / open the window automatically / never. |
| Scene frame rate while a lock window is open | Caps 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)
| Field | What it does |
|---|---|
| Pickable | World default / Yes / No. |
| Minigame | World default, random, or one of the seven games. |
| Difficulty tier | 1–15; the character's skill and tools lower the tier they actually play. |
| Key item | Item 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 failure | Seconds; -1 uses the world setting, 0 is none. |
| Macro on success / failure | Macro 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 & buttons | Locked / 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 VTT | v13 minimum, verified on v14 |
| Game system | Any. dnd5e gets the built-in skill formula; other systems use an attribute path. |
| Optional modules | lib-wrapper, Item Piles, Puzzle Locks |
Changelog
The full history is in CHANGELOG.md. Highlights:
- 1.8.0 — Puzzle Locks doors: open the puzzle, ask the player, or pick the lock.
- 1.7.x — Item locks (collars, manacles, strongboxes), opt-in spectating with a Watch prompt, the window header names the skill that lowered the tier.
- 1.6.0 — Live spectator windows, cached drawing layers and a scene frame-rate cap for smoother play.
- 1.5.0 — Arcane Lock, the seventh minigame.
- 1.4.x — Pin Tumbler pins bind in a hidden random order; tuning after play-testing.
- 1.3.0 — Tier-gated hazards in every game (settling, blinking, fakes, trap arcs, slips, breathing walls, timers).
- 1.2.0 — Harder difficulty curve, high-contrast Dual Rotation spot.
- 1.1.x — Full-circle Sweet Spot, two-phase Dual Rotation, Oblivion-style Pin Tumbler, How-to texts, dnd5e skill formula.
- 1.0.0 — First release with six games, fifteen tiers, keys, tools, attempts, cooldowns, jamming and macros.
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.