Manifest-Driven Design
Hyperscape uses JSON manifests for game content. Add new NPCs, items, stores, and world areas by editing JSON files inpackages/server/world/assets/manifests/.
No code changes required—just edit the JSON manifest files and restart the server.
Content Files
All manifests are inpackages/server/world/assets/manifests/:
Core Manifests
| File | Purpose |
|---|---|
npcs.ts | NPC and mob definitions |
items.ts | Item properties and stats |
banks-stores.ts | Shop inventories |
world-areas.ts | Zone configuration |
skill-unlocks.ts | Level requirements |
avatars.ts | Character models |
quests.json | Quest definitions with stages and rewards |
stations.json | Crafting stations (anvils, furnaces, ranges, banks) |
Adding NPCs
NPCs are defined with combat stats, drops, and spawn locations:Difficulty Levels
| Level | Examples |
|---|---|
| 1 | Goblins, Bandits, Barbarians |
| 2 | Hobgoblins, Guards, Dark Warriors |
| 3 | Black Knights, Ice Warriors, Dark Rangers |
Adding Items
Items include equipment, resources, and consumables. Add to the appropriate category file initems/ 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 atier property automatically derive level requirements from tier-requirements.json:
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
Edit Manifest
Add your content to the appropriate JSON file in
packages/server/world/assets/manifests/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 toresources.json)
Duplicate Detection
The loader validates that no item ID appears in multiple category files:Best Practices
Use descriptive IDs
Use descriptive IDs
Use
bronze_sword not sword1. IDs should be self-documenting.Follow naming conventions
Follow naming conventions
Use snake_case for IDs:
mithril_platebody, oak_logs, raw_shrimpLeverage tier system
Leverage tier system
Use
tier property instead of manually specifying requirements for standard equipment.Keep recipes separate
Keep recipes separate
Don’t embed recipe data in items.json - use dedicated recipe manifest files.
Test thoroughly
Test thoroughly
Verify level requirements, XP values, and item interactions work as expected.