> ## Documentation Index
> Fetch the complete documentation index at: https://docs.atlasscripts.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Install atlasFishing on a FiveM server — fast path and full step-by-step guide.

This is the single install page for `atlasFishing`. Use the **Fast path** if you just want it running; use the detailed sections below for a production setup or when helping a customer.

## Fast path

<Note>
  Already comfortable with FiveM resources? This is the speed run. Each step links to the full detail below.
</Note>

<Steps>
  <Step title="Place both resources">
    Drop `atlasBridge` and `atlasFishing` into your resources, keeping the names exact. See [Folder placement](#folder-placement).
  </Step>

  <Step title="Set the start order">
    `ensure atlasBridge` **before** `ensure atlasFishing`. See [server.cfg](#server-cfg).
  </Step>

  <Step title="Register the inventory items">
    Paste the matching item block into your inventory and copy the icons. See [Inventory items](#inventory-items).
  </Step>

  <Step title="Restart and test">
    Visit the fisherman, buy a rod + bait, cast on water, complete the minigame, and sell. See [In-game smoke test](#in-game-smoke-test).
  </Step>
</Steps>

The fishing rod is registered usable automatically and the props in `stream/` are streamed by the resource — no extra wiring. The only manual step is registering the items in your inventory.

***

## Requirements

* [`atlasBridge`](/atlas-bridge/overview) (hard dependency — load it first).
* A supported framework/inventory detected by the bridge, or standalone mode.
* OneSync.
* The committed `atlasFishing/web/dist` folder (ships with the resource).
* Inventory items and icons installed in your inventory.

<Warning>
  `atlasFishing` declares `dependency 'atlasBridge'`. If `atlasBridge` starts **after** `atlasFishing`, the fishing resource will not initialize.
</Warning>

## Folder placement

Recommended layout:

```text theme={null}
resources/
  [ATLAS]/
    atlasBridge/
    atlasFishing/
```

The resource names must be exact:

```text theme={null}
atlasBridge
atlasFishing
```

Both resources include name checks. `atlasFishing/shared/guard.lua` compares the running resource name against `atlasFishing`; if a customer renames the folder, the console prints what happened and the resource blocks startup.

## server.cfg

Minimal setup:

```cfg theme={null}
ensure atlasBridge
ensure atlasFishing
```

Typical setup with common dependencies started first so the bridge can auto-detect them:

```cfg theme={null}
ensure oxmysql
ensure ox_lib
ensure ox_inventory
ensure qbx_core

ensure atlasBridge
ensure atlasFishing
```

<Tip>
  If you use `qb-core`, `es_extended`, `qb-target`, or `ox_target`, start those before `atlasBridge` too — the bridge detects your framework, inventory, and target system at startup.
</Tip>

## Inventory items

`atlasFishing` uses real inventory items for the rod, bait, and catches. The resource ships ready-to-copy item files in `items/`. Pick the one that matches your inventory.

<Tabs>
  <Tab title="ox_inventory">
    1. Open `atlasFishing/items/ox_inventory.lua`.
    2. Copy the full item block.
    3. Paste it inside the returned items table in `ox_inventory/data/items.lua`.
    4. Restart `ox_inventory` and the Atlas resources.
  </Tab>

  <Tab title="qb-core">
    1. Open `atlasFishing/items/qb-core.lua`.
    2. Copy the full item block.
    3. Paste it inside `QBShared.Items` in `qb-core/shared/items.lua`.
    4. Restart `qb-core`, your inventory, and the Atlas resources.
  </Tab>

  <Tab title="Other inventory">
    Create items using the **same item keys** in whatever format your inventory expects. The key names matter more than the labels — e.g. the rod must be `fishing_rod` unless you also change `Config.rod.item`.
  </Tab>
</Tabs>

For the full key list and rename rules, see [Items & Icons](/atlas-fishing/items).

### Item icons

The resource ships both PNG and WebP icon sets:

```text theme={null}
atlasFishing/items/icons/png
atlasFishing/items/icons/webp
```

Copy the format your inventory supports into its image folder (e.g. `ox_inventory/web/images/`). Many inventories still expect PNG filenames, so **PNG is the safest choice** unless you know your UI supports WebP.

## Verify the NUI build

Confirm this file exists:

```text theme={null}
atlasFishing/web/dist/index.html
```

This is the resource's own NUI page — the supplies shop, boat shop, and minigames all render from it. If `web/dist` is missing, those screens cannot open. The build is committed, so a fresh copy runs as-is; only rebuild (`cd web && bun install && bun run build`) if you change anything under `web/src/`.

## Streamed props

`atlasFishing` includes streamed rod, fish, and critter props, and registers the type file in the manifest:

```lua theme={null}
data_file 'DLC_ITYP_REQUEST' 'stream/fishing_props.ytyp'
```

Leave the `stream/` folder in place unless you are replacing the props and updating the prop names in `config.lua`.

## Editable files

`atlasFishing` ships with asset escrow. Most logic is protected, but these files are left open (via `escrow_ignore`) so you can configure the resource and add hooks:

| File                  | Purpose                                                                  |
| --------------------- | ------------------------------------------------------------------------ |
| `config.lua`          | All settings — locations, prices, items, minigames, selling, boat rental |
| `editable/client.lua` | Client hooks (`Fishing.Hooks`) — e.g. hide your HUD on minigame open     |
| `editable/server.lua` | Server hooks (`Fishing.Hooks`) — e.g. log every catch and sale           |
| `items/*.lua`         | Inventory item definitions to paste into your inventory                  |

The gameplay logic is encrypted and does not need editing for a normal install. The hooks are documented in [Configuration](/atlas-fishing/configuration#editable-hooks).

## In-game smoke test

<Steps>
  <Step title="Start the server">
    Watch the console for `atlasBridge` and `atlasFishing` startup. Resolve any missing-dependency, renamed-resource, or item warnings before testing.
  </Step>

  <Step title="Visit the fisherman">
    The default ped is at `Config.ped.coords` (a placeholder). Use the map blip to find it.
  </Step>

  <Step title="Open Supplies">
    Buy a fishing rod and at least one bait.
  </Step>

  <Step title="Cast near water">
    Use the rod while facing water. If `Config.cast.requireWater` is on, casting away from water is rejected.
  </Step>

  <Step title="Complete the minigame">
    A minigame opens in NUI and returns success or failure to the fishing flow.
  </Step>

  <Step title="Sell the catch">
    Return to the fisherman and sell. Confirm the payout lands in the `Config.sell.account`.
  </Step>
</Steps>

If anything fails, see [Troubleshooting](/atlas-fishing/troubleshooting).

## Production checklist

* Resource names are unchanged (`atlasBridge`, `atlasFishing`).
* `atlasBridge` starts before `atlasFishing`.
* Inventory items exist for the rod, all baits, and all fish.
* Item icons are in the correct inventory image folder.
* `web/dist/index.html` exists.
* Fisherman and boat-rental locations are moved off the placeholder coordinates.
* Prices and fish rewards are balanced for your economy — see [Economy Balancing](/atlas-fishing/economy-balancing).
* Minigames are tested by a normal player, not only an admin.
