Repository navigation
Conversation
A rule can place a closed-faction player on the open side most of their clan is on, while that leaves the side at most N players ahead of the other (1 to 10; absent or 0 keeps today's behaviour). A clan is the tag in square brackets at the front of the name, folded for case. Moves in flight count, so a clan that lands on the closed faction together at a match start follows its first member. A clan split evenly, or one that would put a side further ahead than the gap, is placed on the smaller side as before, and so is any move asked for a second time, so a clan move that does not land costs nothing new. The setting is left out of the config when off, so a rule saved before it existed keeps its fingerprint when saved again and its queued moves are not dropped. A move decided by a clan says so in its audit line and detail. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KVnrnLs54SCrQzy3JDv3mz
Contributor
Author
|
Closing: Team balance (merged 2026-10-01) covers this. It keeps clan tags together within the gap, which is what this PR added to Two-team mode. Thanks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
An optional setting on the Two-team mode rule: keep clans together. A player moved off the closed faction is placed on the open side most of their clan is on, while that leaves the side at most N players ahead of the other. Off by default; a rule without it behaves exactly as it does today.
Why
We are looking at running a 50v50 round on our server with this rule (tested live this morning: closed Lonestar, moved and whispered as expected). The one thing players lose compared with a normal round is that a clan joining together is split across the two sides, because each of them is placed on whichever side is smaller at that moment. Groups that turn up to play together are the people most likely to leave over that.
How it places
[WOLF] Dan, folded for case and width, twelve characters at most (clanTag).clanGapahead of the other. Otherwise the player goes to the smaller side, as now.It still never moves anyone between the two open sides, so this changes only where a closed-faction player lands.
Setting and compatibility
clanGapon the rule's config, 1 to 10 (TWO_TEAMS_MAX_CLAN_GAP).validateTwoTeamsleaves the key out when it is 0, so a rule saved before the setting existed keeps the same settings fingerprint when it is saved again, and its queued moves are not dropped.Moved [WOLF] Dan to Red, with [WOLF]., andclanin the audit detail.Tests
two-teams.test.ts:clanTag; a rule without the setting is unchanged; joining the clan's side though it is larger; a clan arriving together; members in flight counting at the next look; the gap as a hard limit; an evenly split clan; a second ask going to the smaller side; validation and the fingerprint staying the same when off.triggers-two-teams.test.ts: the move intent's faction, message and detail with a clan.CI on my fork (jbob06#3, opened only for CI and now closed), with the TimescaleDB service as in
ci.yml: lint, check andbun testgreen, 995 pass, 0 fail.Not tested
main, with two players on.Prior art
The idea of a clan preference bounded by a gap is from SIXFIVE's balancer (AE-WD-BATTLESUITE/WARDOGS-RVG-50v50, MIT). No code is taken from it. Two differences: that one counts a clan from the player list at the start of a pass, so clan members placed in the same pass do not see each other, and here moves in flight and moves decided this look count; and here a refused clan move falls back to the smaller side.
🤖 Generated with Claude Code
https://claude.ai/code/session_01KVnrnLs54SCrQzy3JDv3mz