script name: cube, or
ctf/inf
ultimate
balanc
er
short description: pretty complex team balancer + a few teams-related things
original author: fricore version: 2.7.6
longer description:Unlike most balancers you've seen,
cube balances teams
based on the difference in number of players AND team scores.Regular balancers check whether the difference in number of players is greater than 2, and moves a random player to the opposite team if it is.
cube doesn't stop at such a plain check - this is where team scores, swaps and player choosing methods go into play.
features list:- works with CTF and Infiltration gamemodes
- uses seven methods of choosing the player to be moved, including "least caps", "worst k/d ratio", and more
- avoids flag carriers not to ruin the game
- automatically puts new players into weaker team
- gives some "immunity time" to moved players, so they won't be moved again too soon
- disables itself in the last 10 seconds of a map (to avoid "wrong map version" problems)
- supports some well-known triggers such as !alpha, !spec (+aliases), and, of course, !balance (!bal, teams, ...)
- "team-changing" triggers can be disabled or limited to
X uses per player per map
- locks the recenly moved players in their new teams, so they won't fight the system and go back
- in case of a big unbalance, admins can shuffle the teams using one simple command (/mix)
- admins can swap the teams of two or all players at once
- you can exclude some people from the balance by putting their nicknames or HWIDs on the exclusion list
- can keep teams' scores even if all players left (optional)
- (dev) the code is commented and thus fairly easy to understand
Uses Explode function by CurryWurst and Curt.commands list:all players:
!balance, teams - trigger balance
/bal - trigger balance without disclosing who triggered it
!alpha, !1 - go to alpha team
!bravo, !2 - go to bravo team
!spec, !5 - go to spectator team
!join, !j - join weaker team (spec only)
(plus a few aliases of all these triggers/commands)additional commands (admins only):
/swap
ID1 ID2 - swap teams of specified players
/swap all - swap everyone
/mix or /shuffle - shuffle teams
/hwid
ID - show hardware ID of specified player
/exclude
ID - exclude specified player from balancing
/kickbots, /kickspec - kick all bots / spectators
/cubeinfo - shows current info about version, balances, config, etc.
You can test
cube on Bonecrusher's servers, e.g here: 80.72.37.10:23073 (server 2.7.6, cube v1.5).
If you have any suggestions, please post them here.
Have fun!
Changes 1.6 -> 1.6.1:fixed: a terrible bug which rendered /exclude command useless (it excluded the user, not the specified ID)
modified: simplified a bit of logic
Changes 1.5 -> 1.6:added: /exclude ID command for admins, to exclude players for the duration of their visit on the server
added: /cubeinfo command for admins - shows current cube info (version, config, number of balances)
added: a message that shows up if cube could not choose any player to move; you should not see it anyway
added: public messages show current balance status, e.g. 'Teams balanced. [3v2 4:7]'
added: option to make swap ignore the number of flag captures when choosing players
fixed: a bug that caused spectators to be moved to alpha team when /swap all was used
modified: reworked the whole config to make it even clearer
modified: some default values in config
modified: bots are now ignored by cube
modified: excluding now makes people completely immune to cube's effects
modified: colors of some messages
modified: /hwid ID command also works with nicknames
full changelog is in the readme.txt file