Documentation

Config

Explanations and examples for the current lockpick configuration.

Edit zyke_lockpick/shared/unlocked/config.lua. Tension values are fractions of the dial, from 0.0 slack to 1.0 full. Rates are per second. Lift and speed values are metres of pin travel, so small changes have a large effect.

Framework, inventory, notification, and language settings live in zyke_lib. Translations are in locales/.

#Full Default Config

#Config.Settings

#debug

Enables /lockpicktest, a local practice lock that never touches inventory items. The command is only registered when this is true as the resource starts. See Commands.

Example:

lua
debug = false

#commandPermission

Permission checked by /lockpicktest through zyke_lib. Use one permission or a list; any match grants access. command is the ACE permission, and the remaining defaults are the ESX admin groups.

Example:

lua
commandPermission = {"command", "admin", "superadmin", "owner"}

#Config.Preview

#defaultPins

Pin count /lockpicktest opens without an argument, from 3 to 9. Real attempts use the pin count the calling resource passes.

Example:

lua
defaultPins = 6

#cameraFov

Close-up camera field of view in degrees. Lower values zoom in on the pins.

Example:

lua
cameraFov = 18.0

#darkBackdrop

Draws a dark plane behind the lock instead of showing the world around it.

Example:

lua
darkBackdrop = false

#helpKey

Default key for the details panel. It is registered as a FiveM key mapping, so players can rebind it under Settings > Key Bindings > FiveM > Lockpick: open details. Changing this value only changes the default; players who already have the binding keep their own key.

Example:

lua
helpKey = "H"

#Config.Gameplay

#practicePicks

Picks per /lockpicktest round. Real attempts always end when the pick snaps.

Example:

lua
practicePicks = 3

#tensionRise

How fast tension builds while Space is held.

Example:

lua
tensionRise = 0.38

#tensionFall

How fast tension eases off after Space is released.

Example:

lua
tensionFall = 0.22

#holdTension

Below this tension, set pins drop and a jammed pin clears.

Example:

lua
holdTension = 0.08

#bindTension

Start of the dial's brass working band. Pins only bind and set from here.

Example:

lua
bindTension = 0.22

#safeTension

End of the working band. Above it, the pick strains and wears.

Example:

lua
safeTension = 0.45

#damageRate

Pick wear per second at full overload tension, scaled by how far tension is above safeTension. 1.0 would snap a new pick in one second. Lifting while overloaded wears the pick faster.

Example:

lua
damageRate = 0.22

#wrongPinDamageRate

Pick wear per second while forcing a wrong, jammed, or already set pin at 40% tension. It scales with the current tension.

Example:

lua
wrongPinDamageRate = 0.08

#pinMoveDelay

Seconds the pick takes to travel to the next pin. Probing waits for it.

Example:

lua
pinMoveDelay = 0.35

#liftSpeed

Pin lift speed without resistance. Binding pins lift at about half of it, and wrong pins much slower.

Example:

lua
liftSpeed = 0.0025

#returnSpeed

How fast unset pins fall back under spring pressure.

Example:

lua
returnSpeed = 0.004

#maxLift

Highest a pin can be lifted.

Example:

lua
maxLift = 0.0045

#setTolerance

How close to the shear line a binding pin must be held to set. Larger is easier.

Example:

lua
setTolerance = 0.00022

#setTime

Seconds a binding pin must be held at the shear line to set.

Example:

lua
setTime = 0.12

The server rejects a win faster than the fastest possible solve, which it works out from pinMoveDelay, liftSpeed, setTolerance, and setTime. Both sides read the same config, so restart the whole resource after changing them.

#sound

Plays the pin, set, jam, and snap sound cues.

Example:

lua
sound = true

#showPinColors

Colors the lower pins blue, green, amber, or red for feedback instead of plain brass.

Example:

lua
showPinColors = false

#Config.Items

#lockpicks

Pick items an attempt may wear, in order of preference. When the calling resource did not prepare a used slot, the first entry the player has a usable pick of is chosen. Items your inventory does not define are skipped with a console warning. Picks must not stack.

  • wear multiplies how fast the minigame damages that pick. veh_advancedlockpick wears at half the rate by default.
  • images are the inventory icons written to metadata.image per wear stage. Copy them from extras/items/images/256. Leave images out to leave the item's icon untouched.

The veh_lockpick and veh_advancedlockpick entries are Vehicle Keys picks. Remove them if you do not use that resource.

Example:

lua
lockpicks = {
    {
        name = "hook_pick",
        wear = 1.0,
        images = {
            intact = "lockpick",
            worn = "lockpick_wear_1",
            damaged = "lockpick_wear_2",
            critical = "lockpick_wear_3",
            snapped = "lockpick_wear_4",
        },
    },
    {name = "veh_lockpick", wear = 1.0},
}

#tensionWrench

Item required for every attempt. It is never worn or consumed.

Example:

lua
tensionWrench = "tension_wrench"

#minDurabilityLoss

Durability always removed per attempt, even when the pick was barely strained or the attempt was cancelled.

Example:

lua
minDurabilityLoss = 2

#removeBroken

Removes the pick when it snaps. When false, a snapped pick stays in the inventory at 0 durability and can no longer be used.

Example:

lua
removeBroken = false

#kit

Usable kit that unpacks into the tools an attempt needs and is used up. lockpick must be one of the lockpicks entries, so the picks it gives wear. Each pick is given separately with its own durability. Set kit = false to disable it. The unpacking logic is in server/unlocked/kit.lua.

Example:

lua
kit = {
    name = "lockpick_kit",
    lockpick = "lockpick",
    lockpicks = 5,
    tensionWrenches = 1,
}

#usable

Picks used straight from the inventory. Using one picks the nearest lock another resource offers, such as a zyke_boosting contract car. Each entry must also be in lockpicks. Leave out picks another resource makes usable itself, like Vehicle Keys' picks. The logic is in server/unlocked/picks.lua.

Example:

lua
usable = {"lockpick"}