Back to Projects

SquadJS Server Management Suite

Three integrated MIT-licensed plugins for the SquadJS framework. TrueSkill ratings, skill-aware team balancing, and intelligent player assignment with sub-2s verified swaps.

Featured
Category

Backend Tooling

Released

September 2025

JavaScript Node.js SQLite TrueSkill Discord API Backend Open Source

Overview

SquadJS is an open-source scripting framework that abstracts RCON communication and log parsing for Squad game servers. I built three production-grade plugins for SquadJS that form an integrated skill management system: EloTracker (TrueSkill rating engine), TeamBalancer (skill-aware team scrambling), and SmartAssign (intelligent player assignment). Deployed on live 100-player competitive servers, the system tracks player skill, rebalances teams with a 4-phase exhaustive search algorithm, and assigns joining players in under 2 seconds, all while maintaining transparent, auditable state through SQLite persistence and Discord integration.

Role: Developer of all three plugins. Core architecture and implementation for skill pipeline.

View on GitHub


The Problem

Squad is a 100-player tactical shooter where communities run their own servers. There’s no matchmaking, no skill-based team assignment, and no official balancing tools. The result is a well-known vicious cycle: players migrate toward the winning team, skill distribution compounds, and matches devolve into unplayable stomps. In a game where a single match runs over an hour, that’s a serious problem. Existing community tools addressed this with random scrambles triggered by manual admin intervention. Random scrambles ignore skill entirely and frequently make things worse. Manual intervention requires an active, attentive admin. Neither solution scales, and neither addresses the root cause.

The Solution

I built a suite of three integrated plugins for SquadJS that automate the full skill management lifecycle: tracking player skill over time, rebalancing teams autonomously when imbalance is detected, and routing joining players intelligently from the moment they connect. The system is autonomous, auditable, and designed to be trusted by both admins and players.


EloTracker: TrueSkill Rating Engine

The foundation of the suite. EloTracker tracks player skill using a full TrueSkill implementation, producing stable ratings across thousands of rounds of competitive play, currently tracking over 12,000 players on a single server. TrueSkill wasn’t designed for 50v50. It was built for much smaller team sizes where individual contribution is more legible and uncertainty behaves differently. Tuning the core parameters for large-team play required collecting real game data, testing offline, and verifying rating stability before deploying on live servers. Ratings update based on team outcome rather than individual performance, with participation weighting so late joiners and early leavers don’t receive full rating adjustments.

The system persists ratings across server restarts via SQLite, exposes a public leaderboard and per-player lookup through Discord, and serves live skill data to TeamBalancer and SmartAssign via in-memory cache.


TeamBalancer: Skill-Aware Scramble Engine

TeamBalancer detects and corrects skill imbalance autonomously, triggering scrambles based on a tiered system: a single dominant stomp, consecutive dominant wins, or a configurable win streak threshold. The trigger logic went through several iterations based on real server admin feedback. The scrambler runs an exhaustive search across 2000 iterations, escalating through four phases from pure squad swaps to full decomposition, preserving squad cohesion as long as possible. With EloTracker data available, it switches to skill-weighted scoring entirely, preventing skill stacks from reforming.

The hardest constraint was timing. Scrambles must fully execute before faction voting locks team changes, a window the game engine controls and doesn’t expose. When OWI silently changed the end-game phase behavior, the plugin broke on live servers. Diagnosing and hardening against that required reverse engineering the phase transitions entirely from log observation. Clan tag detection presented its own surface area: five detection strategies, Unicode normalization, and Levenshtein edit-distance merging to group players whose clan tags are stylistic variations of the same identity.


SmartAssign: Intelligent Player Assignment

SmartAssign routes joining players to the team that minimizes skill disparity, places clan members with their teammates, and returns disconnected players to their previous team. All within a 3-second window before the player fully loads in. Missing that window means the player sees themselves get moved, which breaks the illusion entirely.

The core technical challenge was state synchronization. SquadJS events and the server’s player list are out of sync by design. Leaves aren’t registered until the next 30-second RCON refresh cycle. SmartAssign force-polls after every join event, infers departures, and makes assignment decisions on a consistent state rather than trusting the framework. Getting the assignment algorithm right required weeks of production data. Full lifecycle logging captures every join, leave, and team change, which made it possible to run a parameter search offline and find the balance between reconnect priority, clan grouping, and ELO parity without breaking player expectations on a live server.


Integration

The three plugins form a coherent system. EloTracker maintains a live in-memory skill cache that both TeamBalancer and SmartAssign query automatically. Each plugin degrades gracefully if another is absent, falling back to population-based logic without breaking. Discord provides unified reporting and admin control across all three. All persistent state is backed by SQLite, with MySQL and Postgres support via Sequelize.

Every balance decision, swap, and assignment is logged. Admins can verify exactly why any player was moved.