# Config Settings

### 🚢 Port Heist Configuration Guide

This documentation provides a comprehensive overview of the `config.lua` for the FRKN Port Heist script. Use this guide to customize heist mechanics, difficulty, rewards, and technical settings.

***

#### 1. Target Settings

This section defines the interaction labels and icons for the target system (`qb-target` or `ox_target`).

* `name`: Set this to either `"qb-target"` or `"ox_target"` based on your framework.
* `TargetText`: Customize the label (text shown to player) and icon (FontAwesome) for various interactions like operating the crane, hacking computers, and searching guard bodies.

***

#### 2. Heist Contracts (`Contracts`)

You can define multiple heist tiers here. Each contract index `[1], [2], [3]` represents a different mission available on the tablet.

| **Attribute**    | **Description**                                                           |
| ---------------- | ------------------------------------------------------------------------- |
| `name`           | The display name of the heist on the UI.                                  |
| `buyMoney`       | The cost (Crypto/Money) required to start the heist.                      |
| `earnMoney`      | The final reward payout upon successful completion.                       |
| `requirements`   | The item name (e.g., `trackchip`) needed in inventory to start.           |
| `timeOut`        | Heist cooldown/duration in milliseconds (e.g., 360000ms = 6 mins).        |
| `truck`          | Defines the spawn coordinates and models for the transport truck/trailer. |
| `vehicles`       | The list of models and coordinates for the items to be stolen.            |
| `guards`         | NPC locations, ped models, and their weapon loadouts.                     |
| `entranceDialog` | The text and logic for the initial NPC interaction at the gate.           |

***

#### 3. Heavy Machinery: Crane Configuration

This controls the physical properties of the industrial crane used in the heist.

* `model`: The hash of the tower crane object.
* `armOffset`: Adjusts the arm position relative to the base.
* `ropeMin / ropeMax`: Defines the vertical limits of the crane hook.
* `armSlideMin / armSlideMax`: Controls how far the trolley can slide along the arm.

***

#### 4. Minigame Configuration

The script features 6 unique minigame integrations. Each can be adjusted within the `MinigameConfig` table:

* `riddleGame`: Logic-based puzzles.
* `sosGame`: Tic-Tac-Toe style hacking.
* `stickGame`: Timing and skill-check bars.
* `gridLaserGame`: Bypassing security grids.
* `radarGame`: Jamming port radar signals.
* `lockGame`: Overriding electronic door locks.

***

#### 5. Global Settings & Police Dispatch

**Police Requirements**

* `PoliceControl`: If set to `true`, the heist cannot start unless enough police are online.
* `PoliceCount`: The minimum number of officers required (Default: `3`).

**Dispatch System**

* `dispatchName`: Choose between `"ps"` (ps-dispatch), `"frkn-dispatch"`, or `"custom"`.
* `sendAlert`: A function that triggers the police notification. You can modify the `description`, `code`, and `blips` here.

***

#### 6. Localization (`Lang`)

All player-facing notifications are stored in the `Lang` table. You can easily translate the script into any language by modifying the `error`, `success`, and `info` strings.

***

#### 7. Item Integration

* `ItemList`: Defines the items required for the heist.
  * `port_tablet`: The item players must use to open the heist menu. Ensure the `item` name matches your database/shared.lua entry.

***

#### 8. Cleanup System

* `CleanRadius`: The distance (in meters) around the port where the script will automatically delete ambient world NPCs and vehicles to prevent interference during the heist.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.0resmon.org/0resmon/frkn-resources/frkn-port-heist/config-settings.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
