WorldForge Studio

10 — Marketplace & Packs

A GAS-native marketplace where creators sell theme packs, civilization packs, NPC packs, weather packs, music packs, and complete worlds. The same asset pack works in 2D, 3D, simulation, and export — buy once, use everywhere.


0. Where we actually are (refreshed 2026-09-06)

The sections below describe the intended marketplace design. This block records what is actually on main, verified against apps/api/src/routes/pack-assets.ts, packages/marketplace, apps/web/src/components/pack-studio and git log (PRs #42–#84). Ground truth for milestones is superpowers/STATUS.md; storage rationale is in ADR 0006.

Design elementStatusWhere
Marketplace backend + picker✅ SHIPPED (Spec 5, 2026-08-04)packages/marketplace/src/{db,domain,schemas,client,semver}.ts; components/marketplace/*.
Pack Studio authoring (§8, §16)✅ SHIPPED end-to-end (17 PRs #44–#60 + #62–#65, 2026-08-22 → 08-23)Manifest editor PackManifestForm (#42); asset upload / list / rename / delete (POST/GET/PATCH/DELETE /packs/:packId/assets), sha-keyed dedup, 50 MB cap; cover art upload / pick / delete (PackCoverArt{Uploader,Picker}); visibility draft/published (PackVisibilityToggle, migration 0020); /packs/mine, /packs/new, /packs/[packId], /packs/[packId]/edit.
Batch asset upload✅ SHIPPED (PR #80, 2026-08-23)PackAssetBatchUploader.tsx.
Pack duplication✅ SHIPPED (PR #64, 2026-08-23)POST /packs/:packId/duplicate (fork-semantic, result always draft); DuplicatePackButton.tsx.
Bundled starter pack✅ Placeholder (PR #65)starter-fantasy seeded by migrations 0021 + 0023 (cover + 5 data-URI SVG assets). Real licensed PNG/GLB assets still ❌.
.gas-pack export / import (§15)✅ SHIPPEDGET /packs/:packId/export (zip: manifest.json + assets/<sha>), POST /packs/import (verify-before-write, fresh id); PackImportButton.tsx. Same-blob re-import allowed since PR #63 dropped the assets.sha256 unique index (migration 0022).
Marketplace listing + discovery (§10)⚠️ BasicPublishedPacksList.tsx on /packs with free-text search + theme filter. No ranking, categories, featured, or recommendations.
Pack kinds (§1–§6: tile / theme / civilization / weather / music / world)⚠️ UntypedPacks carry theme + free-form assets with per-asset kind; there is no enforced pack-kind taxonomy or per-kind validation.
Pricing & licensing (§9), Stripe Connect payouts❌ Not builtNo pricing fields, no Stripe / payment code in packages/marketplace or the pack routes.
Reviews & ratings (§11, §14), bundles (§13), update channels (§12)❌ Not builtpackages/marketplace/src/semver.ts exists for version comparison only.
Tests✅API pack-assets.test.ts (incl. 50 MB negative path, PR #93); web pack-studio unit tests; E2E e2e/pack-studio-full-lifecycle.spec.ts (PR #84: create → upload → publish → export → import → dedup). Audit flows packs-create, packs-mine-listing, packs-edit-upload enrolled in the testid gate (PRs #110, #114).

1. Pack kinds

The marketplace supports five pack kinds:

Pack kindContents
Tile packterrain tiles, objects, decorations, rules.json
Theme packbiome map + palette + lighting + asset swaps
Civilization packNPC packs + encounter tables + music + cultural assets
Weather packweather profiles + particle presets + sound cues
Worlda complete, playable world (the World.json + all referenced packs)

Every pack is a .gas-pack — a directory with a manifest. The marketplace stores the pack, validates it, and serves it to any user who buys / installs it.


2. Tile pack

jungle-adventure-pack/
├── manifest.json
├── terrain/
├── tiles/
├── objects/
├── decorations/
├── 3d/
├── preview.png
├── hero.png
└── LICENCE

manifest.json:

{
  "id":     "gas://pack/jungle_adventure@1.2.0",
  "name":   "Jungle Adventure Pack",
  "kind":   "tile-pack",
  "author": "gas://user/kristian",
  "version": "1.2.0",
  "tags":   ["jungle", "ancient", "tropical"],
  "biomes": ["jungle", "dense_jungle", "river", "ruins"],
  "variants": ["ancient", "young", "decayed"],
  "licence": {
    "type": "CC-BY-4.0",
    "commercial": true,
    "priceCents": 999
  },
  "preview": "preview.png",
  "hero":    "hero.png",
  "dependencies": [
    "gas://biome/jungle@1.4.0"
  ]
}

3. Theme pack

A theme pack is a re-skinning of an existing tile pack. It does not ship new tiles; it ships a theme.json that re-maps biomes to a different visual set.

{
  "id":     "gas://theme/viking@1.0.0",
  "name":   "Viking Northlands",
  "kind":   "theme-pack",
  "version": "1.0.0",
  "biomeMap": {
    "jungle":     { "terrain": "dense_birch_forest", "objects": ["birch", "rune_stone"] },
    "desert":     { "terrain": "tundra",              "objects": ["ice_boulder"] },
    "ocean":      { "terrain": "fjord" }
  },
  "palette": {
    "primary":   "#3a4a3a",
    "secondary": "#6c5b3a",
    "accent":    "#a13d2f"
  },
  "ambient": { "color": "#8090a0", "intensity": 0.4 },
  "licence": { "type": "CC-BY-4.0", "commercial": true, "priceCents": 499 }
}

A theme pack can be applied to any world; the existing biomes are re-skinned in place.


4. Civilization pack

A civilization pack ships the culture of a fictional people:

khmer-civilization-pack/
├── manifest.json
├── npcs/                  # NPC archetypes
│   ├── merchant.json
│   ├── guard.json
│   └── priest.json
├── encounters/            # Encounter tables
│   ├── jungle_predators.json
│   └── ancient_ruins_traps.json
├── music/                 # Music tracks
│   ├── jungle_theme.ogg
│   └── temple_choir.ogg
├── dialogue/              # Dialogue trees
│   └── arvid.json
├── assets/                # Cultural objects (statues, glyphs)
└── preview.png

Civilization packs make a world feel alive. Drop a Khmer civilization on top of a jungle world and the jungle becomes Ancient Khmer.


5. Weather pack

{
  "id":     "gas://weather/jungle_storm_set@1.0.0",
  "name":   "Jungle Storm Set",
  "kind":   "weather-pack",
  "profiles": [
    { "id": "rain",       "particles": [...], "shaderOverrides": {...}, "sound": "..." },
    { "id": "storm",      "particles": [...], "shaderOverrides": {...}, "sound": "..." },
    { "id": "monsoon",    "particles": [...], "shaderOverrides": {...}, "sound": "..." }
  ]
}

Weather packs ship particle presets + sound cues + shader uniforms. Apply a weather pack to a world and every weather event uses the new presets.


6. Music pack

Audio packs ship licensed music + ambient loops. The 3D engine + cinematic director consume them directly.

tavern-music-pack/
├── manifest.json
├── tracks/
│   ├── bustling_tavern.ogg
│   ├── quiet_corner.ogg
│   └── brawl.ogg
└── loops/
    ├── fireplace.ogg
    └── chatter.ogg

Licence tracking is critical — every track carries its own licence and the pack manifest declares the aggregate licence.


7. World listing

A complete world is also a pack. The user publishes:

ancient-khmer-jungle/
├── world.gas-world           # canonical world document
├── preview.png
├── hero.png
├── description.md
├── tags.json
└── LICENCE

The marketplace listing shows:

  • Hero shot.
  • Description + tags.
  • Author + version history.
  • Demo version (locked biomes) for preview.
  • Buy / Install button.

8. Authoring in Pack Studio

The same WorldForge Studio editor runs in Pack Studio mode — a constrained mode that only exposes pack-relevant tools:

  • Asset editor (SVG, GLB, audio).
  • Manifest editor.
  • Biome map editor.
  • Variant editor.
  • Preview renderer.
  • Validator (catches missing files, broken refs, licence conflicts).

Pack Studio enforces the pack schema so the published pack is always well-formed.


9. Pricing & licensing

9.1 Licences

  • CC0 — free, no attribution.
  • CC-BY — free with attribution.
  • CC-BY-NC — free for non-commercial use.
  • Commercial — paid, with explicit commercial grant.
  • Royalty — sold with a per-revenue share.

9.2 Pricing

  • Free — listed as free.
  • One-time — a fixed price.
  • Subscription — access for the duration of a subscription.
  • Bundle — sold as part of a larger collection.

9.3 Payouts

Creators receive payouts via Stripe Connect. The marketplace takes a platform fee (default 15%, configurable per pack).


10. Discovery

The marketplace supports:

  • Search by name, tags, biomes, theme.
  • Filters — licence, price, biome compatibility, engine target.
  • Collections — curated bundles ("Starter Pack", "Viking Bundle").
  • Featured — homepage hero rotation.
  • Trending — by installs + reviews in the last 7 days.
  • New — last 14 days.

11. Reviews & ratings

Every pack has a 1-5 star rating + written review. Reviews are GAS-stored and immutable once posted (edits allowed but original retained).


12. Updates & versioning

A pack ships with a semver version. When an author publishes v1.2.0:

  • Existing owners receive a free update notification.
  • They can choose to update or stay on v1.1.x.
  • New buyers get v1.2.0.
  • v1.1.x is preserved for users who opt out.

The marketplace enforces semver semantics: breaking changes require a major bump.


13. Bundles

A creator can bundle multiple packs:

{
  "id":   "gas://bundle/ancient_khmer_starter@1.0.0",
  "name": "Ancient Khmer Starter Bundle",
  "packs": [
    "gas://pack/jungle_adventure@1.2.0",
    "gas://civ/ancient_khmer@1.0.0",
    "gas://weather/jungle_storm_set@1.0.0",
    "gas://music/khmer_temple@1.0.0"
  ],
  "priceCents": 2499,
  "savingsCents": 700
}

Buying a bundle installs every pack and applies the theme + civilization in one step.


14. Reviews & marketplace integrity

The marketplace enforces:

  • Asset hashing — every file is SHA-256 hashed; the marketplace stores the hashes to detect tampering.
  • Licence auditing — every asset must declare its licence; conflicts (e.g. CC-BY asset in a commercial pack) are flagged at publish time.
  • DMCA workflow — takedown requests are handled by a small ops team.
  • Refunds — within 7 days if the pack doesn't match its description.

15. Pack install flow

  1. User browses the marketplace.
  2. User clicks Buy (or Install for free packs).
  3. The pack downloads to local storage (world-assets/cache/).
  4. The asset pipeline indexes the pack.
  5. The pack is available in the editor's Theme / Pack switcher.

Installed packs are offline-first; the marketplace only needs to be reachable for buying, not for using.


16. Pack authoring workflow

A creator authoring a pack typically:

  1. Opens Pack Studio with a tile pack template.
  2. Adds SVG assets to terrain/, objects/, decorations/.
  3. Adds GLB meshes to 3d/.
  4. Edits manifest.json.
  5. Edits theme.json (if it's a theme pack).
  6. Previews the pack in a sample world.
  7. Runs the validator.
  8. Publishes.

Pack authoring is a first-class workflow; the editor's tools are tuned for it without compromising the world-authoring experience.