Add AutoTeamBalance configuration setting
The use case for this settings is when a pre-made team wants to practice with each other in separate discord channels and not automatically switch sides all the time.
- Setting it to AutoTeamBalance=False disables team balancing at the end of the round.
- The default value of AutoTeamBalance is True just like today.
Some questions
- What is the purpose of having both scramble and balance?
- Why is there two different balancing methods CounterTerroristTeamBalance (after I extracted it) and TeamBalance? They will both run if CT wins.
To answer your questions:
- The balancing logic is to ensure that each team has the correct number of players (if people leave mid way through the round etc we need to ensure teams are still as expected)
- This particular part of the application was tedious to test / implement which made the final working solution a pretty mixed combination of things. It's likely that
The two types of logic are:
- Handle balancing when players win (swap least impactful t player / most impactful ct player depending on which teams need more players)
- Handle swapping of players to ensure target team sizes (also do it based on round score)
It's for this reason that this change / config variable may not be the best way to represent what people are after. However, I do think there are positives to this change.
I think writing these changes we could keep in mind that people may want to write their own third party team balancing solutions. Although, in my experience finding people that actually want to write these changes is hard.
@kraigher I'm going to close this for now. Happy for these changes to be fixed and implemented, see my previous response.