gta6/prompts
business
Vaultadvancedbusiness

Dynamic Supply/Demand Pricing

QBCore shop economy where per-item prices float server-side with stock scarcity and recent sales velocity for a living market.

NON-TESTÉ — the reference Lua is syntax-validated, not run in a live FiveM server. Adapt and test on your own dev server before shipping.
Est. Lua
~96 loc
Claude
Claude Opus 4.x / Sonnet 4.x
Validation
syntax-validated
Updated
2026-06-25

Description

A dynamic-pricing engine where every shop item's price is computed server-side from a scarcity factor (current stock) and a velocity factor (recent sales), clamped to a sane band, so a hot item climbs and a glutted one falls. Servers buy it because a market that visibly breathes is a defensible economy-sim feature that is hard to clone and keeps an in-game economy feeling alive.

Prompt Template

You are writing a FiveM resource for QBCore (exports['qb-core']:GetCoreObject()).

πŸ”’ Eyes-only β€” locked prompt body

The full prompt template and its reference Lua are part of a one-time pack. Pick your depth β€” both are lifetime access, no subscription, ever.

Core$49one-time
  • 60 prompts + syntax-validated reference Lua
  • Lifetime access β€” pay once
Most Popular Β· Best Value
Vault$199one-time
  • All 510 prompts β€” the full library
  • Per-prompt profit/trend intelligence (CSV + playbook)
  • Lifetime free updates β€” new niches as the market moves
Get the Vault β€” $199

$49 for 60 Β· $199 for all 510 + intelligence β€” one-time, no subscription.

Expected Output

The reference Lua at content/expected-outputs/business/12-dynamic-supply-demand-pricing.lua implements a server-side priceOf curve combining stock scarcity and sales velocity with a clamped band, a…

πŸ”’ Eyes-only β€” locked prompt body

The full prompt template and its reference Lua are part of a one-time pack. Pick your depth β€” both are lifetime access, no subscription, ever.

Core$49one-time
  • 60 prompts + syntax-validated reference Lua
  • Lifetime access β€” pay once
Most Popular Β· Best Value
Vault$199one-time
  • All 510 prompts β€” the full library
  • Per-prompt profit/trend intelligence (CSV + playbook)
  • Lifetime free updates β€” new niches as the market moves
Get the Vault β€” $199

$49 for 60 Β· $199 for all 510 + intelligence β€” one-time, no subscription.

Known Failure Modes & Corrective Prompt

  • Client-side price β€” a price computed in NUI lets a client buy cheap. Evaluate priceOf server-side at purchase.
  • Client-trusted total β€” recompute price*qty on the server before charging.
  • Single-source update β€” broadcast dyn:priceUpdate to -1, not source, so all shoppers see the new price.

Corrective re-prompt: Move priceOf and the shops state entirely server-side, recompute the total inside the dyn:buy handler from the live item state, and change every price-update broadcast to -1 so the market stays consistent across all shoppers.

Framework Integration

ESX: swap to xPlayer.getMoney/removeMoney and xPlayer.addInventoryItem; keep the shops table and the price curve server-side unchanged. QBCore: native β€” Player.Functions.RemoveMoney('cash', n) and AddItem; resolve with GetPlayer(src). QBox: identical to QBCore via exports.qbx_core:GetPlayer(src); pairs well with ox_inventory item registration.

Profit Potential

$300–$3500/mo on Tebex (expected ~$1000). [INFERRED] priced inside the $50-389 standalone-script band against the signal-scraper corpus (tebex_snapshot n=100, median seller $11.85K/mo) for a rising economy-sim niche.

Trend Signal

β†— rising β€” strategy: Matrix favors defensible economy-sim mechanics; dynamic pricing is hard to clone, high Compound.

Sales Angle

Position as a defensible economy primitive: prices that breathe with scarcity and demand, the kind of living-market feature buyers can't get from a static shop. Recommended Tebex price: $349.

Difficulty & Ship Time

advanced Β· ships in 1-2 days.