Page 1 of 132 1231151101 ... LastLast
Results 1 to 10 of 1316
  1. #1

    Insane Balancer 0.0.0.6-patch-5 (beta)

    Insane Balancer

    This plugin is no longer supported by the author.
    As an alternative, you can take a look at MULTIbalancer.

    Insane Balancer is on beta (0.0.0.6). Please download it, and install it manually. Reply on this thread with any defects you observe (there is probably going to be a bunch of them ) There is a variable debug_level which you can set to view exactly the logic being used for balancing.

    Installation Instructions

    1. Download the plugin zip file (attachment at the end)
    2. Extract the souce file InsaneBalancer.cs
    3. Place source file in ProCon's Plugins/BF3 directory.

    Description

    This is the draft implementation for a flexible team balancer, which can balance teams by skill, rank, score, kdr and other rules. All of it, while doing best effort to maintain squads together, and clans on the same team.

    Think this plugin is awesome? You can buy me a beer.



    Sort Methods

    A sort method is a rule used for sorting a list of players or squads. The following balancing methods are supported:

    • kpm_asc_round , kpm_desc_round
      Sorting based on the soldier round kills per minute
    • spm_asc_round , spm_desc_round
      Sorting based on the soldier round score per minute
    • kdr_asc_round , kdr_desc_round
      Sorting based on the soldier round kill to death ratio
    • score_asc_round , score_desc_round
      Sorting based on the soldier round score
    • time_asc_round , time_desc_round
      Sorting based on the time the player joined the server.
    • kdr_asc_online , kdr_desc_online
      Sorting based on the soldier online kill to death ratio
    • kpm_asc_online , kpm_asc_online
      Sorting based on the soldier online kills per minute
    • spm_asc_online , spm_desc_online
      Sorting based on the soldier online score per minute
    • kills_asc_online , kills_desc_online
      Sorting based on the soldier online kills
    • deaths_asc_online , deaths_desc_online
      Sorting based on the soldier online deaths
    • skill_asc_online , skill_desc_online
      Sorting based on the soldier online skill statistic
    • quits_asc_online , quits_desc_online
      Sorting based on the soldier online quit percentage
      (a round not completed is counted as a quit)
    • accuracy_asc_online , accuracy_desc_online
      Sorting based on the soldier online accuracy
    • score_asc_online , score_desc_online
      Sorting based on the soldier online total score
    • rank_asc_online , rank_desc_online
      Sorting based on the soldier online rank
    • random_value
      Sorting is based on random/fuzzy values assigned to the players


    All the data for sorting rules ending in _round is obtained from the previous or current round statistics.
    All the data for sorting rules ending in _online is obtained from from the battlelog.battlefield.com website.
    The substrings asc, and desc mean ascending, and descending respectively. This is used for the sorting order.

    Live Balancing Logic

    Insane Balancer tries to be as un-intrusive as posible while balancing a game that is in progress. If the teams become un-balanced while the game is in progess it will create two pools of players and sort them. (players chosen from the bigger team) One pool for players who are not in any squad, and another pool for squads. First it will chose the player at the top of the no-squad pool and move it to the other team until teams are balanced. If the no-squad pool becomes empty (and teams are still unbalanced) then squad at the top of the squad pool is moved to the other team if the number of players needed is greater than or equal to the size of the squad. If the number of players needed is less than the size of the top squad, a random random player is chosen from the squad and moved to the opposite team until teams are balanced. (players that were on the same squad are kept together)


    Round Re-balancing Logic

    If end of round balancing is enabled, Insane Balancer will completely re-sort teams, even if they are already balanced. The logic for the re-sort is as follows. Create two pools of players and sort them (choosing players from all teams). One pool for players who are not in squads, and another for players who are in squads. Then, move all all players and squads to the neutral team, in order to end up with two empty non-neutral teams. Then, pick the squad at the top of the squad pool, and move it to the losing team. Then pick the next squad on top of the squad pool, and move it to the team with the least players, and so on. Once the squad pool is empty, pick the player on top of the no-squad pool, and move it to the team with least players, and so on. If teams are still unbalanced after the no-squad pool is empty, then the live balancing logic is applied.

    This is a high-level explanation explanation of the round-balancing logic algorithm. It does not mean that players are actually moved to the neutral team. This is not possible anymore with Battlefield 3. Instead, it's done virtually with 3 arrays of players to represent the three teams: Neutral, US, and RU. When all the calculations are done, and the plugin has determined the target teams and squad for each player ... it will then swap players between RU, and US one at a time.

    Note that if the server is full, round-balacing logic will not be applied. It's not possible to move players when both teams are full. Also note that, it can happen that the server becomes full while the round-balancing is being applied. When this happens, the admin.movePlayer commands may fail. This was not a problem in Battlefield Bad Company 2, because there was a spare/neutral team that players could be moved to when balancing a full server.


    Balanced Team Determination

    Teams are determined to be balanced if the difference in number of players between teams is less than or equal to the balance_threshold. The balance_threshold has to be a number greater than 0. If the total number of players in the server is less than or equal to the balance_threshold, then the user set threshold is ignored, and a value of 1 is used instead. Technically, no team should ever be bigger than the other by more than the value of balance_threshold.


    Keeping Squads Together

    Insane Balancer is coded to keep squads together by default. However, you can set keep_squads to false and both round-balancing and live-balancing logics are changed a bit. What happens, is that all squads in the squad pool are broken, and players put into the no-squad pool, before balancing starts.

    Note that for live-balancing, players are not actually moved out of the squad. (it would kill all players if you do that). They are just treated as if they were not in a squad. Also, If keep_squads is enabled, clan-squads will not be broken.


    Keeping Clans On Same Team

    During end-of round re-balancing, if keep_clans is enabled, players with the same clan tag are be removed from their current squad, and put into exclusive squads. These special clan squads are given priority over non-clan squads, so that clan-squads end up in the same team. Note that when keep_clans is enabled, teams may end up unbalanced in number, so the live-balancing logic may still need to be applied.

    During live-balancing, if keep_clans is enabled, players with clan tags are given priority, as long as there is at least two members of the same clan in the server. When picking players to move to the other team, if a player has a clan tag, the player will be automatically skipped, if the majority of the clan is in the same team (otherwise the player is moved to the other team to join his clan buddies).

    If at the end of live-balancing phase, teams are still unbalanced, then keep_clans is disabled temporarily, and the live-balancer logic is applied again.


    Settings

    1. balance_threshold
      (integer ] 0) - maximum difference in team sizes before teams are considered unbalanced
      Technically, no team will ever be bigger by more than the balance_threshold
    2. live_interval_time
      (integer ] 0) - interval number of seconds at which team balance is checked during game
    3. round_interval
      (integer ] 0) - interval number number of rounds at which the round balancer is applied
      For example, if map Atacama has 6 rounds, and the value of round_interval is 2, then the round
      balancer is run at the end of rounds 2, 4, and 6.

      This value is used for all maps, unless you provide a per-map interval value.
      Per-map round interval values can be set in the ""Round Interval"" section of the plugin.
      There you will see a list of maps, and game modes supported by BF3.


      The following prefixes are used to identify game modes:
      • cl - conquest large
      • cs - conquest small
      • csa - conquest small assault (only for BF3 Back to Karkand Maps, except Wake Island)
      • rl - rush large
      • sr - squad rush
      • td - team death-match

    4. round_wait_time
      (integer > 0) - number of seconds to wait after round-over event, before activating the round-end balancer
    5. [keep_squads_live
      true - squads are preseved during live balancing
      false - squads are intentionally broken up during live balancing

      This setting only applies to the round-end balancer.
    6. keep_squads_round
      true - squads are preseved during end of round balancing
      false - squads are intentionally broken up during end of round balancing

      This setting only applies to the round-end balancer.
    7. keep_clans_round
      true - players with same clan tags are kept on the same team during end of round balancing
      false - clan tags are ignored during end of round balancing
    8. keep_clans_live
      true - players with same clan tags are kept on the same team during live balancing
      false - clan tags are ignored during live balancing
    9. warn_say
      true - send auto-balancer warning in chat
      false - do not say the auto-balancer warning in chat
    10. balance_round
      true - enables the end of round balancer
      false - disabled the end of round balancer
    11. balance_live
      true - enables the live balancer
      false - disables the live balancer
    12. admin_list
      (string) - list of players who are allow to execute admin commands
    13. round_sort
      (string) - method used for sorting players and squads during end of round balancing
    14. live_sort
      (string) - method used for sorting players and squads during live balancing
    15. player_safe_wlist
      (string, csv) - list of players that should never be moved or kicked (by the idle kicker)
    16. clan_safe_wlist
      (string, csv) - list of clan (tags) for players that should never be moved or kicked (by the idle kicker)
    17. use_extra_white_lists
      true - enables and shows the extra white-lists
      false - disables and hides the extra white-lists
    18. player_move_wlist
      (string, csv) - list of players that should never be moved
    19. player_kick_wlist
      (string, csv) - list of players that should never be kicked (by the idle kicker)
    20. clan_kick_wlist
      (string, csv) - list of clan (tags) for players that should never be kicked by the idle kicker
    21. clan_move_wlist
      (string, csv) - list of clan (tags) for players that should never be moved
    22. clan_kick_wlist
      (string, csv) - list of clan (tags) for players that should never be kicked
    23. ticket_threshold
      (integer >= 0) - When the number of tickets in either team goes below this value, live balancer stops working.

      For Team-Deathmatch mode, the behavior is reversed.
      For example, if the maximum number of tickets is 100, and the ticket threshold is 20, then
      the live balancer will stop working whenever either team reaches goes over 80 tickets.

      This feature is disabled for TDM because of an existing ProCon defect (as of 1.1.3.0)
    24. kick_idle
      true - enables the idle kicking feature for the round-end balancer
      false - disables the idle kicking feature for the round-end balancer

      If the server is full when the round ends, it is not possible to apply the round-end balancing logic.
      This is where the idle kicker can be useful. If enabled, the idle-kicker will kick one idle player from each team.
      This allows the round-end balancing logic to proceed.

      The way it determines if a player is idle, is by keeping track of the time since the last player activity.
      There are five indicators of activity that the plugin keeps track of. These are: chat, kills, deaths, spawn, and score.

      For a player to be considered idle, all five activity indicators must be true. If any of the indicators is not true, then the player is not considered idle.
    25. last_chat_time
      (integer >= 0) - This is the number of seconds for the idle-kicker chat activity indicator
    26. last_kill_time
      (integer >= 0) - This is the number of seconds for the idle-kicker kill activity indicator
    27. last_death_time
      (integer >= 0) - This is the number of seconds for the idle-kicker death activity indicator
    28. last_spawn_time
      (integer >= 0) - This is the number of seconds for the idle-kicker spawn activity indicator
    29. last_score_time
      (integer >= 0) - This is the number of seconds for the idle-kicker score activity indicator
    30. wait_death
      true - enables the wait death algorithm. Players are not killed by live balancer. They are moved when they die.
      false - disables the wait death algorithm. Players may be killed and and moved while alive, for balancing purposes.
    31. wait_death_count
      (integer > 0) - Specifies how big to make the candidates list for moving when wait_death is enabled.

      By default this is set to 6 players, but you may change it as you wish depending on your server size. The reason this is needed is because even though only one player may be needed to achieve balance, that player may take too long to die, and thus the teams will stay un-balanced much longer.

      With the candidate list set to 6, it means that 6 players will be chosen from the top of the list
      and marked as possible candidates to be moved.
    32. console
      (string) - here you can use to test the in-game commands from within procon.
      For example: ""!show round stats"" will print the player statistic for the current round in the plugin console.

    Public In-Game Commands


    In-game commands are messages typed into the game chat box, which have special meaning to the plugin. Commands must start with one of the following characters: !,@, or /. This plugin interprets the following commands:

    • !move
      This command can be used by regular players to move themselves to the opposite team as long as teams are balanced.
    Admin In-Game Commands


    These are the commands that only soldiers in the ""admin_list"" are allowed to execute. Reply messages generated by admin commands
    are sent only to the admin who executed the command.

    • !start check
      This command puts the live balancer in started state, so that it periodically (every live_interval_time seconds) checks the teams for balance.
      When this command is run balance_liveis implicitly set to true.
    • !stop check
      This command puts the live balancer in stopped state.
      When this command is run balance_live is implicitly set to false.
    • !show round stats [player-name]
      This command is used for showing the player statistics for the current round.
      The name of the player is optional. If you do not provide a player name, it will print statistics for all players.
    • !balance live
      This command forces the live balancing logic to be applied whithout any warning period or countdown.
    • !balance round
      This command forces the round balancing logic to be applied whithout any warning period or countdown.
    • !show online stats [player-name]
      This command is used for showing the player online (battlelog) statistics.
      The name of the player is optional. If you do not provide a player name, it will print statistics for all players.
    • !show idle
      Prints a list of the players that the plugin considers idle, based on the indicators of activity.
      • last_chat_time
      • last_kill_time
      • last_death_time
      • last_spawn_time
      • last_score_time

    • !wlist_info {player-name}
      This command is used for testing/checking what white-lists a player is in, e.g.:

      !wlist_info micovery

      player_safe_wlist = False
      clan_safe_wlist = False
      player_kick_wlist = True
      player_move_wlist = False
      clan_kick_wlist = False
      clan_move_wlist = False

      In the example above, the player is only in the ""player_kick_wlist"".
      If the player is not in-gmae, you will not be able to see white-list information.

    • 1. !set {variable} {to|=} {value}
      2. !set {variable} {value}

      3. !set {variable}

      This command is used for setting the value of this plugin's variables.
      For the 2nd invocation syntax you cannot use ""=" or ""to"" as the variable value.
      For the 3rd invocation syntax the value is assumed to be ""true"".
    • !get {variable}
      This command prints the value of the specified variable.


    Change Log
    • 0.0.0.6 - patch-5 (beta, BF3)
      - Fixes permission problem with Sandbox
      - See these posts for more info with Download-Link, and Recommended settings contributed by Hadlock

      http://www.phogue.net/forumvb/showth...ll=1#post34115
      http://www.phogue.net/forumvb/showth...ll=1#post34466
    • 0.0.0.6 - patch-4 (beta, BF3)

      - Gracefully handle HTTP time-out exceptions, by just printing error on the log
      - Modified exception dumping code to create only one file "InsaneBalancer.dump"
      - Modified exception dumping code to show date-time, and plugin version
      - Modified exception dumping code to show the MSIL stack trace
      - Increased HTTP timeout to from 10, to 20 seconds
    • 0.0.0.6 - patch-3 (beta, BF3)

      - Fixed defect where battlelog stats were fetched twice for some players
      - Added defensive checks in stats code, for when HTTP request fails
    • 0.0.0.6 - patch-2 (beta, BF3)

      - Fixed ThreadAbortException dump when stats thread is aborted by closing procon.
      - Fixed exception raised in getPlayerStats for players with multiple soldier profiles
      - Fixed problem where HTML from player profile was dumped in the console log
    • 0.0.0.6 - patch-1 (beta, BF3)

      - Fixed defect where stats fetching thread could not re-start when disabling/re-enabling the plugin
      - Fixed bug where if the wait_death candidates list size was bigger than player count, live logic breaks
      - Renamed min_tickets_live to ticket_threshold
      - Implemented ticket_threshold to work with Team-Deathmatch mode
    • 0.0.0.6 (beta, BF3)

      - Fixed defect where exception was being raised in getAllIdle
      - Fixed defect where live-balancer would still run/overlap throughout the round_wait_time sleep period
      - Fixed defect where exception was raised for trying to modify No-Squad pool while iterating though it
      - Fixed defect where "use_extra_white_list" was not behaving as expected when turned off
      - Fixed defect where for exception when round-balancer started and server size info was not available
      - Removed battle-log mail, and password settings (not needed anymore)
      - Added a new random/fuzzy sorting method for team shuffling
      - Added a Queueing system for fetching online stats in a separate thread

      - Addded new sorting methods based on on-line statistics
      • kills_{asc|desc}_online
      • deaths_{asc|desc}_online
      • kdr_{asc|desc}_online
      • kpm_{asc|desc}_online
      • spm_{asc|desc}_online
      • skill_{asc|desc}_online
      • quits_{asc|desc}_online
      • accuracy_{asc|desc}_online
      • score_{asc|desc}_online
      • rank_{asc|desc}_online

      - Added "!show online stats", and "!show online stats <player_name>" commands
      - Added min_tickets_live, for live balancer
      - Improved wait_death algorithm, to avoid zoning-in problem, uses now a candiate list
      - Added setting wait_death_count to specify the size of candidate list for wait_death algorithm
      - Added Back to Karkand Maps and Modes for the per-map round intervals
    • 0.0.0.5 (beta, BF3) - Download Link

      - Added extra (more granular) white-lists, also renamed white list setting variables
      - Added feature to kick_idle players if server is full during round-balancing
      - Added feature to automatically deduce server size if data is not available
      - Added wait_death experimental feature, to wait for player to die before moving during live-balance
      - Added feature to also sort squad members when breaking up a squad
      - Added new command !show_idle
      - Added new command !wlist_info <player_name>
      - Fixed defect where players list was not in sync, and there were ghost players
      - Fixed defect where live-balancer was unconditonally enabled after round-balance
    • 0.0.0.4 (beta, BF3) - Download Link

      - Added round_wait_time, for use as round-balance activation delay
      - Added per-map round interval settings, following prefixes used for game-type:
      • cl - conquest large
      • cs - conquest small
      • rl - rush large
      • sr - squad rush
      • td - team death-match

      - Added feature to automatically deduce server size if data is not available
      - Fixed defect where cannot user could not use move command on white-listed player
      - Fixed defect where plugin was unfairly choosing first member when breaking-up squads
      - Fixed defect where round balancer was running unconditionally at the end of every round
      - Fixed defect where plugin could not run round-balancer when reported server size is incorrect
    • 0.0.0.3 (beta, BF3) - Download Link

      - Added battlelog client feature, for fetching clan tags
      - Added exception dumping feature, for for reporting plugin defects
      - Added virtual_mode setting for testing balance logic without affecting server
      - Added console setting for running plugin commands within the ProCon GUI
      - Added two new sorting methods, time_asc_round, time_desc_round (first joined or last joined)
      - Added clan_white_list, and player_white_list
      - Removed sorting methods that depended on BFBCS, that is any *_bfbcs sort method
      - changed round balancing logic to do the balancing when the first palyer spawns
      - added command !show bfbc stats
      - added command !show round stats
      - changed display method for round_sort, and live_sort to use a drop down menu
      - changed structure to use PRoCon Plugin API 2.0
    • 0.0.0.2 (beta, BC2)
      - added sort methods (independent of BFBCS website)
      • kpm_{asc|desc}_round
      • spm_{asc|desc}_round
      • spm_{asc|desc}_round
      • score_{asc|desc}_round
      • kdr_{asc|desc}_round

      - changed round balancing logic to do the balancing when the first palyer spawns
      - added command !show bfbc stats
      - added command !show round stats
      - changed display method for round_sort, and live_sort to use a drop down menu
      - changed structure to use PRoCon Plugin API 2.0
    • 0.0.0.1 - original (beta, BC2) release
    Attached Files Attached Files
    Last edited by PapaCharlie9; 11-05-2013 at 19:09.

  2. #2

    Re: Insane Balancer

    This looks very interessting!
    So this plugin balances the number of players and skills in the teams.
    Maybe its also usefull to look at the k/d-ratio and points per minute to figure out the players skills.
    What about a whitlist... would be nice :-)
    Unfortunately I can not find your game-server in my server browser. Would like to play there to see how the plugin works :-(

  3. #3

    Re: Insane Balancer

    VERY NICE! I'll hop on to help you test it. Thanks micovery!

  4. #4

    Re: Insane Balancer

    Sweet, looking forward to this.

  5. #5
    The one and only Bassyboy
    Join Date
    Jul 2010
    Location
    Netherlands
    Posts
    2,570

    Re: Insane Balancer

    This looks like a very promising plugin! Thanks for the effort dude.

    A whitelist would be a nice feature as well.

  6. #6

    Re: Insane Balancer

    Don't think it needs whitelist.
    I have noticed that it uses VIP list and says can't move anyone when there are only VIP's on the server.

  7. #7
    The one and only Bassyboy
    Join Date
    Jul 2010
    Location
    Netherlands
    Posts
    2,570

    Re: Insane Balancer

    That's cool too!

  8. #8

    Re: Insane Balancer

    Quote Originally Posted by CaptainSilver
    This looks very interessting!
    So this plugin balances the number of players and skills in the teams.
    The plugin always balances by the number of players. However, the way it chooses which players to move around depends on the following settings right now: "keep_squads", "keep_clans", the and the sort method. For example, if you have "keep_squads", and "keep_clans" enabled, this is the precedence for choosing players:

    [list=3:1xjlafkr][*] Players who are not in squads
    [list=3:1xjlafkr][*] Non-clan players
    [/*:m:1xjlafkr][*] Clan-players[/*:m:1xjlafkr][/list:1xjlafkr]
    [/*:m:1xjlafkr][*] Players who are in squads
    [list=3:1xjlafkr][*] Non-Clan Squads
    [/*:m:1xjlafkr][*] Clan-squads[/*:m:1xjlafkr][/list:1xjlafkr][/*:m:1xjlafkr][/list:1xjlafkr]


    In order to compare which squad or player to move first, it will sort them by the user set sorting rule, and choose the squad/player at the beginning of the sorted list.

    Quote Originally Posted by CaptainSilver
    Maybe its also useful to look at the k/d-ratio and points per minute to figure out the players skills.
    A sorting rule for kdr is already included, however it does not use the kdr from the last round, it calculates the kdr based on the total number of kills and death listed on the player's profile in the BFBC2 stats page. As of right now all the sorting rules are solely based on information form the BFBC2 stats, page. I can add a rule for ppm (points per minute) by taking the total number of points for the player in the last round, and dividing it by the round duration. Is that what you meant?


    Quote Originally Posted by CaptainSilver
    What about a whitlist... would be nice :-)
    I did not think about it, but I will be adding it by your suggestion. It's a simple feature to add :-).

    Quote Originally Posted by CaptainSilver
    Unfortunately I can not find your game-server in my server browser. Would like to play there to see how the plugin works :-(
    I only enable it at night (US PST) when I can supervise that it's actually working. The server is now called " Insane Gamers Asylum 24/7 HEAVY METAL HC" ... to look for it in the server browser, take out all the filters, and just search for they keyword "Insane" (first letter uppercase).

  9. #9

    Re: Insane Balancer (spec-draft)

    Stoked about this plugin. What's the status? I know... patience, grasshopper.

  10. #10

    Re: Insane Balancer (spec-draft)

    Still can't find your Server. Please can you have an look at your GameSettings.ini. There is a list with you favorites. Look like this (Our Server):

    Code:
    FavoriteGames=2301014010,50409581-c1e1-4264-bcea-457b7790af17,Twilight-Fighters  (GER) @ 4Netplayers Wir suchen Member;
    Can you copy the line witj your server and post it?

 

 

Similar Threads

  1. Which Balancer?
    By jabberwocky in forum Procon 1.0 Frostbite
    Replies: 9
    Last Post: 21-01-2011, 15:49
  2. Private Beta: Test a new FPS!
    By Phogue in forum Procon 1.0 Frostbite
    Replies: 12
    Last Post: 06-12-2010, 19:16
  3. HUGE Plugin REQUEST - BC2 team SKILL balancer/randomizer!
    By j12555 in forum Plugin Development
    Replies: 3
    Last Post: 02-12-2010, 20:42
  4. [Request] Map Vote (Beta V0.5 15 June)
    By Uvall in forum Plugin Development
    Replies: 50
    Last Post: 04-07-2010, 03:25
  5. Insane Punisher
    By micovery in forum Plugin Development
    Replies: 0
    Last Post: 01-01-1970, 00:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •