# Lockpicking Game System – Configurable & Modular

Documentation for the ["Lockpicking Game System – Configurable &amp; Modular" product on FAB](https://www.fab.com/listings/5603ee62-90c5-4913-8b16-20790edfc26d)

[YouTube Preview](https://youtu.be/WDcaGowddf8)

# Setup/Prerequisites

- In order for the minigame to work, you need to activate Substrate Materials from Project Settings

[![image.png](https://docs.ccragdollgames.com/uploads/images/gallery/2025-06/scaled-1680-/image.png)](https://docs.ccragdollgames.com/uploads/images/gallery/2025-06/image.png)

# Configuration

<p class="callout info">**/All/Game/LockpickMinigame/Structs**</p>

### S\_Lock\_Config

[![image.png](https://docs.ccragdollgames.com/uploads/images/gallery/2025-03/scaled-1680-/RMhimage.png)](https://docs.ccragdollgames.com/uploads/images/gallery/2025-03/RMhimage.png)

#### Parameters:

- **LockTension** - The tension to be applied to the lock. How fast/easy the lock returns to initial position.
- **LockTensionMultiplier** - Multiplier used for the tension to be applied when sweet spot has just been lost. The tension will be higher if player was on sweet spot but it's no longer on it(has lost it).
- **TensionWrenchTension** - Same as the LockTension but for the TensionWrench. How fast/easy the tension wrench returns to initial position.
- **SweetSpotRange** - Bounds for the sweet spot. The sweet spot value is randomly determined at construction then the SweetSpotRange is used to check how big the sweet spot will be. It will take a random value between SweetSpotRange.X and SweetSpotRange.Y. i.e. if sweet spot will be 30(the pick degrees) and the sweet spot range is 5 and 10, the actual sweet spot will be anywhere between 20 and 40. If value from sweet spot range gets to be 8, then the sweet spot will be 26-34.
- **PickStrikeDuration** - How long the player has to force the current pick, in order to add a pick strike(for breaking it). i.e. how long the player has to stay outside the sweet spot while it's pushing the tension wrench.
- **MaxPickStrikes** - How many pick strikes before the pick actually breaks. This works together with the PickStrikeDuration.

### S\_Lock\_Meshes

[![image.png](https://docs.ccragdollgames.com/uploads/images/gallery/2025-03/scaled-1680-/s8Uimage.png)](https://docs.ccragdollgames.com/uploads/images/gallery/2025-03/s8Uimage.png)

#### Parameters:

- **Housing** - The static mesh for the lock housing(shell) - without the lock mechanism(where the key/pick enters)
- **Lock** - The static mesh for the lock mechanism - this needs to be different in order to rotate it independently
- **Lockpick** - The static mesh for the actual pick
- **TensionWrench** - The static mesh for the tension wrench

#### Notes:

- For the Meshes configuration the actual pivot point should be in proper positions. The product also has an Example that should be used as reference.

# Interfaces

<p class="callout info">**/All/Game/LockpickMinigame/Interfaces**</p>

### BPI\_Lockpickable

#### CanBeLockpicked

[![image.png](https://docs.ccragdollgames.com/uploads/images/gallery/2025-03/scaled-1680-/Cy8image.png)](https://docs.ccragdollgames.com/uploads/images/gallery/2025-03/Cy8image.png)

- Function which handles the condition about the object being lockpick able. For e.g. if the object is already lockpicked, this condition should return false.
- It can be used with other logic such as the lock being stuck, so lockpicking can't be started.

#### OnLockpickStarted

[![image.png](https://docs.ccragdollgames.com/uploads/images/gallery/2025-03/scaled-1680-/fbvimage.png)](https://docs.ccragdollgames.com/uploads/images/gallery/2025-03/fbvimage.png)

- Event to be called when the lockpicking starts.
- E.g. can be called when the BP\_Lockpick\_Minigame &amp; W\_Lockpick\_Minigame are spawned and can be used to hide the "Interact" prompt from behind the lockpick widget

#### OnLockpickSuccessful

[![image.png](https://docs.ccragdollgames.com/uploads/images/gallery/2025-03/scaled-1680-/8vHimage.png)](https://docs.ccragdollgames.com/uploads/images/gallery/2025-03/8vHimage.png)

- Event to be called when the lockpick is successful
- Called by the BP\_Lockpick\_Minigame

#### OnLockpickFailed

[![image.png](https://docs.ccragdollgames.com/uploads/images/gallery/2025-03/scaled-1680-/jRAimage.png)](https://docs.ccragdollgames.com/uploads/images/gallery/2025-03/jRAimage.png)

- Event to be called when the lockpick fails for given reason
- Called by the BP\_Lockpick\_Minigame when there are no more lockpicks available

#### OnLockpickClosed

[![image.png](https://docs.ccragdollgames.com/uploads/images/gallery/2025-03/scaled-1680-/LQyimage.png)](https://docs.ccragdollgames.com/uploads/images/gallery/2025-03/LQyimage.png)

- Event to be called when the lockpick minigame is closed by player - without it being successful or failed
- Called by the BP\_Lockpick\_Minigame on "CloseMinigame" event

#### GetLockConfig

[![image.png](https://docs.ccragdollgames.com/uploads/images/gallery/2025-03/scaled-1680-/VKsimage.png)](https://docs.ccragdollgames.com/uploads/images/gallery/2025-03/VKsimage.png)

- Event that can be used to retrieve the current object lock configuration

### BPI\_Lockpicker

#### AddLockpickable

[![image.png](https://docs.ccragdollgames.com/uploads/images/gallery/2025-03/scaled-1680-/jcXimage.png)](https://docs.ccragdollgames.com/uploads/images/gallery/2025-03/jcXimage.png)

- Event that can be used to provide information to the lockpicker that there's a lockpick able object nearby
- Can be used for interaction

#### RemoveLockpickable

[![image.png](https://docs.ccragdollgames.com/uploads/images/gallery/2025-03/scaled-1680-/47fimage.png)](https://docs.ccragdollgames.com/uploads/images/gallery/2025-03/47fimage.png)

- Counterpart event for the "AddLockpickable" event

#### IsLockpickOngoing

[![image.png](https://docs.ccragdollgames.com/uploads/images/gallery/2025-03/scaled-1680-/ZJ7image.png)](https://docs.ccragdollgames.com/uploads/images/gallery/2025-03/ZJ7image.png)

- Function with condition for ongoing lockpicking

#### OnLockpickFinished

[![image.png](https://docs.ccragdollgames.com/uploads/images/gallery/2025-03/scaled-1680-/3ytimage.png)](https://docs.ccragdollgames.com/uploads/images/gallery/2025-03/3ytimage.png)

- Event that can be called when lockpicking ends (successful or failed)
- Used by the BP\_Lockpick\_Minigame on "CloseMinigame" event and when lockpick is successful or failed

#### OnLockpickBreak

[![image.png](https://docs.ccragdollgames.com/uploads/images/gallery/2025-03/scaled-1680-/29Eimage.png)](https://docs.ccragdollgames.com/uploads/images/gallery/2025-03/29Eimage.png)

- Event that can be called when the pick breaks
- Used by the BP\_Lockpick\_Minigame