← All docsCivilian jobs

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.

QboxQBCoreESXstandaloneResource: swarm_winery

New to Swarm scripts? Read Getting started first. It covers Swarm Bridge, install order and the licence.

Requirements

Frameworks: Qbox, QBCore, ESX, standalone.

RequirementWhat it's forIncluded
swarm_bridgeTalks to your framework, inventory, target and so on. Included with every Swarm script.Yes
ox_libShared library (callbacks, progress bars, text UI).No
oxmysqlSaves stats and aging batches, so wine in the barrels survives a restart.No
ox_target or qb-targetVats, barrels, the bottling table and NPCs are target-only. Stomping isn't possible without one.No
A supported inventoryGrapes, must, wine and bottles are real items.No
A grapes itemComes from Swarm Farming, or add it yourself. The winery shop also sells grapes.No

Install

  1. Copy the folders swarm_winery, swarm_bridge into your server's resources folder. Already have swarm_bridge from another Swarm script? Keep just one copy, the newest.
  2. Add them to server.cfg, dependencies first:
    ensure ox_lib
    ensure oxmysql
    ensure ox_target
    ensure ox_inventory
    ensure swarm_bridge
    ensure swarm_winery
  3. Database: tables are created automatically the first time the script starts. If you prefer, import install/swarm_winery.sql yourself first.
  4. Items: add the item definitions for your inventory from install/items/:
    • ox_inventory.items.lua for ox_inventory (any framework)
    • qbcore.items.lua for QBCore or Qbox with qb-inventory
    • esx.items.sql for legacy ESX

    Then copy install/images/*.png into your inventory's image folder (ox_inventory/web/images/ or qb-inventory/html/images/). Icons are named SS_<item>.png so they never overwrite another resource's images. Every item has an icon included.

    Items added (4)
    grape_must wine wine_bottle empty_bottle

    grapes is 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.

  5. 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.
  6. 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.

SettingWhat it does
Config.SupplyPed.coordsWhere the supply shop NPC stands (vec4). Placeholder.
Config.MarketPed.coordsWhere the wine buyer stands (vec4).
Config.VatsStomping vat positions (vec3).
Config.VatPropThe vat prop. A stand-in ships; swap it if you have a better one.
Config.Barrels.coordsWhere the aging barrel rack sits.
Config.BottlingTable.coordsWhere the bottling table sits.
Config.ItemsItem names. Change grapes if your grape item has a different name.
Config.MarketPricesWhat the wine buyer pays for must, wine and bottles.
Config.Stomp.grapesPerStompGrapes used per stomp.
Config.Aging.secondsAging time in real seconds (300 by default; Cellar upgrades shorten it).
Config.Shop.toolsPrices for grapes and empty bottles in the winery shop.
Config.MoneyAccountAccount 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

CommandWhoWhat it does
/wineryEveryoneOpens the winery hub (shop, clock in, upgrades, cellar, sell) from anywhere.
/wineposDebug mode onlyPrints 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.
  • /winepos gives 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.