> 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/brewery.md).

# Brewery

bs\_brewery adds a full all-grain craft brewery loop: milling, mashing, boiling, cooling, fermentation, bright-tank conditioning, packaging (bottles, labels, cases, kegs), quality checks, progression (XP / levels / recipes), optional delivery runs, and per-player brewery storage. Interactions use ox\_target; inventory and shops use ox\_inventory; UI uses a custom NUI plus ox\_lib notifications and dialogs.

***

### Who it is for

Servers that want structured brewing gameplay tied to a brewery interior, with persistence, leveling, and economy hooks (shop purchases, delivery payouts), without building the systems from scratch.

***

### Supported frameworks

| Setting                    | Core resource    | Notes                                                                                               |
| -------------------------- | ---------------- | --------------------------------------------------------------------------------------------------- |
| `Config.Framework = 'qbx'` | qbx\_core (Qbox) | Default                                                                                             |
| `Config.Framework = 'qb'`  | qb-core (QBCore) | Same player/money patterns as Qbox bridge                                                           |
| `Config.Framework = 'esx'` | es\_extended     | `citizenid` in the DB stores the ESX identifier; `Config.Currency` `cash` maps to ESX money account |

Always use ox\_inventory (and ox\_target, ox\_lib, oxmysql) as declared in `fxmanifest.lua`.

***

### Required world asset (MLO)

The script is authored around the Dolo Beer Factory interior. Coordinates and zones in `shared/config.lua` assume this map.

Required: [Dolo Beer Factory MLO — Dolu Mods](https://www.dolu-mods.com/package/4424142)

Using another interior is possible but requires retargeting all `Config.DefaultLocations` (and related zones) yourself.

***

### Player-facing systems (high level)

Brew house workflow

* Hot liquor tank (HLT) — heat water; status-style flow (start + check status).
* Grain mill — recipe selection, weigh ingredients, mill grains (metadata-aware milled grain).
* Mash tun — mash-in/rest, vorlauf, sparge; pump gates where configured; cleaning state.
* Brew kettle — boil (start + status), hop additions, optional whirlpool, cooling (start + status), transfer toward fermentation when ready.
* Pumps — control panel toggles; some steps require the correct pump path.
* Fermentation tanks — multiple tanks; pitch yeast, temperature, samples, transfer to bright, purge/clean; persistence across restarts.
* Bright tank — conditioning timer, carbonation (CO₂ guidance), readiness for packaging; cleaning.
* Glycol — system toggle/target temp tied into fermentation cooling narrative.

Packaging & products

* Bottling line: bottle, apply labels, pack cases; kegging station for 5 gal kegs.
* Finished items use ox\_inventory metadata (recipe, ABV, quality, brewer name, etc.) where implemented.

Progression & meta

* Brewery name (rename flow), XP, levels (1–10), recipe unlocks tied to `Config.Levels`.
* Recipe books (ox\_inventory `use` → server) open tiered recipe UIs.
* Supply shop (ox shop and/or custom NUI menu fallback).
* Quality lab — gravity, pH, refractometer-style readings, quality assessment hooks.
* Leaderboards / history — server callbacks for stats and brewing history (see server modules).

Delivery (optional subsystem)

* Terminal UI, contracts, multi-stop runs, vehicle handoff/return, payouts and XP — see `shared/delivery.lua` and `client/server delivery.lua` for tunables.

***

### Technical stack

| Layer                                            | Technology                                                                     |
| ------------------------------------------------ | ------------------------------------------------------------------------------ |
| UI                                               | NUI (`web/`), ox\_lib (notify, input, callbacks)                               |
| Interactions                                     | ox\_target (zones/spheres/boxes from config)                                   |
| Inventory                                        | ox\_inventory (items, stashes, shop, searches)                                 |
| Database                                         | oxmysql + schema in `sql/install.sql`                                          |
| Config                                           | `shared/config.lua` (times, temps, shop, locations, delivery, framework, etc.) |
| Recipes                                          | `shared/recipes.lua`                                                           |
| Item definitions (for merge into your inventory) | `items/ox_items.lua`, `items/qb_items.lua`, `items/esx_items.lua`              |

Runtime item list for the resource is loaded from `items/ox_items.lua` via `shared/items.lua` (see comments in those files).
