Skip to content

[Epic] Caravan / Trading-Nomad Domain #545

Description

@Quantumheart

A 5th DeityDomain — Caravan — built around two new favor verbs (NPC trade, exploration) and the mod's first player-to-player exchange surface (shrine-hosted trade table). First domain to ship a placeable capstone block.

Key decisions

  • New domain, not a re-skin — full blessing/offering/ritual trees, own glyph (wagon-wheel / compass-rose), own color (saffron / road-ochre).
  • Two favor sources — NPC trader trades (Trade branch) and chunk-transition exploration (Wayfaring branch). Both rarity/value-weighted with per-event caps so whale trades and AFK-in-a-chunk can't farm.
  • Capstone = placeable shrine, not a stat boost — caravan_avatar_road grants a caravanshrine block that acts as a tier-1 altar and hosts the player trade table. One per player.
  • Player trade is the canonical exchange surface — replaces the earlier /gift command proposal. Server-authoritative two-pane dialog with escrow, anti-switcheroo (offer change clears the other side's ready), distance leash (6 blocks), and crash/disconnect recovery. Zero item-loss is the bar.
  • Civ milestone: prefer option 2 (new trade_hub milestone) over bumping united_front to 5 domains — keeps existing civ progression intact.
  • Persistence: new DiscoveredChunks: HashSet<long> on PlayerProgressionData → DataVersion = 5. v4 → v5 migration loads empty (no retroactive favor).

Vertical slices

Phase 1 — domain visible + first favor source (NPC trade)

Phase 2 — Wayfaring favor source

Phase 3 — capstone block

Phase 4 — player-to-player trade table

Cross-cutting

Dependency graph

#427 ──┬──> #428 ──┬──> #429 ──> #437 (config)
       │          └──> #432 ──> #433 ──> #434 ──> #435 ──> #437
       └──> #436
#430 ──> #431 ──> #437

Phase 1 and Phase 2 land in parallel. Phase 4 is the long pole (escrow safety is the hardest).

Risks

Plan doc

Originally docs/topics/planning/features/trading-nomad-domain/implementation-plan.md — removed in the 2026-05-28 docs cleanup. Plan content now lives in the slice issues themselves.

Activity

  1. Quantumheart commented on May 29, 2026

    @Quantumheart
    OwnerAuthor

    Phase 4 design note (#433 — trade table scaffolding)

    Posted the full "Bill of Barter" design on #433. Key decisions that affect the rest of Phase 4:

    • Caravan shrine right-click → trade table directly (no Pray/Trade menu). Prayer stays on the regular altar; the shrine stops emitting the prayer-on-use path. Tier-1-altar siting + placement/destruction wiring unchanged.
    • Trade UI is a paper "bill of barter" ledger, not a 3×3 drag-drop grid. Rationale: a game-slot grid clashes with the codex/ledger aesthetic, and ImGui cannot accept native VS item drags (held-itemstack drag is native-GuiElementItemSlotGrid-only; the VSImGui overlay can't be a drop target). UI uses click-to-select with item names + counts (no live ItemStack icons — that'd need offscreen framebuffer rendering not present anywhere in the codebase).
    • Per-side capacity still 9 offered stacks (former 3×3 = 9), rendered as a ledger list.
    • Server-authoritative CaravanTradeSessionManager; server auto-assigns seats (A then B).

    Implications for #434: the escrow/atomic-swap layer plugs into the same server session and the "both SEALED" terminal state; continuous 6-block leash + disconnect/crash safety land there, not in #433.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions