thomasleveil / b3-plugin-poweradminbf3

BigBrotherBot Poweradmin plugin for Battlefield 3
https://github.com/courgette/b3-plugin-poweradminbf3/wiki
4 stars 3 forks source link

add a team balancing mechanism #11

Closed thomasleveil closed 12 years ago

thomasleveil commented 12 years ago

this should only work for game modes having 2 teams

teams will be considered unbalanced if there are more players in one of them.

!teams will balance teams instantly !teambalancer <on/off> will start/stop scheduled team balancer

how to pick the players to move to the other team

Different strategies could be made available. A strategy implementation consists in producing an filtered and ordered list of players. Last players in that list will be the ones to move to the other team.

Multiple rules will be applied in a serial manner to produce the filtered ordered player list to choose from. If a rule produces an empy list, then it is ignored.

Level immunity rule: players above a given strategy aren't picked up

This strategy filters out players whose level is above a predefined one.

Preserve squad rule: do not break up squads

This strategy filters out players who are part of a squad of at least two members

team time rule: Latest player to join the team is the first one to be picked up

This strategy is not filtering and only sorts the players based on how long they have been in the team. As it would be very annoying for one to be move back an forth, the team time counter is only reset when one choose to move team. In other words a player who would have join the team because of the bot would not see his team time counter reset. This is to prevent situations where a player would be moved back and forth.