Server Talk > Scripting Releases

cube v1.6.1 - CTF/INF Ultimate Balancer

(1/11) > >>


script name: cube, or ctf/inf ultimate balancer
short description: pretty complex team balancer + a few teams-related things
original author: fri
core 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: (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

best balance script there is

sounds promising, hoping that most servers will switch to it.

As for the name:
Ctf Ultimate BalancEr?
Ctf Ultimate Balance Enhancer?

Version 0.5b is now available.

Changes 0.5 -> 0.5b:
added: fifth method - choosing player with no caps and worst k/d ratio. if it fails - least caps; it's the default method now
modified: balance won't trigger in the last 10 seconds of a map to avoid wrong map version problems
modified: the !alpha-like triggers won't work in the last two seconds of a map

I'm still open to suggestions and feature requests.


--- Quote ---5v5, 8:0 -> one player from Alpha moved to Bravo, because Alpha is definitely too strong
--- End quote ---
In situations like this I'd rather see swapping best player from alpha with worst player from bravo. I dislike any situations where there's difference between teams greater than 2. In my opinion 6vs4 is unbalanced and it's like your Cube was flawed but it's for sure superior.


[0] Message Index

[#] Next page

Go to full version