Skip to content

Modules

aevien@hotmail.com edited this page Aug 25, 2026 · 1 revision

Modules

MST modules are optional authoritative services discovered and initialized by a ServerBehaviour. Add only the modules required by the active process.

Built-In Modules

Module Responsibility Detailed documentation
Authentication Accounts, sessions, guest/token login, recovery, service bindings, duplicate sessions, and blocks README
Profiles Observable profile schema, synchronization, dirty updates, queued saves, and confirmed saves README
Rooms Room registration, listings, access tokens, and room-player tracking README
Spawner Spawner registration, allocation queues, room process launch, watchdogs, and finalization README
Lobbies Lobby factories, teams, members, ready state, chat, and optional room spawning README
Matchmaker Aggregated games and regions from lobby, room, and spawner providers README
Chat Channels, direct messages, membership, permissions, invitations, bans, and history README
Groups Persistent groups, membership, roles, and invitations README
Notification Targeted and room-wide notifications README
Remote Config Small server-owned key/value configuration exposed to clients and rooms README
Achievements Generic achievement definitions, progress, and completion README
Leaderboards Server-authoritative score submission, seasons, ranking, and persistence README
Quests Generic quest state and progress README
Analytics Buffered analytics events and database persistence README
Censor Dictionary-based text filtering and configurable matching rules README
Ping Connection latency and health requests README
World Rooms Persistent world/room mapping README
Web Server and Dashboard HTTP routes, controllers, administration pages, and module details Web Server / Dashboard

Initialization

With Look For Modules enabled, the server discovers BaseServerModule components and initializes them in dependency order. Look In Children Only limits discovery to the server hierarchy.

Required dependencies block initialization when unavailable. Optional dependencies influence order when present but do not prevent startup when absent. One failed independent module does not prevent unrelated modules from starting.

Adding a Module

Before writing a new module:

  1. Confirm the behavior does not belong in an existing module or game-specific integration.
  2. Define the authoritative owner and all required permissions.
  3. Add packet opcodes to MstOpCodes and preserve serialization order.
  4. Register handlers in Initialize(IServer).
  5. Put per-server-run resources in the run lifecycle methods.
  6. Expose useful diagnostics through Info() and Details().
  7. Add focused EditMode tests and a README beside the implementation.

See the server runtime specification for lifecycle and shutdown contracts.

Clone this wiki locally