> For the complete documentation index, see [llms.txt](https://beetle-studios.gitbook.io/beetle-studios-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://beetle-studios.gitbook.io/beetle-studios-docs/beetle-studios/weed/installation.md).

# Installation

Beetle Studios · FiveM weed cultivation script (genetics, breeding, drying, processing, skill tree, reputation)

This guide walks server owners through installing bs\_weed on a typical FiveM server. Adjust paths if your folder layout differs.\
\
What you need first

Before installing, confirm you have:

| Requirement           | Notes                                                                                           |
| --------------------- | ----------------------------------------------------------------------------------------------- |
| MySQL database        | Used for plants, players, strains, drying, lights, fans                                         |
| oxmysql (recommended) | Script expects `@oxmysql/lib/MySQL.lua` in `fxmanifest.lua`                                     |
| ox\_lib               | Required (`@ox_lib/init.lua`)                                                                   |
| Target                | Configure `ox_target` or `qb-target` in `shared/config.lua` (`Config.Target`)                   |
| Inventory             | Configure `ox_inventory` or `qb-inventory` (`Config.Inventory`)                                 |
| Framework             | Configure `esx`, `qbcore` (includes Qbox-style `qb-core`), or `standalone` (`Config.Framework`) |
| Bzzz prop packs       | Required for in-game models (see below)                                                         |

***

### Required prop packs (Bzzz / BPB Mods)

bs\_weed uses Bzzz weed and grow props. Stream these on your server per each pack’s instructions so props load correctly.

| Pack             | Link                                    |
| ---------------- | --------------------------------------- |
| Colored Weed V2  | <https://bzzz.tebex.io/package/5954200> |
| Dry Weeds        | <https://bzzz.tebex.io/package/6272961> |
| Seedlings (free) | <https://bzzz.tebex.io/package/5073805> |
| Pots (free)      | <https://bzzz.tebex.io/package/6483978> |

Store: [bzzz.tebex.io](https://bzzz.tebex.io/)

***

### Installation steps

#### 1. Add the resource

1. Copy the `bs_weed` folder into your server’s `resources` directory (for example `resources/[standalone]/bs_weed`).
2. Do not rename the resource folder unless you know how to update every reference and Tebex escrow expectations; keeping the folder name `bs_weed` avoids confusion.

#### 2. Start order in `server.cfg`

Ensure dependencies load before `bs_weed`. Typical order:

ensure oxmysqlensure ox\_lib# your target resource, e.g.:ensure ox\_target# your inventory, e.g.:ensure ox\_inventory# your framework core if applicable, e.g.:ensure qb-coreensure bs\_weed

Add `object_gizmo` only if you use precision placement (see Optional section).

#### 3. Database

* Tables are created automatically on first start when your MySQL resource matches `Config.Database` in `shared/config.lua` (default `oxmysql`).
* For a manual reference or DBA review, use `schema.sql` in the resource root.

#### 4. Configure the script

Edit `shared/config.lua` (this file is intended to stay editable; it is listed in `escrow_ignore` in `fxmanifest.lua` for Tebex builds).

Set at minimum:

* `Config.Framework` — `'qbcore'`, `'esx'`, or `'standalone'`
* `Config.Database` — `'oxmysql'` or `'mysql-async'`
* `Config.Target` — `'ox_target'`, `'qb-target'`, or `'standalone'`
* `Config.Inventory` — `'ox_inventory'`, `'qb-inventory'`, or `'custom'`

Tune economy, plant caps, theft, indoor unlocks, drying times, and debug there as needed for your server.

#### 5. Items and inventory

ox\_inventory

1. Open `items/ox_inventory_items.lua` inside `bs_weed`.
2. Merge those item definitions into your inventory’s items file (commonly `ox_inventory/data/items.lua`).
3. Item names must match `Config.Items` in `shared/config.lua`.

qb-inventory

Use the same item names and logic as a reference; adapt the item definitions to your qb-inventory format so keys still match `Config.Items`.

Important — `weed_seed`

If another resource registers the same item name with a different server export, players can see “Invalid seed item!” or wrong behavior. The `weed_seed` definition should use bs\_weed’s server export (as in `items/ox_inventory_items.lua`). Merge after conflicting packs so bs\_weed wins, or rename the conflicting item in the other resource.

#### 6. Admin permissions (ACE)

For admin commands such as `/setrep` and `/givexp`, add:

add\_ace group.admin cultivationrp.admin allow

Adjust `group.admin` to match your admin group in `server.cfg`.

***

### Optional (but recommended): precision placement (`object_gizmo`)

If `Config.UseObjectGizmoForPlacement` is `true` in `shared/config.lua`, start the `object_gizmo` resource before or with your placement workflow so placeables (indoor pot, grow light, weed table, drying rack, rosin press) can use the 3D gizmo. Outdoor seed placement is unchanged.\
<https://github.com/dodibanScripts/object_gizmo>

***

### After install — quick checks

1. Start the server with no script errors referencing `bs_weed`, `ox_lib`, or `oxmysql`.
2. Join in-game and confirm Bzzz props appear (no invisible/missing models near plants or placeables).
3. Open Pete’s (or your configured shop) and confirm shop items appear after the ox\_inventory merge.
4. Use weed seed from inventory and confirm planting flow works.
5. Try `/skilltree` to confirm the NUI loads.

***

### Useful reference (not full install)

| Topic                         | Where to look                                                      |
| ----------------------------- | ------------------------------------------------------------------ |
| Commands                      | `/skilltree`, `/setrep`, `/givexp` (admin ACE required for rep/XP) |
| Server exports (bulk dealers) | `getBulkDealerState`, `bulkDealerFulfill` in `fxmanifest.lua`      |
| Lua exports                   | README in the resource documents `exports['bs_weed']:...` helpers  |
| Database tables               | README table + `schema.sql`                                        |

***

### Troubleshooting

Shop shows no items

* Items must exist in ox\_inventory’s definitions. Re-merge `items/ox_inventory_items.lua` and restart ox\_inventory or the server. Check `Config.PedStoreItems` and `Config.PedStoreBeginnerOnly` in `shared/config.lua`.

“Invalid seed item!”

* Another resource may own `weed_seed`. Ensure `server = { export = 'bs_weed.seedItemCallback' }` (or equivalent) wins for that item name.

Database errors

* Confirm oxmysql (or mysql-async) is running and connection string is correct. Confirm `Config.Database` matches what you use.

***

### Version note

Script version is declared in `fxmanifest.lua` (`version` field). After Tebex updates, compare that version with your docs when reporting issues.
