Modding

CrewHub's modding system lets you add custom 3D props, environments, and room blueprints without touching the core codebase. Mods are data-driven — defined as JSON, loaded dynamically.

Registry Pattern

Everything in the 3D world is registered in a typed registry. Mods add entries to these registries:

  • PropRegistry — 3D objects (desks, chairs, plants, custom items)
  • EnvironmentRegistry — world environments
  • BlueprintRegistry — room layout templates

Creating a Custom Prop

{
  "id": "my-mod:coffee-machine-v2",
  "name": "Coffee Machine v2",
  "category": "furniture",
  "model": "box",
  "color": "#8B4513",
  "scale": [0.4, 0.6, 0.4],
  "offset": [0, 0.3, 0]
}

Save as ~/.crewhub/mods/my-mod/props/coffee-machine-v2.json and restart CrewHub.

Custom Environment

{
  "id": "my-mod:office-night",
  "name": "Office at Night",
  "groundColor": "#1a1a2e",
  "skyColor": "#0d0d1a",
  "lightColor": "#4040ff",
  "lightIntensity": 0.6,
  "fogColor": "#1a1a2e",
  "fogDensity": 0.02
}

Loading Mods

Place mod files in ~/.crewhub/mods/<namespace>/. CrewHub scans this directory at startup and registers all valid mod files.

ℹ️

Mod IDs use the same namespace:name format as blueprints to prevent conflicts. Always use a unique namespace.

Sharing Mods

Mods are just JSON files — share them as a zip, GitHub repo, or gist. Community mods can be discussed in the Discord server.