Swarm Winery
A winemaker job: stomp grapes into must with a timing minigame, age it into wine in barrels on a real-time timer, bottle it and sell. Includes upgrades and 10 levels.
New to Swarm scripts? Read Getting started first. It covers Swarm Bridge, install order and the licence.
Requirements
Frameworks: Qbox, QBCore, ESX, standalone.
| Requirement | What it's for | Included |
|---|---|---|
swarm_bridge | Talks to your framework, inventory, target and so on. Included with every Swarm script. | Yes |
ox_lib | Shared library (callbacks, progress bars, text UI). | No |
oxmysql | Saves stats and aging batches, so wine in the barrels survives a restart. | No |
| ox_target or qb-target | Vats, barrels, the bottling table and NPCs are target-only. Stomping isn't possible without one. | No |
| A supported inventory | Grapes, must, wine and bottles are real items. | No |
A grapes item | Comes from Swarm Farming, or add it yourself. The winery shop also sells grapes. | No |
Install
- Copy the folders
swarm_winery,swarm_bridgeinto your server'sresourcesfolder. Already haveswarm_bridgefrom another Swarm script? Keep just one copy, the newest. - Add them to
server.cfg, dependencies first:ensure ox_lib ensure oxmysql ensure ox_target ensure ox_inventory ensure swarm_bridge ensure swarm_winery - Database: tables are created automatically the first time the script starts. If you prefer, import
install/swarm_winery.sqlyourself first. - Items: add the item definitions for your inventory from
install/items/:ox_inventory.items.luafor ox_inventory (any framework)qbcore.items.luafor QBCore or Qbox with qb-inventoryesx.items.sqlfor legacy ESX
Then copy
install/images/*.pnginto your inventory's image folder (ox_inventory/web/images/orqb-inventory/html/images/). Icons are namedSS_<item>.pngso they never overwrite another resource's images. Every item has an icon included.Items added (4)
grape_mustwinewine_bottleempty_bottlegrapesis included only as a commented-out line, because Swarm Farming already defines it. Uncomment it if you don't run Farming and don't have a grapes item. - Licensed edition only: put your ServerSecret in
swarm_bridge/licence/private_config.lua. One secret unlocks every Swarm script you own. How to get it. The Source Code edition has no licence check, so skip this. - Start the server and check the console for errors.
Configuration
Open config.lua and check these before going live. Anything marked as a placeholder should be moved to a spot that suits your map.
| Setting | What it does |
|---|---|
Config.SupplyPed.coords | Where the supply shop NPC stands (vec4). Placeholder. |
Config.MarketPed.coords | Where the wine buyer stands (vec4). |
Config.Vats | Stomping vat positions (vec3). |
Config.VatProp | The vat prop. A stand-in ships; swap it if you have a better one. |
Config.Barrels.coords | Where the aging barrel rack sits. |
Config.BottlingTable.coords | Where the bottling table sits. |
Config.Items | Item names. Change grapes if your grape item has a different name. |
Config.MarketPrices | What the wine buyer pays for must, wine and bottles. |
Config.Stomp.grapesPerStomp | Grapes used per stomp. |
Config.Aging.seconds | Aging time in real seconds (300 by default; Cellar upgrades shorten it). |
Config.Shop.tools | Prices for grapes and empty bottles in the winery shop. |
Config.MoneyAccount | Account players are paid into. 'cash' by default. |
Config.Locale | 'auto' follows the language set in Swarm Bridge. Set a code such as 'de' to force this script into another language. See Languages. |
Commands & permissions
| Command | Who | What it does |
|---|---|---|
/winery | Everyone | Opens the winery hub (shop, clock in, upgrades, cellar, sell) from anywhere. |
/winepos | Debug mode only | Prints and copies your position as a vec3. Only exists while Config.Debug = true. |
Debug helpers only exist while Config.Debug = true in config.lua. Leave debug off on a live server.
No ACE permissions are needed.
Keys
- Space or mouse click: stop the stomp quality marker
- Esc: close the menu
Good to know
- Running Swarm Farming too? The winery shop sells grapes for $12 each by default, while the farming market pays more for them. Raise the winery grape price in
Config.Shop.tools, or remove it, so players can't buy low and sell high. - Aging uses all the grape must in the player's inventory, and each player can age one batch at a time.
/wineposgives a vec3. The NPC settings need a vec4, so add the heading yourself.
Need help?
Ask in the Swarm Scripts Discord and we'll help you get set up.
Swarm Scripts
Nyxia Development