Create lobbies on demand and only list servers on the player's version

When a player connects with a Factorio version and set of built in mods
no lobby runs, the lobby plugin now creates one on a connected host that
has the version installed or can download it, with a mod pack matching
the player's built in mods. This lets a cluster accept players on
several Factorio versions on the same port without any setup. It can be
turned off with lobby.auto_create.

To pick the mod pack the proxy now waits for the whole connection
confirm before routing and passes the mods listed in it to the
playerProxyRoute hook. Hosts answer the new HostFactorioVersionsRequest
with the versions they have installed.

The server list in lobbies only shows instances on the Factorio version
of the lobby, with a checkbox to also show the others greyed out.
This commit is contained in:
Danielv123 committed 2026-10-29 20:54:11 +01:00
1 parent a5bd43637e
commit 00823262d5
14 files changed
+582 -39

No files matched your search

+9
View File
@@ -4,6 +4,7 @@ import * as messages from "./messages.js";
declare module "@clusterio/lib" {
export interface ControllerConfigFields {
"lobby.auto_create": boolean;
"lobby.server_browser_listing": boolean;
"lobby.server_browser_name": string | null;
"lobby.server_browser_description": string;
@@ -27,6 +28,14 @@ export const plugin: lib.PluginDeclaration = {
instanceEntrypoint: "dist/node/instance.js",
controllerConfigFields: {
"lobby.auto_create": {
title: "Create Lobbies",
description:
"Create a lobby when a player connects to the player proxy with a Factorio version and built in " +
"mods no lobby runs, on a connected host that has that version installed or can download it.",
type: "boolean",
initialValue: true,
},
"lobby.server_browser_listing": {
title: "Server Browser Listing",
description: