r/TagPro • u/happytagpro happy • Aug 20 '14
[Userscript] Fair Teams
This userscript has three, independently disable-able features related to fair teams:
- Automatically switch teams when the usual conditions are met: your team has 2 or more additional players (eg. 4v2 3v1) OR your team has 1 additional player and is winning. I've also added the additional constraint that you aren't currently carrying the flag***.
- If the above constraints aren't met (or if you've disabled the feature), and the other teams has fewer players the entire screen will be slightly tinted to warn you that the teams are unfair. An example scenario for when this might occur is if its 4v3 but the game is tied, or even 4v2 and other other team is winning.
- If the same conditions are met as in feature 1 but in favor of the other team, you can automatically request "can someone switch teams" in chat. I've limited the number of requests per game to 1.
I've also found a small bug. It seems that if you attempt to switch teams while spawning you won't switch, but you still see "[name] has switched to the blue team" in chat without actually switching teams.
CONCERNS: Using auto switching has made me realize just how often people quit mid-game. I end up switching teams very frequently. Its not uncommon to switch twice in one game. Maybe I should delay the switch to wait for others to join before switching? and/or limit switching to once per game?
***Not sure if this is the best constraint. Perhaps instead the constrain should be that both flags are in base. thoughts?
1
u/TagProR3KT <:[ R3KT ]:> || Centra || ( ͡° ͜ ͡°) ♛♚♜ЯƸƘŦ♜♚♛™ ( ͡° ͜ ͡°) Aug 20 '14
the only way for it to work was to track sound?
1
u/Crisis_Averted Nice Aug 23 '14
Sweet userscript! Can you teach me how to change the tint? The effect is a bit too strong fro me, what do i have to change for the effect to be slightly weaker?
0
u/[deleted] Aug 20 '14
[deleted] — view deleted comment