Skip to content

Configuration

joogiebear edited this page Jul 15, 2026 · 1 revision

Configuration

Everything lives in plugins/RoyalBazaar/config.yml. Run /bazaar reload after edits. Items and their prices live in Categories; menu layouts in Menus & GUI — this page covers the market engine, trading, and storage.

Engine

engine:
  tick-interval-seconds: 60      # how often prices drift back toward base (mean reversion) and stats roll
  history-interval-seconds: 300  # how often a price snapshot is written for the 24h change / graphs
  flush-interval-seconds: 30     # how often changed prices are written to disk (write-behind)
  trend-ema-alpha: 0.2           # smoothing for the trend arrow (0..1); lower = smoother, slower to flip
Key Meaning
tick-interval-seconds The market "tick": every price is pulled a fraction of the way back toward its base (see Pricing Model). Lower = prices heal faster.
history-interval-seconds How often a snapshot is saved so the product menu can show 24-hour change and a trend.
flush-interval-seconds Prices live in memory and are flushed to storage on this interval (write-behind), so trading never blocks on disk.
trend-ema-alpha Smoothing for the ▲/▼ trend arrow. Closer to 0 = smoother and slower to flip; closer to 1 = snappier.

Trading

trading:
  inventory-full: refund   # refund | partial | drop

What happens when a buy can't fully fit in the player's inventory:

Value Behaviour
refund Buy only what fits and charge only for that; the overflow is cancelled.
partial Same as refund.
drop Buy the full amount and drop the overflow at the player's feet.

Storage

storage:
  type: SQLITE            # or MYSQL for a network / shared setup
  sqlite-file: bazaar.db
  mysql:
    host: localhost
    port: 3306
    database: royalbazaar
    username: root
    password: ""
    properties: "useSSL=false"
    pool-size: 10

SQLite is the default and needs no setup. Switch type to MYSQL and fill in the mysql block to share one price database across a network. See Storage & Data. Changing the storage backend needs a full restart, not /bazaar reload.

A note on formatting

config.yml is YAML — keep the two-space indentation, don't use tabs, and quote values with special characters. If a file fails to load, RoyalBazaar logs a warning naming the file in the console.

Clone this wiki locally