BF2:Squadleaders getting teambalanced

From BattleWiki

Primary method (For squadleaders and commanders)

To prevent the game's auto-balance function from auto-switching Commanders or Squad leaders, make the following server-side changes:

  • Change to 'Battlefield 2 Demo\Admin\standard_admin'
  • Open 'autobalance.py'
  • Find line 39, which looks like this:
# dont use autobalance when its suicide/changes team
  • Add this bit of code just above that line:
# dont autobalance commanders or squad leaders EVER
if p.isSquadLeader() or p.isCommander(): return None


Alternative method (For all squad members)

In admin/standard_admin/autobalance.py, edit this area:

def onPlayerDeath(p, vehicle):
  if not bf2.serverSettings.getAutoBalanceTeam(): return None
Add:   if p.isCommander(): return None
Add:   if p.isSquadLeader(): return None
Add:   if p.getSquadId() > 0: return None

This should ignore players who are a) Are commanders b) are squad leaders c) are squad members. Only unassigned 'lone wolf' players are balanced. The p.isSquadLeader() is probably redundant.