> For the complete documentation index, see [llms.txt](https://code-after-sex.gitbook.io/script-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://code-after-sex.gitbook.io/script-documentation/cas-fishing/getting-started/installation.md).

# Installation

### 1. Drop the resource in

Put the `cas-fishing` folder into your resources directory. Keep the folder name as it is — the resource refers to itself by name.

### 2. Start it

```cfg
ensure cas-fishing
```

Start it **after** your framework and `oxmysql`, so both are running when the script detects them.

### 3. Start the server once

Item rows are created automatically. You should see this in the console:

```
[cas-fishing] catch table ready
[cas-fishing] 28 items registered (28 new)
```

{% hint style="success" %}
Equip a fishing rod, walk to any water and hold aim. If the line goes out, you are done.
{% endhint %}

***

## Requirements

| Dependency           | Why                                                     |
| -------------------- | ------------------------------------------------------- |
| VORP Core or RSGCore | Money, inventory and characters. Detected automatically |
| `oxmysql`            | The catch record and item registration                  |
| `WEAPON_FISHINGROD`  | The rod itself — ships with `vorp_weaponsv2`            |

***

## The fishing rod

The rod is a **real weapon**, not an inventory item this script hands out. Players buy one and equip it from their satchel like any other weapon.

```lua
Config.RodWeapon = 'WEAPON_FISHINGROD'
```

Sell it through your own shop. There is a ready-made bait and tackle shop for `cas-shopv2` in the package.

{% hint style="info" %}
`/giverod` grants the rod for testing. Turn `Config.AllowTestCommands` off before going live and the command stops working.
{% endhint %}

***

## What gets created

**One table**, on first start:

| Table                 | What it holds                                         |
| --------------------- | ----------------------------------------------------- |
| `cas_fishing_catches` | Every catch: character, species, weight, bait, region |

**Item rows** in your inventory's `items` table — every bait, lure, fish and piece of junk the script can hand out. These are written with `INSERT IGNORE`, so an existing row is never touched.

{% hint style="warning" %}
An item with no row is silently refused by the inventory, however empty the satchel is. That is why the script seeds them itself rather than shipping a `.sql` file to paste.
{% endhint %}

***

## Item icons

Fish and bait pictures are read from your inventory's own image folder, so the catch card and the satchel always show the same file:

```lua
Config.ItemImagePath = 'nui://vorp_inventory/html/img/items'
```

Point it somewhere else if your inventory keeps images elsewhere.

***

## Upgrading

Replace the folder and restart. Catch history lives in the database, not in the resource.

{% hint style="warning" %}
Keep a copy of `config.lua` and anything you changed in `locales/` before replacing the folder.
{% endhint %}
