Minigames

Minigames are interactive challenges that players must complete to progress through heist stages. They add skill-based gameplay and increase immersion by simulating real criminal activities such as ha

Using Minigames in Heists

To add a minigame to an interaction point, include the minigame parameter in your interaction configuration:

minigame = { 
    name = 'datacrack',
    speed = 2 -- optional parameters can be added depending on the minigame
}

Each minigame can accept specific parameters to customize difficulty and behavior. These parameters are passed through the minigame table in your configuration.

Available Minigames

The system includes 12 pre-built minigames that can be used immediately in any heist configuration.

'datacrack'

Description: TODO

Parameters:

  • speed: Controls the difficulty/speed of the minigame (higher = harder)

Example Usage:

minigame = { 
    name = 'datacrack',
    speed = 50 -- optional: controls difficulty
}

'blocks'

Description: TODO

Parameters:

  • time: Sets the time limit in seconds

Example Usage:

'fingerprint'

Description: TODO

Parameters:

  • time: Sets the time limit in seconds

  • lives: Number of attempts before failure

Example Usage:

'fingerprint2'

Description: TODO

Parameters:

  • time: Sets the time limit in seconds

Example Usage:

'computer'

Description: TODO

Example Usage:

'voltage'

Description: TODO

Example Usage:

'keypad'

Description: TODO

Example Usage:

'lockpick'

Description: Simulates picking a lock by manipulating pins inside a lock cylinder.

Example Usage:

'safecracking'

Description: Simulates cracking a traditional dial safe by finding the correct combination.

Parameters:

  • locks: Array of numbers representing lock positions (defaults to random if not specified)

Example Usage:

'small_drill'

Description: Simulates drilling into a small safe or deposit box lock.

Parameters:

  • difficulty: Sets the difficulty level (1-3)

Example Usage:

'big_drill'

Description: Simulates drilling into a large vault door lock.

Example Usage:

'laser'

Description: TODO

Example Usage:


Adding Custom Minigames

The system supports adding custom minigames by editing the minigames.lua file. To create a custom minigame:

  1. Add a new function to the table in minigames.lua

  2. Return a boolean value (true for success, false for failure)

  3. Use the included data parameter to access any custom settings

You can then use your custom minigame in any heist by referencing its name:

Accessing Exports

If your minigame needs to use UI elements or game mechanics from other resources, you can access them via exports:

Last updated