Skip to main content

Manifest-Driven Design

Hyperscape uses a manifest-driven architecture where all game content (NPCs, items, world areas) is defined in external data files rather than hardcoded in logic. This separation enables:
  • Easy content updates — Edit JSON, restart server
  • Community modding — No code changes required
  • AI generation — Generate content with Asset Forge
  • Clean separation — Data vs logic isolation
All manifests are loaded from world/assets/manifests/ at runtime by the DataManager.

Data Architecture

Manifest Files Location


NPCs & Mobs

NPCs are loaded from JSON at runtime into the ALL_NPCS Map:

NPC Data Structure

Each NPC has these properties (from types/entities/npc-mob-types.ts):

Available 3D Models

Mobs (models/mobs/):
NPCs (models/npcs/):
Stations:
Fishing Tools:
Equipment (Aligned Models):
Magic Staffs:
Mining Rocks:
Vegetation:
Miscellaneous Items (models/misc/):
Tree models include LOD (Level of Detail) variants for performance optimization. Each tree type has multiple variants (e.g., fir_01.glb, fir_01_lod1.glb, fir_01_lod2.glb) for different viewing distances. All tree models have been normalized to consistent root depths to prevent floating or sinking into terrain.

NPC Helper Functions

Spawn Constants


Items

Items are loaded from JSON into the ITEMS Map. Items are now organized into separate files by type for better organization:

Item Types & Organization

Tier-Based Equipment

Items now use a centralized tier system defined in tier-requirements.json. Equipment references their tier (e.g., “bronze”, “steel”, “rune”) and the system looks up requirements automatically:
Supported Tiers:
  • Melee: bronze, iron, steel, black, mithril, adamant, rune, dragon
  • Tools: Same as melee (with different skill requirements)
  • Ranged: leather, studded, green_dhide, blue_dhide, red_dhide, black_dhide
  • Magic: wizard, mystic, infinity, ahrims

Item Helper Functions

Shop Items

Bank Notes

The system supports bank notes for stackable versions of items:

Drop Tables

NPCs have tiered drop tables:

Drop Calculation


World Areas

World areas define zones, biomes, and spawn points:

Zone Properties


Banks & Stores

Each starter town has:
  • Bank — Item storage facility
  • General Store — Basic equipment vendor

Stations

Crafting stations are interactive objects that enable processing skills like smithing, smelting, and cooking:

Available Stations

Station entities (Altar, Bank, Range) now load 3D models from the manifest system with automatic fallback to placeholder geometry if models are unavailable.

Station Model Loading

Station entities load 3D models from the manifest system using StationDataProvider:
Station Models:
Fallback Colors:
  • Altar: Purple (0x9932cc)
  • Bank: Black (0x111111)
  • Range: Red (0xcc3333)
All fallback materials now use MeshStandardMaterial for consistent lighting behavior.

Crafting Stations

Stations are defined in stations.json:
  • Anvil - Used for smithing bars into equipment
  • Furnace - Used for smelting ores into bars
  • Range - Used for cooking food (reduces burn chance compared to fires)
  • Bank Booth - Used for accessing bank storage
Each station defines its 3D model, scale, position offset, and examine text. Range Entity: The range is a permanent cooking station that provides better burn rates than fires. Players can use raw food on ranges just like fires, but with reduced burn chance. Ranges are placed in starter towns and other settlements.

Tool Metadata

The tools.json manifest defines tool-specific properties:
  • Skill - Which skill the tool is used for
  • Tier - Tool tier (bronze, iron, steel, etc.)
  • Priority - Tool selection priority (higher = better)
  • Roll Ticks - For mining pickaxes, ticks between roll attempts
This metadata is separate from item definitions to keep tool mechanics centralized.

Skill Progression



Crafting Stations

Stations are defined in stations.json and represent interactive objects in the world used for processing skills:

Available Stations

Stations are placed in world areas and interact with the corresponding recipe manifests (recipes/smithing.json, recipes/smelting.json, etc.).

Tool Metadata

The tools.json manifest defines tool-specific properties separate from item definitions:

Tool Priority System

When multiple tools are available, the system selects the highest priority tool: Woodcutting Hatchets: Mining Pickaxes (also includes rollTicks for mining speed):

Vegetation & Biomes

Vegetation Assets

The vegetation.json manifest defines procedural vegetation assets for world generation:
Recent maxSlope Updates (March 2026):
  • Tundra: 0.8 → 1.8 (increased for terraced terrain)
  • Forest: 0.8 → 1.5 (increased for landscape features)
  • Canyon: 0.6 → 2.5 (increased for steep canyon walls)
Vegetation Categories:
  • tree - Large trees (oak, willow, maple, yew, magic, fir, knotwood, dead, wind_pine)
  • bush - Small bushes and shrubs
  • fern - Ground ferns
  • flower - Decorative flowers
  • grass - Grass patches
  • rock - Decorative rocks
  • fallen_tree - Fallen logs
  • mushroom - Giant mushrooms (added in recent update)
Tree Types:
  • Oak, Willow, Yew, Magic - Standard woodcutting trees with multiple model variants
  • Maple - Autumn trees with warm vermillion red-orange leaves (#D04838)
  • Fir - Coniferous trees for forest biomes
  • Knotwood - Trees with warm amber-colored leaves (#C4832A)
  • Dead - Barren trees for tundra/canyon biomes
  • Wind Pine - Specialized pine tree for tundra biome (single model variant)

Model Bounds System

The model-bounds.json manifest provides pre-calculated bounding boxes and footprints for 3D models:
Purpose:
  • Pre-calculated bounds avoid runtime model loading for collision detection
  • Footprint data used for station placement and terrain flattening
  • Enables efficient spatial queries without loading full 3D models
  • Generated automatically from model files with 1-meter tile size
The model bounds system is used by the terrain flattening system to calculate station footprints and by the collision system for efficient spatial queries.

Biomes

The biomes.json manifest defines terrain biomes with vegetation, mobs, and environmental properties: Available Biomes:
  • Plains - Open grasslands with gentle rolling hills (difficulty 0)
  • Forest - Dense woodland with abundant trees (difficulty 1)
  • Valley - Low-lying areas between hills (difficulty 0)
  • Mountains - High elevation rocky peaks (difficulty 2)
  • Tundra - Frozen wasteland with ice and snow (difficulty 3)
  • Desert - Arid wasteland with sand dunes (difficulty 2)
  • Lakes - Water bodies and fishing spots (difficulty 0)
  • Swamp - Murky wetlands with twisted vegetation (difficulty 1)
  • Canyon - Red-rock canyon lands with terraced mesas and steep slopes (difficulty 2, maxSlope: 2.5)

Biome Vegetation Layers

Biomes in biomes.json define procedural vegetation layers that reference vegetation assets:
Recent Updates (March 2026):
  • Canyon biome added: New red-rock canyon biome with terraced mesas, steep slopes (maxSlope: 2.5), and sparse desert vegetation
  • Model bounds manifest: Pre-calculated bounding boxes and footprints for all 3D models in model-bounds.json for efficient collision detection
  • CORS headers: Cross-origin asset loading support added to CDN (Caddyfile configuration)
  • 165 tree model variants added across 12 tree types (bamboo, birch, cactus, chinaPine, coconut, dead, fir, knotwood, maple, oak, palm, pine) with 3 LOD levels each
  • Tree model depth normalization: All fir variants aligned to fir_03’s minY (-59.46), all maple variants aligned to maple_01’s minY (-114.76) to prevent floating
  • Maple tree recoloring: Leaves changed to warm vermillion red-orange (#D04838)
  • Knotwood tree recoloring: Leaves changed from golden-yellow to warm amber (#C4832A)
  • Terrain biome textures added for TerrainShader rendering (grass, dirt, cliff, desert, snow variants)
  • Woodcutting manifest updated: Replaced 8 generic trees with 12 new tree types using modelVariants arrays
  • Biomes manifest updated: Removed stale tree1 vegetation layers (trees now managed via TreeTypes.ts + woodcutting manifest)
  • Wind Pine tree type added for tundra biome (split from dead tree variants)
  • Mushroom vegetation added to all biomes with varying densities (2-30)
  • Tree density reduced in plains biome (8 → 5)
  • Mushroom clustering varies by biome (cluster size 3-8)
  • Firemaking fire 3D model added (models/firemaking-fire/firemaking-fire.glb)
  • Tree model scales adjusted for better visual proportions

Recipe Manifests

Recipe manifests define crafting, processing, and production activities for artisan skills. All recipes follow a consistent structure with inputs, outputs, tools, level requirements, and XP rewards.

Fletching Recipes

The recipes/fletching.json manifest defines bow and arrow crafting:
Recipe Categories:
  • arrow_shafts - Knife + logs → arrow shafts (15-90 per log)
  • headless_arrows - Arrow shafts + feathers → headless arrows
  • shortbows - Knife + logs → unstrung shortbows
  • longbows - Knife + logs → unstrung longbows
  • stringing - Bowstring + unstrung bow → finished bow
  • arrows - Arrowtips + headless arrows → finished arrows

Crafting Recipes

The recipes/crafting.json manifest defines leather, armor, and jewelry crafting:
Recipe Categories:
  • leather - Needle + thread + leather → leather armor
  • studded - Leather armor + steel studs → studded armor
  • dragonhide - Needle + thread + dragon leather → dragonhide armor
  • jewelry - Gold bar + gems + mould → jewelry (at furnace)
  • gem_cutting - Chisel + uncut gem → cut gem

Runecrafting Recipes

The recipes/runecrafting.json manifest defines rune crafting at altars:
Rune Types:
  • Air (level 1, 5.0 XP) - Accepts rune essence or pure essence
  • Mind (level 2, 5.5 XP) - Accepts rune essence or pure essence
  • Water (level 5, 6.0 XP) - Accepts rune essence or pure essence
  • Earth (level 9, 6.5 XP) - Accepts rune essence or pure essence
  • Fire (level 14, 7.0 XP) - Accepts rune essence or pure essence
  • Chaos (level 35, 8.5 XP) - Requires pure essence only
Multi-Rune System: At specific level thresholds, players craft multiple runes per essence (e.g., 2 air runes at level 11, 3 at level 22, etc.)

Quests

Quests are defined in quests.json and provide structured objectives for players:

Available Quests

Quest Stage Types

  • dialogue - Talk to an NPC
  • kill - Defeat a specific number of NPCs
  • gather - Collect items through skilling
  • interact - Use items or stations (cooking, smithing, etc.)

Adding New Content

1

Choose the right manifest

  • Items: Add to appropriate file in items/ directory
  • Gathering: Add to gathering/woodcutting.json, mining.json, or fishing.json
  • Recipes: Add to appropriate file in recipes/ directory
  • NPCs: Add to npcs.json
2

Follow existing patterns

Use the same structure as existing entries. For tiered equipment, specify the tier field.
3

Generate 3D model (optional)

Use Asset Forge to create a new model, or use existing models
4

Restart server

The DataManager loads manifests on startup
5

Test in game

Verify the new content appears correctly
Do NOT add game data directly to TypeScript files. Keep all content in JSON manifests for clean separation and easy modding.

Recent Changes

New Skills & Recipes (Week 5: Jan 31 - Feb 1, 2026)

Three new artisan skills added with complete OSRS-accurate recipe manifests:
  • Fletching: Arrow shafts, headless arrows, shortbows, longbows, bow stringing, arrow tipping (40+ recipes)
  • Crafting: Leather armor, studded armor, dragonhide armor, jewelry, gem cutting (25+ recipes)
  • Runecrafting: Air, mind, water, earth, fire, chaos runes with multi-rune level thresholds
New Assets:
  • Firemaking fire 3D model (models/firemaking-fire/firemaking-fire.glb)
  • Comprehensive armor manifest with 80+ armor pieces across all combat styles

Manifest Refactor (PR #3)

The manifest system was recently refactored for better scalability and organization:
  • Items split by type: Weapons, tools, resources, food, ammunition, runes, armor, and misc are now in separate files
  • Gathering resources: Woodcutting, mining, and fishing data moved to dedicated files
  • Recipe system: New recipes directory for smelting, smithing, cooking, firemaking, fletching, crafting, and runecrafting
  • Centralized requirements: tier-requirements.json provides OSRS-accurate level requirements
  • Skill unlocks: skill-unlocks.json documents progression milestones

New Vegetation (PR #4)

Mushroom vegetation added to biomes with configurable density, clustering, and spawn parameters.

GitHub Integration

The repository now includes Claude Code GitHub Actions for automated assistance:
  • .github/workflows/claude.yml - Responds to @claude mentions in issues and PRs
  • .github/workflows/claude-code-review.yml - Automated code review on pull requests
  • .github/workflows/update-docs.yml - Automatically updates documentation when manifests change

Detailed Documentation

NPC Data Structure

Complete NPC schema, aggro types, drop tables, spawn constants, and helper functions.

Item Data Structure

Item types, stats, requirements, equipment slots, noted items, and shop items.

Gathering & Crafting

Woodcutting, mining, fishing, smelting, smithing, cooking, and firemaking systems.

Tier Requirements

Centralized equipment and tool level requirements by tier.