addonsVersion 1.0.0: First release.
README.txtVersion 1.0.0: First release.
README.txt3 KB
No file matches.
Automatic Team Balance 1.0.0 (olds.ro)
======================================
Keeps the teams even. When a round ends with one team bigger than the other
by more than olds_tb_diff players, players are moved from the bigger team to
the smaller one, at most olds_tb_maxmoves players per round end. Moved
players are not killed: they start the next round on their new team, with
their score kept. Everyone reads one chat line per move.
Requirements
- ReHLDS, ReGameDLL_CS, Metamod-R, ReAPI
- AMX Mod X 1.10 or newer (written and tested on 1.10.0.5490)
- mp_autoteambalance 0 in server.cfg, so the game does not balance the
teams as well (the plugin prints a notice in the server console if it
is on).
Install
1. Compile scripting/olds_teambalance.sma and copy olds_teambalance.amxx to
addons/amxmodx/plugins/. The compiler needs ReAPI's include files
(reapi.inc and the reapi_*.inc files from the ReAPI release) next to the
stock AMX Mod X includes.
2. Copy data/lang/olds_teambalance.txt to addons/amxmodx/data/lang/.
3. Copy configs/plugins/olds_teambalance.cfg to addons/amxmodx/configs/plugins/
(if it is missing, the plugin writes it with the default values).
4. Add olds_teambalance.amxx to addons/amxmodx/configs/plugins.ini.
How players are chosen (always from the bigger team)
- olds_tb_skill 0: players who are dead when the round ends before living
ones; among them the lowest score (frags); on a tie, the one who died
first.
- olds_tb_skill 1: the player whose move brings the two teams' skill
totals (each team's sum of frags minus deaths) closest together; on a
tie, the order above.
- The bomb carrier and the VIP are never moved.
- Spectators are not counted and never moved.
- Teams of equal size, or within olds_tb_diff, are left alone, and no
message is printed.
When it runs
At every round end the game itself makes (ReAPI hook RG_RoundEnd): a team
wiped out, the time running out, the bomb, a rescue, and also sv_restart.
A round ended by another plugin through rg_round_end does not pass that
hook, so no balancing happens there.
Settings (addons/amxmodx/configs/plugins/olds_teambalance.cfg)
olds_tb_diff 1 largest allowed difference between the team sizes (1 - 31)
olds_tb_skill 0 1 = choose by skill (frags minus deaths), 0 = by score and death order
olds_tb_maxmoves 2 most players moved at one round end (0 = balancing off, up to 31)
olds_tb_warn 1 1 = announce each move in chat, 0 = move players silently
Commands
None.
Tested on ReHLDS 3.15.0.896, ReGameDLL_CS 5.30.0.814, Metamod-R 1.3.0.149,
AMX Mod X 1.10.0-git5490, ReAPI 5.29.0.358, with bots: even teams left
alone, 6 vs 3 balanced with one move, the dead player with the lowest score
chosen first, the one who died first on a tie, the bomb carrier never
moved, the move limit, skill mode, and silent mode.
No sounds, models or sprites are added.
Credits and licence
Written from scratch by alexit (olds.ro workshop) for workshop card LIB-2193.
Licence: GNU GPL version 3 or later (GPL-3.0-or-later).