Economy & Markets
Related: 37 — Economic map zones, 43 — Boundary zones, 08 — Inventory & storage, 22 — Chat & player trade, 18 — Unique items, 13 — Workers, 53 — Town market NPC price.
1. Summary
The economy is open: players craft, farm, and gather, then sell into player-priced market halls. There are no artificial trade bans — inflation is managed with volume caps, crown sales tax, and narrow NPC dump shops, not by locking what may be listed.
Stackable materials list as lots. Items with listable: false (default for currency, keys, quest/document, lodging, harvest nodes — including coin stacks) cannot be listed — deposit coin at a bank teller instead.
Three complementary layers:
- Market halls — tagged buildings with a clerk NPC; listings escrowed at the hall; browse scope set by boundary-zone lists
- NPC shops — rock-bottom buy/sell of narrow catalogs (inventory dump valve only)
- Direct P2P trade — trade window (22)
Banks settle copper; town storage (and on-person inventory) move goods into/out of halls. Workers deposit finished goods to town storage vaults (and still to chests/lodging).
2. Design principles
| Principle | Meaning |
|---|---|
| Player pricing | Sellers set any unit price ≥ 1 copper |
| Zone-linked share | Halls with intersecting market_boundary_zone_ids share browse books; disjoint lists stay isolated |
| Escrow at hall | Listed goods leave person/vault and sit in the listing hall until sold or delisted |
| Storage-first logistics | List / buy / delist from town storage or on-person inventory |
| Bank settlement | Buyer bank debit → crown tax sink → seller bank credit |
| Confirm buys | Buyer sees unit price and line total before commit |
| NPC dump valve | NPCs buy specific templates at rock-bottom rates; they are not the open market — including hall NPC price mode (53) |
| Listable gate | Category defaults + optional listable on templates |
| Physical + ledger | Coins have weight; bank for transfers (08) |
3. Trade modes
| Mode | Counterparty | Price set by |
|---|---|---|
| Direct trade | Player ↔ player | Mutual agreement (window) |
| Market hall list (Fixed) | Player → hall escrow → player buyer | Seller unit price |
| Market hall list (NPC price) | Player → hall escrow → NPC sweep | NPC buy price − convenience fee (53); players cannot buy |
| NPC shop | Player ↔ NPC | YAML rates / fixed coins — dump valve |
| Worker NPC sell | Employer’s worker → NPC buy list | Job config (13) |
| Bank transfer | Account ↔ account | N/A (currency only) |
All item moves are central-audited transactions.
4. Market halls
4.1 Building + clerk
- Building tag
market - Interior blueprint; NPC with
role: market_clerkand matching schedule labels - Fields on the building:
| Field | Meaning |
|---|---|
market_boundary_zone_ids |
Segment boundary_zones[].id values this hall participates in |
market_max_volume |
Escrow capacity (same volume model as town storage); blank = server default |
Player loop: enter hall → walk to clerk → interact → market panel.
4.2 Shared browse (boundary zones)
Each hall H has zone set Z(H). At hall B, visible listings are those held at any hall H where:
Z(H) ∩ Z(B) ≠ ∅
Disjoint zone lists → isolated markets. Overlap on one shared zone → shared book. See 43 — Boundary zones.
4.3 List / reprice / delist
- Seller chooses source: town storage vault (jurisdiction intersects hall zones) or on-person inventory
- Chooses pricing mode: Fixed (unit copper ≥ 1) or NPC price (mode only — 53)
- Sets quantity; Fixed also sets unit price
- Goods move into that hall’s escrow; volume counts against
market_max_volume - Seller may reprice Fixed lots or delist either mode; delist returns goods to chosen dest (storage or person); soft-fail if dest full
4.4 Buy (Fixed listings)
Browse listings visible under §4.2
Player buys apply only to Fixed listings; NPC-price lots are dump-queue only
Confirm unit price and line total (qty × unit)
Buy partial quantity or all
Choose dest: town storage or person
Settlement (atomic):
- Debit buyer bank for the listed line total
- Credit seller bank
total − tax - Sink tax (
LedgerCategory::Taxes) - Move qty from hall escrow to buyer dest
- Reduce or remove listing
Insufficient bank balance → reject (hard), unlike soft harvest tax.
NPC-price sweeps (phase schedule, FIFO, convenience fee, no hall tax) are specified in 53.
4.5 What may list
Stackable / template lots (crops, ores, mats, potions, and other listable templates). Equipment instance browse/inspect listings are a deferred extension — not required for the craft/farm → hall loop.
5. Goods logistics (storage + workers)
Workers → town storage vault (and/or chests)
Player at clerk → list from vault or person → hall escrow
Buyer → buy into vault or person
Delist → back to vault or person
- Town storage vaults are eligible when the storage building’s boundary/jurisdiction intersects the hall’s
market_boundary_zone_ids - Workers: route deposit/withdraw to owned chests/lodging or a
storage-tagged building vault - Craft/farm → market path: deposit to vault, then list at the clerk (no forced mass on the player’s back)
6. Crown sales tax
Tax zone covering the listing hall supplies market tax (see 37):
| Field | Meaning |
|---|---|
market_sales_tax_bps |
Basis points of sale total sunk to crown |
market_sales_flat_copper |
Optional flat copper per purchase |
Buyer pays the listed line total from bank; tax is taken from the seller’s proceeds. Regional harvest tax (rate_bps) remains separate.
7. NPC shops (dump valve)
NPC buys / sells YAML catalogs stay:
- Narrow template lists
- Rock-bottom buy rates so players prefer halls for real prices
- Do not feed the player Fixed order book
Two dump paths use the same buy tables:
- Face-to-face shop sell at the NPC
- Hall NPC-price listings swept on schedule (53) — convenience fee instead of visiting each merchant
Worker BrokerSell continues to sell to NPC buy lists.
8. Currency integration
| Action | Settlement |
|---|---|
| Hall purchase (Fixed) | Buyer bank debit; seller bank credit; tax sink |
| Hall NPC-price sweep | NPC treasury → seller bank (convenience fee); goods sunk; no hall tax |
| Hall list | Items escrowed (no coin until sale) |
| Direct trade | Physical items + coins in trade window |
| NPC shop | Physical coins / bank-first spend rules as elsewhere |
| Remote bank withdraw | Not allowed — coins physical only at bank branch (08) |
Uses the single character bank ledger (not per-jurisdiction balances).
9. Central authority & anti-cheat
| Responsibility | Owner |
|---|---|
| Escrow items during listings | Region worker + snapshot persist |
| Bank debit/credit + tax | Authoritative sim + ledger |
| Duplicate item prevention | Central mint/burn |
| Zone intersection browse | Deterministic from authored zone lists |
10. Client UX (gfx)
| Key | Action |
|---|---|
L |
List goods (source → stack → qty → Fixed price or NPC price) |
Tab |
Cycle listing category |
/ |
Search filter |
| ↑↓ / PgUp/PgDn | Select / page listings |
| Enter | Buy selected (confirm) or delist your own |
| Esc | Back / clear search / close |
Show labels over raw ids for halls, vaults, and templates. Capacity meter for hall escrow volume.
11. Design notes
Zone-linked halls keep isolated frontier towns and linked regional networks without a global auction house. Storage + worker deposit closes the craft/farm → market loop. NPC dump shops and hall NPC price mode prevent stuck inventory without destroying player Fixed pricing.
Crafted roadside player stalls and magical cross-region quote networks are out of scope — zone lists are the share/isolate tool.