[NuclearDawn] Team Balancer
by databomb
This plugin overrides the in-game team balancer and provides a new balancer which looks at the rank of each player and makes sure the teams are even in skill.
How does it work?
Every 30 seconds a check is performed to see if the total skill level on each team is within an acceptable margin. If it's not then the least skilled and most skilled players are swapped.
Skill? How is that determined?
Skill is determined by an exponential algorithm based on rank. This system is designed so a team of rank 59 and 1 would not be considered the same as a team of two rank 30s. (The default settings make it so a rank 59 and 1 would be equivalent to two rank 15s.) There's also a general bonus provided for each player so that a team who is down 2 players will have less skill. Bots are accounted for in skill calculations and are assigned a negative value (all humans will have positive values).
I keep getting swapped! HELP!!
There are a few things you can do to prevent yourself from being swapped:
- Play on the map longer than the other players
- Be active with your team and the strategy
- Getting swapped (yes! if you were already swapped then it's very unlikely you'll get picked again)
Special Thanks:
Snivilous for explaining some initial pitfalls with compnerds's team balancer.
Kateana for testing and help.
Features:
Admin command (sm_stacked | !stacked) to check team skill levels.
Admin command (sm_swap | !swap) to manually swap players.
Admin command (sm_spec | !spec) to manually move idle players to spectator team.
Admin command (sm_unstack | !unstack) to immediately force a team balance.
Light-weight algorithms quickly determine the relative skill of all players.
Warns a player they're about to be swapped in 30 seconds.
Provides visual feedback to the players who are swapped.
Prevents players who are swapped from joining their previous team.
Future Plans:
Add cvars to fine-tune the balancing algorithms.
Add admin immunity.
Change History:
v 1.0.0 Initial Release
v 1.0.1 Added admin commands to check skill and manually swap
v 1.0.2 Prevents stats hit from swapping, Displays spawn menu after swap, and Makes swapped players less likely to get swapped in the future
v 1.0.3 Added new check for unbalanced but unstacked condition and changed the least skilled algorithm
v 1.0.7 Updated to 80 Max Rank, Added anti-stack blocking, Improved algorithm, !spec command