Announcement

Collapse
No announcement yet.

Preventing autobalancing commanders and squad leaders.

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Preventing autobalancing commanders and squad leaders.

    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


    [edit]
    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 redudndant.
    http://www.shackbattles.com/wiki/ind...g_teambalanced

  • #2
    Re: Preventing autobalancing commanders and squad leaders.

    Thanks Edwin. You're about four days too late, though. Got it covered. :)
    [volun2]
    NS Game Officer. TF2 Admin. BF2 Admin / Scripter. PM with issues.
    Tempus: Pokerface is nailing it right on the head. Everyone who is arguing against him is simply arguing against reality.
    <anmuzi> it is not permitted to have privacy or anonymity
    <LazyEye> yeah when I play on TG the server digs though my trash

    Arm yourself with knowledge: TG NS TF2 BF2

    Comment


    • #3
      Re: Preventing autobalancing commanders and squad leaders.

      Nothing to see here, move along.

      Comment


      • #4
        Re: Preventing autobalancing commanders and squad leaders.

        Excellent find though Edwin. Our resident python expert Pokerface is working on a bunch of solutions for us. Stay tuned...
        |TG-12th| asch
        sigpic

        Comment

        Connect

        Collapse

        TeamSpeak 3 Server

        Collapse

        Advertisement

        Collapse

        Twitter Feed

        Collapse

        Working...
        X