Raised This Month: $51 Target: $400
 12% 

Fair Team Balancer


Post New Thread Reply   
 
Thread Tools Display Modes
Author
MistaGee
Senior Member
Join Date: Aug 2004
Location: Germany (Fulda)
Plugin ID:
280
Plugin Version:
2.8
Plugin Category:
Gameplay
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Balances teams in size and strength, taking the players' score into account
    Unapprover:
    Reason for Unapproving:
    Reported to not be working and appears unsupported.
    Old 02-10-2008 , 08:44   Fair Team Balancer
    Reply With Quote #1

    Hi,

    I've enhanced the DoD:S Balancer plugin by dalto to take the players' score into account when switching people to the other team.

    I basically checks the team sizes whenever a player dies, when they are uneven it chooses players to be switched according to this algorithm:
    1. count players and sum up their score
    2. calculate differences:
      1. dPlayers =
      2. dScore =
    3. switch as many as dPlayers players, whose score is nearest to dScore.
    Furthermore, this plugin should work on any mod.

    The command sm_teams executes the team check right away. When using this command, the plugin does not wait for the players to die to be switched, but switches them immediately instead.

    Credits:
    dalto for making the original plugin, and Extreme_One and lambdacore for pointing me to bugs.

    edit: (See changelog in the sp)

    Greetz
    MGee
    Attached Files
    File Type: sp Get Plugin or Get Source (fairteambalancer.sp - 1607 views - 8.4 KB)
    __________________
    Ich hab nie behauptet dass ich kein Genie bin!
    Mumble-Django: A web interface for Mumble

    Last edited by MistaGee; 08-13-2008 at 13:41.
    MistaGee is offline
    Send a message via ICQ to MistaGee
    Extreme_One
    Veteran Member
    Join Date: Nov 2006
    Old 02-10-2008 , 14:16   Re: Fair Team Balancer
    Reply With Quote #2

    Cool. I'm putting this on my TF2 server now...

    Any chance of granting immunity to admins?
    __________________
    Extreme_One is offline
    MistaGee
    Senior Member
    Join Date: Aug 2004
    Location: Germany (Fulda)
    Old 02-10-2008 , 14:29   Re: Fair Team Balancer
    Reply With Quote #3

    They're already immune

    Is it working? Haven't yet had the chance to test with TF2...
    __________________
    Ich hab nie behauptet dass ich kein Genie bin!
    Mumble-Django: A web interface for Mumble

    Last edited by MistaGee; 02-10-2008 at 14:32.
    MistaGee is offline
    Send a message via ICQ to MistaGee
    StevenT
    Member
    Join Date: Dec 2007
    Old 02-10-2008 , 18:18   Re: Fair Team Balancer
    Reply With Quote #4

    hi MistaGee, very nice!
    I bounced into this by checking the old DOD:S Team balancer forum topic.

    Is it possible for you to make another Team Balancer based on DOD:S.

    The special thing about dalto's plugin is that its based on games with only 1 round. (DOD:S or the mod Empires which i play).

    1 round = 1 map, so there is never a round_end event (it would be changelevel then)

    Anyhow, the Dalto plugin has this problem: it changes instantly, which makes it sometimes too annoying that players keep getting swapped over (sometimes 10 times swapped on the same map).

    I wish you could just integrate a timer in the Dalto plugin so you can set it to check after 10 mins or 20 mins ... one round can take up to an hour easily.

    Thanks MistaGee

    PS: http://forums.alliedmods.net/showthread.php?t=58059
    that plugin has a time checker, maybe some idea for you on how to make those 2 into one great plugin
    StevenT is offline
    MistaGee
    Senior Member
    Join Date: Aug 2004
    Location: Germany (Fulda)
    Old 02-10-2008 , 18:42   Re: Fair Team Balancer
    Reply With Quote #5

    I've changed the hooks for DoD:S a bit, now teams are checked whenever an objective is accomplished. Implementing a timer is a bit harder, maybe with the updated hooks it's fine?

    Greetz
    Gee
    __________________
    Ich hab nie behauptet dass ich kein Genie bin!
    Mumble-Django: A web interface for Mumble
    MistaGee is offline
    Send a message via ICQ to MistaGee
    DontWannaName
    Veteran Member
    Join Date: Jun 2007
    Location: VALVe Land, WA
    Old 02-10-2008 , 20:36   Re: Fair Team Balancer
    Reply With Quote #6

    What immunity flag is it? What would be cool is a feature for donators to type !swapme in chat so they can change whenever they want and someone who isnt donator will be forced to move teams. I put this n tf2 and disabled the mp_autoteambalance cvar.
    __________________

    DontWannaName is offline
    FredJed223
    Senior Member
    Join Date: Feb 2008
    Old 02-10-2008 , 21:42   Re: Fair Team Balancer
    Reply With Quote #7

    Quote:
    Originally Posted by DontWannaName View Post
    What immunity flag is it? What would be cool is a feature for donators to type !swapme in chat so they can change whenever they want and someone who isnt donator will be forced to move teams. I put this n tf2 and disabled the mp_autoteambalance cvar.
    Its the kick flag

    And !swapme is used by another plugin. How about !swapteam
    FredJed223 is offline
    FredJed223
    Senior Member
    Join Date: Feb 2008
    Old 02-10-2008 , 22:46   Re: Fair Team Balancer
    Reply With Quote #8

    Also this doesn't seem to be obeying admin immunity.
    FredJed223 is offline
    DontWannaName
    Veteran Member
    Join Date: Jun 2007
    Location: VALVe Land, WA
    Old 02-11-2008 , 01:49   Re: Fair Team Balancer
    Reply With Quote #9

    Sure but could you add a separate file for all the donators steam IDs? Helps keep them seperate from admins in admins cfg. So when a donator types !swapteam in chat is switches their team and if they dont have access you can make it show a message or do nothing, I dont know whats better.
    __________________

    DontWannaName is offline
    MistaGee
    Senior Member
    Join Date: Aug 2004
    Location: Germany (Fulda)
    Old 02-11-2008 , 03:30   Re: Fair Team Balancer
    Reply With Quote #10

    Quote:
    Originally Posted by DontWannaName View Post
    What immunity flag is it?
    None, it simply checks if the person is any admin at all. Could be changed quite easily though.

    Quote:
    Originally Posted by DontWannaName View Post
    What would be cool is a feature for donators to type !swapme in chat so they can change whenever they want and someone who isnt donator will be forced to move teams.
    I don't think a feature like this would make too much sense in this plugin - is there really no plugin which can do this?
    Btw, I expect this to be abused for wtj all the time, so I think implementing such a feature is a bad idea altogether since it allows any donator to break teamplay whenever they want.

    Quote:
    Originally Posted by DontWannaName View Post
    Sure but could you add a separate file for all the donators steam IDs? Helps keep them seperate from admins in admins cfg.
    That's what you can use Admin Groups for.

    Quote:
    Originally Posted by DontWannaName View Post
    So when a donator types !swapteam in chat is switches their team and if they dont have access you can make it show a message or do nothing, I dont know whats better.
    That would be no different from the standard command implementation, where a user gets shown "You don't have access to this command" when appropriate.
    __________________
    Ich hab nie behauptet dass ich kein Genie bin!
    Mumble-Django: A web interface for Mumble

    Last edited by MistaGee; 02-11-2008 at 03:39.
    MistaGee is offline
    Send a message via ICQ to MistaGee
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 08:42.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode