SourceNameStatusDatabase
SourcelobbiesstableNo

Authors

Dependencies

Installation

CLI
opengb module add lobbies

Config

Schema

export interface Config {
  lobbies?: {
    destroyOnEmptyAfter?: {
      [k: string]: any;
    };
    unreadyExpireAfter?: number;
    maxPlayers?: number;
    maxPlayersDirect?: number;
    enableDynamicMaxPlayers?: {
      [k: string]: any;
    };
    enableDynamicMaxPlayersDirect?: {
      [k: string]: any;
    };
    enableCreate?: boolean;
    enableDestroy?: boolean;
    enableFind?: boolean;
    enableFindOrCreate?: boolean;
    enableJoin?: boolean;
    enableList?: boolean;
    backend?: {
      [k: string]: any;
    };
    [k: string]: any;
  };
  lobbyRules?: any[];
  players?: {
    maxPerIp?: {
      [k: string]: any;
    };
    maxUnconnected?: {
      [k: string]: any;
    };
    unconnectedExpireAfter?: number;
    autoDestroyAfter?: {
      [k: string]: any;
    };
    [k: string]: any;
  };
  [k: string]: any;
}

Default

{
    "lobbies": {
        "destroyOnEmptyAfter": 60000,
        "unreadyExpireAfter": 300000,
        "maxPlayers": 16,
        "maxPlayersDirect": 16,
        "enableCreate": false,
        "enableDestroy": false,
        "enableFind": true,
        "enableFindOrCreate": true,
        "enableJoin": true,
        "enableList": true
    },
    "lobbyRules": [],
    "players": {
        "maxPerIp": 8,
        "maxUnconnected": 128,
        "unconnectedExpireAfter": 60000,
        "autoDestroyAfter": 4147200000
    }
}

Scripts

Public

Internal

Errors

  • Lobby Already Ready (lobby_already_ready) Lobby already set as ready.
  • Lobby Create Missing Players (lobby_create_missing_players) When creating a lobby with config.lobbies.autoDestroyWhenEmpty, a lobby must be created with players in order to avoid creating an empty lobby.
  • Lobby Full (lobby_full) No more players can join this lobby.
  • Lobby Not Found (lobby_not_found) Lobby not found.
  • More Players Than Max (more_players_than_max) More players were passed to the create lobby than the number of max players in a lobby.
  • No Matching Lobbies (no_matching_lobbies) No lobbies matched the given query.
  • Player Already Connected (player_already_connected) The player has already connected to this server. This error helps mitigate botting attacks by only allowing one scoket to connect to a game server for every player.
  • Player Disconnected (player_disconnected) The player has already disconnected from the server. Create a new player for the specified lobby using the join script.
  • Too Many Players For IP (too_many_players_for_ip) The player has too many existing players for the given IP.