Voice-controlled shopping at shop NPCs. Players can purchase items, check prices, browse inventory by category, reorder previous purchases, and attempt to bargain for discounts.
Config file: shared/shops/default.lua
| Type | boolean |
| Default | true |
Master toggle for the shops addon.
ShopsConfig.enabled = true
The shop addon integrates with your server's shop resource. Set the priority order to match what is running on your server — the first detected resource is used.
| Type | table |
| Default | {"qb-shops", "ox-inventory", "esx-shops"} |
ShopsConfig.integrationPriority = {"qb-shops", "ox-inventory", "esx-shops"}
See Integrations for supported shop systems.
The addon detects when a player enters a shop zone and searches for a shop NPC within range.
| Type | number |
| Default | 5.0 |
Circular detection radius in metres (legacy, used for circle zones).
| Type | number |
| Default | 4.0 / 4.5 |
Box-shaped zone dimensions in metres.
| Type | number |
| Default | 500 |
How often (ms) the addon checks player position against shop zones.
| Type | number |
| Default | 3.0 |
Height of the box zone in metres.
ShopsConfig.zoneGeometry = { height = 3.0 }
When a player enters a shop zone, the addon searches for a shop NPC nearby.
| Setting | Default | Purpose |
|---|---|---|
searchRadius | 8.0 | Primary NPC search radius (metres) |
fallbackSearchRadius | 10.0 | Fallback radius if primary finds nothing |
waitForSpawn | 500 | Time to wait (ms) for an NPC to spawn before searching |
greetingDelay | 0 | Delay (ms) before the NPC delivers an automatic greeting |
| Type | number |
| Default | 0.65 |
Global minimum similarity score for voice-to-command matching (0.0–1.0).
| Type | boolean |
| Default | true |
Allows players to specify quantities when purchasing (e.g., "buy three burgers").
| Type | number |
| Default | 10 |
Maximum quantity allowed in a single voice purchase.
| Type | boolean |
| Default | true |
Allows purchasing multiple different items in a single voice command.
Per-intent similarity thresholds. Lower values allow less exact matches.
ShopsConfig.matching = { purchase = 0.65, price = 0.60, availability = 0.65, inventory = 0.70, productLookup = 0.70, }
| Type | number (ms) |
| Default | 300000 (5 minutes) |
How long shop data is cached on the client before being re-fetched.
ShopsConfig.rpc = { timeout = 5000 } ShopsConfig.cache = { ttl = 300000 }
| Type | string |
| Default | "3d" |
| Values | "3d" | "2d" |
Controls where voice hint phrases are displayed.
"3d" — floating bubble above the shop NPC's head (requires NPC to be present)"2d" — screen overlay (always visible regardless of NPC)ShopsConfig.hintMode = "3d"
| Type | boolean |
| Default | true |
Master toggle for NPC TTS speech responses.
Individual toggles for each response category. Set any to false to silence that category entirely.
ShopsConfig.feedback.responseToggles = { greeting = true, -- greet player on entry farewell = true, -- farewell on exit success = true, -- purchase confirmation priceCheck = true, -- price inquiry responses inventory = true, -- stock/availability responses errors = true, -- insufficient funds, out of stock, etc. category = true, -- category browsing responses reorder = true, -- reorder confirmation/history responses bargain = true, -- bargaining outcome responses }
| Setting | Default | Purpose |
|---|---|---|
responseCooldown | 1000 ms | Minimum time between NPC responses |
duplicatePrevention | 5000 ms | Suppress duplicate responses within this window |
farewellCooldown | 500 ms | Reduced cooldown after a farewell before a new greeting |
| Type | number |
| Default | 8 |
Maximum number of items the NPC will list aloud when a player asks for inventory.
ShopsConfig.inventoryDisplay = { maxSpokenItems = 8 }
The category system groups shop items so players can ask "what's in the food section?"
| Type | boolean |
| Default | true |
| Type | boolean |
| Default | true |
Automatically categorizes items based on their names and metadata.
| Type | number |
| Default | 6 |
Maximum items listed when a player requests a category.
ShopsConfig.categories = { enabled = true, maxItemsPerCategory = 6, autoDetect = true, defaultCategory = "general", }
Players can reorder their previous purchases by voice.
| Type | boolean |
| Default | true |
| Type | boolean |
| Default | true |
Saves purchase history to KVP (key-value persistence) so it survives reconnects.
| Type | number (ms) |
| Default | 604800000 (7 days) |
Maximum age of purchase history entries. Older entries are discarded.
ShopsConfig.reorder = { enabled = true, persistToKvp = true, sessionOnly = false, maxHistoryAge = 604800000, }
Players can attempt to bargain for a discount. Chance and discount magnitude are randomized within configured ranges.
| Type | boolean |
| Default | true |
| Type | number |
| Default | 0.10 / 0.50 |
Minimum and maximum probability (0.0–1.0) of a bargain succeeding.
| Type | boolean |
| Default | true |
Uses persistent purchase history to factor loyalty into bargain success chance. Players who buy often have a higher chance of getting a discount.
| Type | table |
| Default | {5, 10, 15, 20} / {50, 30, 15, 5} |
Discount percentages and their relative weights. A weight of 50 for 5% means the 5% discount is far more common than the 20% tier with weight 5.
ShopsConfig.bargaining = { enabled = true, baseChance = 0.10, maxChance = 0.50, cooldown = 120000, discountDuration = 60000, enableLoyalty = true, discountTiers = {5, 10, 15, 20}, discountWeights = {50, 30, 15, 5}, }
| Setting | Default | Purpose |
|---|---|---|
cooldown | 120000 ms | Per-player cooldown between bargain attempts (2 minutes) |
discountDuration | 60000 ms | How long a granted discount remains valid |
Last updated 14 days ago