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

NPCs:
Stations:
Fishing Tools:
Mining Rocks:
Vegetation:

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 Models

3D models for crafting stations in the assets repository:

Crafting Stations

Stations are defined in stations.json:
  • Anvil - Used for smithing bars into equipment
  • Furnace - Used for smelting ores into bars
  • Cooking Range - Used for cooking food (reduces burn chance)
  • Bank Booth - Used for accessing bank storage
Each station defines its 3D model, scale, position offset, and examine text.

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:
Vegetation Categories:
  • tree - Large trees
  • 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)

Biome Vegetation Layers

Biomes in biomes.json define procedural vegetation layers that reference vegetation assets:
Recent Updates:
  • 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)

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

Manifest Refactor (PR #3)

The manifest system was recently refactored for better scalability and organization:
  • Items split by type: Weapons, tools, resources, food, 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, and firemaking
  • 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.