So after reviewing the original ZF code for team selection, I've decided to completely rework how team prefs and team selection works in ZF. It used to be considerably busted and would leave players on the same team round after round in certain cases. So I've redesigned that entire bit of code.
Team selection works a little like this now:
1. All players will get placed into one of three buckets based on their team pref (if any): survivor, zombie, and none. Players without a pref are assigned the "none" bucket.
2. Team selection will alternate between picking one survivor and one zombie at a time. It will continue picking survivors and zombies until the survivor ratio is met, and the rest of the picks will be dedicated to zombies.
When selecting a survivor, there is first a random roll done to decide if a player should be chosen from the survivor bucket. The odds here are approximately 3 to 4 that someone with the survivor pref will get picked for the survivor team. This means that preferences aren't guaranteed, but instead just highly likely.
If the roll passes, a player from the survivor bucket is randomly chosen to be a survivor. If it doesn't pass, a player from the "none" bucket is chosen instead. If there are no players available from the survivor or none buckets (if all players have pref set to zombie, for example) then a random player must be chosen from the zombie bucket.
The same logic is then repeated for a single zombie selection (choosing from the zombie bucket instead of survivor, however).
Then the logic will repeat the survivor and zombie selection until enough survivors have been selected to fill the survivor ratio (currently 60%).
These changes should hopefully prevent players from getting stuck on the same team every round as it's considerably more random than what the ZF plugin had before.
If you still seem to find yourself getting stuck on the same team over and over, let me know as I may have introduced a bug in this implementation, and I'll be able to check against the team stats collection I introduced as well.