> For the complete documentation index, see [llms.txt](https://dirkscripts.gitbook.io/dirkscripts-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dirkscripts.gitbook.io/dirkscripts-documentation/resources/dirk-fishing/configuration.md).

# Live Script Configurator

Every fish, zone, permit, shop, tool, dig spot and player level in `dirk_fishing` is editable from the in-game **Live Script Configurator**. Changes save to the `dirk_scriptConfig` database table and apply **live** — no SQL imports, no Lua edits, no resource restart.

{% hint style="success" %}
**Opening the configurator**

You have two options, both registered by `dirk_lib`:

* **`/dirk_fishing`** — opens the configurator straight to the fishing config.
* **`/dirk_config`** — opens the chooser listing every dirk script on the server and lets you pick which one to configure.

Only players with the configured admin permission (set up via `dirk_lib`) can access either command.
{% endhint %}

<figure><img src="/files/Fvu4PW6i82JU5rYJX0cI" alt=""><figcaption><p>The Live Script Configurator.</p></figcaption></figure>

***

## Sidebar Controls

* **Undo / Redo** — full edit history.
* **Save** — persist pending changes (a badge shows the number of unsaved edits).
* **History** — timestamped audit log of every change, who made it, and the old vs new values.
* **Discard** — drop unsaved edits.
* **Manual Edit (JSON)** — open a raw JSON editor for the entire config.
* **Reset Defaults** — wipe everything and reload shipped defaults (with confirmation).

***

## Sections

The configurator has nine top-level sections, listed in the sidebar:

**Basic** · **Players** · **Fish** · **Equipment** · **Stores** · **Zones** · **Bait Dig** · **Daily Challenges** · **Tournaments**

***

### Basic

Six sub-tabs: **General**, **Fishing**, **Traps**, **Permits**, **Skills**, **Controls**.

| Sub-tab      | What lives here                                                                                                                              |
| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------- |
| **General**  | Debug mode, target vs interact, weight/distance units, item names (guidebook, fish finder, anchor, permit, gutting knife), map icon colours. |
| **Fishing**  | Cast time, bite timing range, bait consumption chance, fish density per cell, anchor toggle / deploy time.                                   |
| **Traps**    | Trap interval, catch rate multiplier, stale-trap auto-expiry hours, trap pull timeout.                                                       |
| **Permits**  | Global price, duration, payment accounts, replacement card cost, configured revoker job/rank.                                                |
| **Skills**   | XP curve — base level, max level, base XP to reach level 2, curve modifier.                                                                  |
| **Controls** | Rebindable keybinds for reel, line release, reel lock, loadout, abandon rod, anchor, permit UI, card flip.                                   |

***

### Players

Search and manage every player's fishing data. Each row shows character name, player name, online status, server ID, XP and level. Click a player to **edit their level** — XP recalculates automatically. Permits can also be viewed and revoked here.

***

### Fish

Full create / edit / delete for every species. Each fish has four sub-tabs:

* **General** — name, label, description, permit toggle, info-unlock level.
* **Stats** — bite chance (rarity slider), weight range, strength per kg, fight chance, abundance.
* **Ecology** — water types, depth range, accepted bait types (each with a per-bait preference weight), fixed base sell price (`$/kg`).
* **Gutting** — chance of finding worms, plus reward items with min/max amount and drop chance.

***

### Equipment

Eight categories: **Rods**, **Reels**, **Lines**, **Hooks**, **Bait**, **Weights**, **Traps** and **Misc**. Common fields are name, label, level requirement and description. Category-specific:

| Category    | Extra Fields                                                                           |
| ----------- | -------------------------------------------------------------------------------------- |
| **Rods**    | Strength, cast distance range, prop model                                              |
| **Reels**   | Strength, depth limit                                                                  |
| **Lines**   | Strength                                                                               |
| **Hooks**   | Weight range it can handle                                                             |
| **Weights** | Weight value (grams)                                                                   |
| **Bait**    | Dig toggle, dig quantity, per-ground-type chance sliders (21 materials)                |
| **Traps**   | Capacity, prop model, trap-only fish list                                              |
| **Misc**    | Catch-all for the anchor, fish finder, gutting knife, guidebook, permit and trap items |

***

### Stores

CRUD for equipment shops, fish markets and the bait market. Every store has four tabs:

* **Basic** — ID, name, level requirement, type (Equipment / Fish Market / Bait Market), NPC models, payment methods, opening hours, map blip.
* **Locations** — every NPC spawn point as `(x, y, z, heading)`.
* **Categories** — item groupings used in the store UI.
* **Stock** — per-item price. Equipment stock takes a flat `$` price per item. Fish market stock takes a **variance range** as signed percentages (e.g. `-5%…+5%` or `+5%…+20%`) applied to the fish's base price — a live `$/kg` preview shows the exact resulting range. Individual stock items can be **level-locked** so high-tier gear unlocks gradually.

***

### Zones

Interactive **map editor** with three layers:

* **Fishing Zones** — drawn polygons with info, level requirement, bite timing, density / abundance / weight modifiers, permit toggle and per-fish overrides.
* **Depth Overrides** — force a specific water depth in areas where GTA gets it wrong (use depth `0` to mark unfishable).
* **Sea Boundary** — a single polygon separating freshwater (inside) from saltwater (outside).

Layer visibility toggles let you focus on one type at a time while editing.

***

### Bait Dig

Three sub-tabs: **Settings**, **Random Items**, **Tools**.

* **Settings** — regen time for dug spots, random-item chance, grid density range.
* **Random Items** — bonus drops in dig spots (item or account, chance, amount range).
* **Tools** — per-tool stamina cost, dig time and durability.

***

### Daily Challenges

CRUD for daily challenge templates and reward tables. Each template defines:

* **Goal type** — catch X of a species, hit a weight goal, dig N bait, land above a rarity tier, etc.
* **Reward** — cash, items or XP.
* **Eligibility pool** — which player levels / zones / equipment unlock the challenge.

State resets at server-local midnight.

***

### Tournaments

CRUD for the upcoming tournament system. The Guidebook **Tournaments** tab is the player-facing surface — full functionality is work-in-progress and will land in a future point release.

***

## Manual JSON Editing

Click **Manual Edit (JSON)** to open the entire configuration in a validated JSON editor. Useful for:

* Bulk edits
* Backing up config
* Transferring settings between servers

Validation happens in real-time — errors show inline. Only changed keys are saved (the panel diffs against current state).

***

## History / Audit Log

Every change is logged with:

* Timestamp
* Admin who made it
* Setting path, old value, new value

Filter by admin name or setting path to find specific changes.

***

## Storage

Everything persists to the `dirk_scriptConfig` table — a single source of truth. No server restart is ever required to apply config changes.
