Skip to main content

Constants Reference

This page documents all game constants used throughout Hyperscape. These values are defined in packages/shared/src/constants/.

Combat Constants


Aggro Constants


Level Constants


Player Constants

Stamina Mechanics (Client-Side)

Stamina is calculated client-side in PlayerLocal.ts with the following rates:
Drain Formula:
Regen Formula:
Examples:
Weight is calculated server-side and synced to the client via PLAYER_WEIGHT_CHANGED events. This ensures stamina calculations use accurate, server-authoritative weight values.

Inventory Constants


Network Constants


Gathering Constants


XP Constants


Style Bonuses


Skills


Smithing Constants


Context Menu Colors

All context menu handlers now use these centralized constants instead of hardcoded values. This ensures consistency across all interaction types.

Raycast Proxy Constants

Performance: VRM SkinnedMesh raycast is extremely slow (~700-1800ms) because THREE.js must transform every vertex by bone weights. Invisible capsule proxies provide instant click detection.

Equipment Slots


XP Table Reference