Skip to content

Categories

joogiebear edited this page Jul 15, 2026 · 1 revision

Categories

Items live in plugins/RoyalBazaar/categories/one file per category, and the file name is the category id. A fresh install ships farming.yml and mining.yml; add a category by dropping in a new file, remove one by deleting its file. Run /bazaar reload after edits.

Every category is one button on the main menu (at its slot); clicking it opens that category's product list.

Anatomy of a category file

# categories/farming.yml — the file name (farming) is the category id.

name: "&aFarming"          # display name on the main menu
icon: "minecraft:wheat"    # main-menu button item (vanilla or ecoitem:)
slot: 11                   # position of this category on the main menu

defaults:                  # every item inherits these unless it overrides them
  spread: 0.05             # 5% gap between buy and sell
  elasticity: 50000        # units to move the price by a factor of e (higher = more stable)
  reversion_rate: 0.02     # fraction pulled back toward base each tick
  floor_pct: 0.4           # price never below 40% of base
  ceiling_pct: 3.0         # price never above 300% of base

items:
  wheat:
    item: "minecraft:wheat"
    base_price: 3.0
  carrot:
    item: "minecraft:carrot"
    base_price: 3.0
  sugar_cane:
    item: "minecraft:sugar_cane"
    base_price: 4.0

Category keys

Key Meaning
name The category's display name (supports & colour codes).
icon The item shown for this category on the main menu — a vanilla material or a namespaced ecoitem: id.
slot Which slot on the main menu holds this category button.
defaults Pricing parameters inherited by every item in the file.

Item keys

Each entry under items: is keyed by an item id (its map key). Per item:

Key Meaning
item The actual item to give/take — vanilla (minecraft:wheat) or custom (ecoitem:enchanted_cobblestone).
base_price The item's fair value; the price reverts toward this.
spread, elasticity, reversion_rate, floor_pct, ceiling_pct Optional per-item overrides of the category defaults.

The five pricing parameters are explained in full on the Pricing Model page.

Custom (eco) items

If eco / EcoItems is installed, use a namespaced id for item (and icon):

items:
  enchanted_cobblestone:
    item: "ecoitem:enchanted_cobblestone"
    base_price: 250.0

The item's id keeps its namespace everywhere — in the config, in /bazaar price, and in placeholders. Without eco installed, custom items are simply skipped and a note is logged.

Adding an item — checklist

  1. Pick the category file (or make a new one).
  2. Add an entry under items: with an item and a base_price.
  3. Override any pricing parameter if this item should behave differently from the category defaults.
  4. /bazaar reload.

Clone this wiki locally