DND Docs

Resourcesdnd_economy

Features Overview

Last updated on

Dynamic pricing

Every agency has a target stock per item — the "ideal" amount. When actual stock deviates from that target, prices move automatically via a power-law formula to push stock back toward target.

  • High stock (above target) → prices drop (incentivize sales out)
  • Low stock (below target) → prices climb (incentivize inflow)
  • The formula is configurable per item: floor/ceiling bounds, sensitivity (how fast it reacts), decay (how much stock is "forgotten" per cycle)
  • Price snapshots are captured hourly for trend sparklines in the Dashboard

Stock is recomputed immediately after every Sell or Buy.

Sell workflow

  1. Player interacts with agency NPC and selects items/quantity
  2. System shows the current sell price and expected payout (after commission, before tax)
  3. If staff are on duty for the agency's job → sale goes to pending queue
  4. If no staff or pending times out → instant NPC sale (with same price, same commission)
  5. Staff review and accept/reject from /depending or the Pending NUI
  6. On acceptance: payout is withdrawn from agency's job account, commission and tax are calculated

The player is always offered the sell-side of the price spread, not the midpoint.

Buy workflow

  1. Player opens a cart interface and browses available items
  2. Adds multiple items with quantities, sees a running total, applies tax estimate
  3. Checkout creates a pending order — always. No NPC fallback, no timeout.
  4. If staff are on-duty, they're notified; otherwise the buyer is told to wait
  5. Staff review the order and pick a purchase type:
    • Instansi (buyer has the job) → price gets a per-agency discount
    • Gang/non-instansi (buyer doesn't) → price gets a per-agency markup
  6. On acceptance: revenue lands in the agency's job account, optional printable receipt is queued to dnd_jobmanagement

Staff see the adjusted price (with discount/markup applied) when reviewing, so they know what the player will actually pay.

Price spread (instansi vs gang)

When staff accept a Buy order, the purchase-type choice determines the final price:

  • Instansi discount — buyers with the agency's job see a lower price (e.g., 4% off mid-price). Internal procurement is incentivized.
  • Gang markup — buyers without the job see a higher price (e.g., 6% markup). Outside sales are more profitable for the agency.

Both are per-agency and dashboard-editable, so each agency can tune its own margins.

Agency budgets

Agencies are no longer infinite wallets. When staff accept a Sell, the payout is withdrawn from the agency's job account. The agency must have sufficient balance and stay within its spending quota.

  • Balance constraint — hard limit, can't pay if the account is empty
  • Quota constraint — soft limit, market closes when agency hits its per-cycle spending cap; reopens at cycle boundary

Per-agency overrides allow fine-tuning enforcement and quota settings from the Dashboard.

See Agency Budget System for details.

Transaction tax and stash upkeep

  • Transaction tax — a percentage of every Sell/Buy is collected (separate rates for each). Tax is routed to a government job account (treasury) or destroyed (money sink).
  • Stash upkeep — hourly charge for holding inventory (flat fee + per-unit fee). Prevents hoarding stock to suppress prices.

Both are optional (can be disabled) and both are reconfigurable from the Dashboard (for government-access users).

See Transaction Tax & Upkeep for details.

Dashboard

A game-facing NUI for agency managers and government. Accessible via /dedashboard. Features:

Agency manager view (per-agency)

  • Stock & pricing — current price, target stock, and live pricing curve for each item
  • Price holds — temporarily lock a price at a specific level (during events, sales, etc.)
  • Transactions — recent Sell/Buy history, grouped by order, expandable to line items
  • Discord webhook — log significant price changes to Discord in real-time
  • Buy price adjustment — instansi discount and gang markup, per-agency
  • Budget status — current balance, spending this cycle, quota limit, time to reset

Government view (cross-agency)

  • Bird's-eye view of all agencies
  • Budget overview (low-balance alerts, quotas reached)
  • Tax collected, upkeep charged
  • Treasury account balance

All dashboard edits take effect live — no restart needed.

Market overview

A read-only NUI (/demarket) showing every agency at a glance:

  • Current price per item
  • Stock level and demand label (high/balanced/low)
  • Optional: actual stock numbers (if agency has publicStock = true)

Players can use this to comparison-shop between agencies.

Pending orders

The /depending command (or the Pending NUI) shows:

  • Sell requests — pending Sell orders awaiting staff acceptance, with countdown until NPC fallback
  • Buy orders — pending Buy orders awaiting staff acceptance, no timeout

Staff can accept/reject individually, with optional price/quantity adjustments before acceptance.

Optional integrations

Renewed-Banking

If installed and enabled (Config.Banking.Enabled = true):

  • Buy revenue deposits directly into the agency's job account (not a personal balance)
  • Agency budget enforcement reads/writes the job account balance
  • Tax is transferred to the treasury job account
  • Stash upkeep is charged from the job account

Without it, Buy is disabled and budgets can't enforce spending.

dnd_jobmanagement

If installed and enabled (Config.Printer = 'dnd_jobmanagement'):

  • When staff accept a Buy order, a printable purchase document is auto-queued to the printer system
  • Document shows buyer, items, quantities, price-per-unit, total, and any applicable discount/markup

Without it, sales complete normally — the printout just doesn't happen.

dnd_phone

If installed:

  • Bank-paid transactions (when Config.MoneyAccount = 'bank') are logged to the player's mBanking history
  • Shows up on the player's in-game phone, not just their balance

Without it, transactions still work — they just don't appear in the phone's history.

Configuration-driven

Everything is tuned from config.lua:

  • Item price floors/ceilings, sensitivity, decay
  • Agency job, commission, stash location
  • Budget limits and quotas
  • Tax rates and destination
  • Upkeep fees
  • Color theming (accent colors, no CSS edits needed)
  • Command names (avoid conflicts with other resources)

A few runtime fields (webhook URLs, dashboard edits) are intentionally excluded from the config sync so they survive a restart — see Configuration for the full list.

On this page