TF2 Advanced Vote Scramble 1.1
This plugin allows players and admins to initiate a team scramble, which will shuffle players between red and blue teams. This plugin differs from the existing "Vote Scramble" plugin in two major ways:
1) It does not rely on the mp_scrambleteams command but uses a custom algorithm which does not influence the state of the map.
2) It does not bother every user with a vote menu, but will rather function like RTV. A scramble will run when enough players have said !scramble in chat.
It happens more than once that teams are unbalanced, which is boring for both teams. Players often request that the teams are balanced, but there may not always be an administrator available. This plugin attempts to solve this problem.
How it works (players)
A player can type a command, such as !scramble or !teamscramble. Once enough players have voted (a certain percentage), a scramble will run. Players will be shuffled and be respawned. The map will NOT reset and the game will continue at its previous state.
How it works (admins)
Admins can force a scramble by using the sm_scramblenow command (or by typing: !scramblenow). They can reset a scramble in progress by using sm_scramblereset (!scramblereset). There are a number of cvars to control the working of this plugin.
Current shuffling algorithm
There are currently two algorithms implemented:
1) All players are randomly assigned a team. This is no longer the default algorithm.
2) All players are randomly assigned a team, but also makes sure that a minimum amount of players is swapped. This prevents that the scramble pretty much creates the same (unbalanced) teams. To be more concrete: the plugin (by default) attempts to change at swap at least 35% of the players and at most 50%. The exact value is determined randomly. Default algorithm as of version 1.1
* Game state remains unchanged.
* Does not mess with the timelimit.
* No voting menu required, but works like RTV instead.
* Admins can force a scramble.
* Can/has be translated.
* Admin actions and the result of the scramble are logged.
* Ensures that the teams actually change.
* Sourcemod 1.1 or higher
* Team Fortress 2
* Download the zip file and extract the files to their respective directories in your sourcemod folder.
* Load the plugin
* Recommended: Go to your tf/cfg/sourcemod/plugin.votescramble.cfg file and edit the variables to your liking.
Upgrade from 1.0 to 1.1
* Download the zip file and extract the files to their respective directories in your sourcemod folder (overwriting the old version of the plugin)
* Optionally delete tf/cfg/sourcemod/plugin.votescramble.cfg so it will be re-created and include the new cvar sm_scramble_words
* Load the plugin
* Set the value of sm_scramble_words if needed. Version 1.0 used !votescramble by default, to prevent conflicts with other plugins the new cvar is used.
Convars and commands
- After a scramble has been initiated, this amount of seconds must pass before the scramble is executed. (default 5)
- Minimum amount of players to be playing before the scramble can be selected (default 3)
- Minimum percent of people who should have voted before scramble will take effect (default 0.65)
- Scramble algorithm that is to be used. (default 2)
- Minimum time left on the map. If less is remaining, the vote cannot start. (default 0)
- Minimum time which should have passed before the vote can be activated. (default 300)
- Comma seperated list of words that will allow players to vote for scrambling (such as: !scramble, scramble, !teamscramble).
- Scramble the teams.
- Reset the scramble vote. Aborts a scramble if it's in progress and resets all player votes.
* This plugin can be configured to use the !scramble chat command. Please ensure that there are no other plugins defining 'sm_scramble'. Plugins that do may interfere when an admin says !scramble. You can solve this situation by changing the sm_scramble_words
convar or unloading the other plugin.
* Admin flag needed to execute the commands is ADMFLAG_KICK.
1.1 - January 11, 2009
? Fixed bug where config file would not be loaded on server startup.
? Players are no longer moved to spectator first.
+ Added convar to choose trigger words. Done to avoid conflicts with other plugins.
+ Added HUN translation (thanks to KhyrOO).
+ Added POL translation (thanks to Zuko).
+ Added event handling for changes in convar values.
+ Performance of scramble is logged (as in, amount of players swapped).
+ Added a new (better) algorithm for scrambling
1.0 - initial release