-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allocate players to teams depending on ranking. #37
Comments
I think player allocation to team is coded in core ctf_pvp_engine in function https://github.com/rubenwardy/ctf_pvp_engine/blob/e2a59cef6eba80464af5414d89c4e1c6fbfd597c/ctf/teams.lua#L264 |
For new matches, the place to modify is where it calls autoalloc either in ctf_map or ctf_match, I forgot. The list of players should be sorted based on ranking, then slightly randomised some how |
I don't think this is that easy, because players are able to join and to leave team in the middle of the fight. For such players it is better to allocate them to team with minimal total score of its members. In case of huge difference between scores of different players, we can use logarithm of score. |
I don't think that matters - I propose to save the names of the allocated players to a 'list' at the start of a new match, which is preserved for the whole duration of the match, so if they try to intentionally switch teams in the middle of a match, they'll be automatically assigned to the same team they left (as their name is still present in the list). If any new players join, they'll be allocated to the team with a lower cumulative score, and their names added to the aforementioned 'list'. |
It can possibly lead to abuse:
|
@rubenwardy Re-open please! :) |
This has been implemented |
But we've already discussed that it doesn't work; unless you've had another go at modifying the code... |
The text was updated successfully, but these errors were encountered: