Skip to main content

Manifest-Driven Design

Hyperscape uses JSON manifests for game content. Add new NPCs, items, stores, and world areas by editing JSON files in packages/server/world/assets/manifests/.
No code changes required—just edit the JSON manifest files and restart the server.

Content Files

All manifests are in packages/server/world/assets/manifests/:

Core Manifests

Adding NPCs

NPCs are defined with combat stats, drops, and spawn locations:

Difficulty Levels

Adding Items

Items include equipment, resources, and consumables. Add to the appropriate category file in items/ directory.

Example: Adding a Weapon

File: packages/server/world/assets/manifests/items/weapons.json

Example: Adding a Tool

File: packages/server/world/assets/manifests/items/tools.json

Example: Adding a Resource

File: packages/server/world/assets/manifests/items/resources.json

Tier-Based Requirements

Items with a tier property automatically derive level requirements from tier-requirements.json:
No need to manually specify requirements if using the tier system.

Item Types

  • weapon: Swords, bows, staffs
  • armor: Helmets, bodies, legs, shields
  • tool: Hatchets, pickaxes, fishing rods
  • consumable: Food, potions
  • resource: Logs, fish, ores, bars
  • currency: Coins
  • junk: Burnt food, broken items

Adding Shops

Shops define available items and prices:

Adding Stations

Stations are interactive objects for crafting and processing:

Station Types

  • anvil: Smith bars into equipment
  • furnace: Smelt ores into bars
  • range: Cook food with reduced burn chance
  • bank: Store items

Adding World Areas

World areas define zones with biomes and mob spawns:

Biomes

  • Mistwood Valley (foggy forest)
  • Goblin Wastes (barren lands)
  • Darkwood Forest (dense shadows)
  • Northern Reaches (frozen tundra)
  • Blasted Lands (corrupted areas)

Adding Recipes

Smelting Recipe

File: packages/server/world/assets/manifests/recipes/smelting.json

Smithing Recipe

File: packages/server/world/assets/manifests/recipes/smithing.json

Cooking Recipe

File: packages/server/world/assets/manifests/recipes/cooking.json

Firemaking Recipe

File: packages/server/world/assets/manifests/recipes/firemaking.json

Testing Changes

1

Edit Manifest

Add your content to the appropriate JSON file in packages/server/world/assets/manifests/
2

Restart Server

Stop the server (Ctrl+C) and restart with bun run dev
3

Verify In-Game

Check that your content appears correctly at http://localhost:3333
Server restart required: Unlike code changes, manifest changes require a full server restart to reload.

Validation

Atomic Loading

Directory-based manifests use atomic loading:
  • All required files must exist or system falls back to legacy format
  • For items/: All 5 category files must be present
  • For recipes/: Individual files are optional (falls back to embedded item data)
  • For gathering/: Individual files are optional (falls back to resources.json)

Duplicate Detection

The loader validates that no item ID appears in multiple category files:
This prevents data conflicts and ensures each item has a single source of truth.

Best Practices

Use bronze_sword not sword1. IDs should be self-documenting.
Use snake_case for IDs: mithril_platebody, oak_logs, raw_shrimp
Use tier property instead of manually specifying requirements for standard equipment.
Don’t embed recipe data in items.json - use dedicated recipe manifest files.
Verify level requirements, XP values, and item interactions work as expected.