New controller plugin that maps clusterio roles to Discord roles and gives them to players linked through exp_discord_auth. The mapping is edited in a Discord Roles section on the role page, which needs the new exp_discord_sync.mapping.update permission. The guild's roles fill a dropdown, and typing a role ID still works when the bot can't list them. Discord is reached with Node's fetch and WebSocket, no library. REST requests go one at a time and wait out 429 and exhausted rate limits. A minimal gateway connection with the Server Members intent gives roles on guild join. It identifies again instead of resuming, and every READY syncs all linked accounts, which covers startup and joins missed while disconnected. Without the intent the gateway is dropped and syncing carries on over REST. Syncs run on link, unlink, clusterio role change, guild join, mapping change and connect. Only mapped Discord roles are ever added or removed. exp_discord_auth may load after this plugin, so it is looked up and its hooks attached when the first sync runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
10 KiB
ExpGaming Clusterio Repository
Explosive Gaming
Explosive Gaming (often ExpGaming) is a server hosting community with a strong focus on Factorio and games with similar themes. We are best known for our weekly reset Factorio server with a vanilla+ scenario where we add new features and mechanics that are balanced with base game progression. Although our servers tend to attract the more experienced players, our servers are open to everyone. You can find us through our website, discord, or the public server list with the name ExpGaming.
Installation
This is a plugin collection for Clusterio which implements all our scenario features.
To use this plugin you must have a clusterio instance running, see here for clusterio installation instructions.
These plugins can then be installed via npm install or using npx clusteriocontroller plugin install. See our plugin list for all the plugins which are available.
Building from source
- Create a
external_pluginsdirectory within your clusterio instance. - Clone this repository into that directory:
git clone https://github.com/explosivegaming/ExpCluster - Install the package dev dependencies:
pnpm install(pnpmis recommended overnpm) - Add supported plugins will be loaded on next controller / host restart.
Plugins
Each plugin has a readme in its folder with its config, permissions and API.
| Plugin | Description |
|---|---|
| Scenario (@expcluster/scenario) | The ExpGaming scenario. Adds the commands, guis and control modules, each feature configurable from the web interface. |
| Roles (@expcluster/roles) | Mirrors clusterio roles into the game, and grants roles by online time. |
| Permission Groups (@expcluster/permission-groups) | Syncs Factorio permission groups, and puts players in a group based on their roles. |
| Player Statistics (@expcluster/player-statistics) | Counts statistics such as kills and machines built for each player, across every server. |
| Reports (@expcluster/reports) | Lets players report each other in game or from the web interface, with optional Discord and JSON webhooks. |
| Server List (@expcluster/server-list) | Shares the details of every instance with the others, for the server list in game. |
| Discord Auth (@expcluster/discord-auth) | Log in to the web interface with Discord, and link Factorio accounts to a Discord account. |
| Discord Sync (@expcluster/discord-sync) | Gives linked players the Discord roles mapped to their clusterio roles. |
| Auto Restart (@expcluster/auto-restart) | Restarts hosts, and optionally the controller, that need a restart once nobody is playing on them. |
| Server UPS (@expcluster/server-ups) | Shows the UPS the server is running at, toggled with /server-ups. |
| Commands (@expcluster/lib_commands) | Lua library for commands with typed arguments, aliases and permission checks. |
| GUI (@expcluster/lib_gui) | Lua library for defining guis and the toolbar. |
| Module Utilities (@expcluster/lib_util) | Lua library with storage, tasks spread over ticks, selection tools and other helpers. |
The last three are libraries the other plugins use. The scenario needs Roles, Reports, Server List, Player Statistics and the three libraries, and seeding its roles also needs Permission Groups.
Contributing
See Contributing for how to make pull requests and issues.
Details of the scenario can also be seen on Wiki.
For the locale, access to Translation.
Releases
| Release* | Release Name | Factorio Version** |
|---|---|---|
| 7.0.2 | Clusterio Plugin (Release) | 2.1.22 |
| 7.0 | Clusterio Plugin (Beta) | 2.1.7 |
| 6.4 | Farewell Factorio 1.1 | 1.1.110 |
| 6.3 | Feature Bundle 2: Electric Boogaloo | 1.1.101 |
| 6.2 | Mega Feature Bundle | 1.1.32 |
| 6.1 | External Data Overhaul | 1.0.0 |
| 6.0 | Gui / 0.18 Overhaul | 0.18.17 |
| 5.10 | Data Store Rewrite | 0.17.71 |
| 5.9 | Control Modules and Documentation | 0.17.63 |
| 5.8 | Home and Chat Bot | 0.17.47 |
| 5.7 | Warp System | 0.17.47 |
| 5.6 | Information Guis | 0.17.44 |
| 5.5 | Gui System | 0.17.43 |
| 5.4 | Admin Controls | 0.17.32 |
| 5.3 | Custom Roles | 0.17.28 |
| 5.2 | Quality of life | 0.17.22 |
| 5.1 | Permission Groups | 0.17.13 |
| 5.0 | 0.17 Overhaul | 0.17 |
| 4.0 | Softmod Manager | 0.16.51 |
| 3.0 | 0.16 Overhaul | 0.16 |
| 2.0 | Localization and clean up | 0.15 |
| 1.0 | Modulation | 0.15 |
| 0.1 | First Tracked Version | 0.14 |
* Scenario patch releases have been omitted and can be found here.
** Factorio versions show the version they were made for, often the minimum requirement to run the scenario.
License
The Explosive Gaming codebase is licensed under the MIT