Author Topic: cube v1.6.1 - CTF/INF Ultimate Balancer  (Read 35817 times)

0 Members and 1 Guest are viewing this topic.

Offline Furai

  • Administrator
  • Veteran
  • *****
  • Posts: 1908
    • TransHuman Design
Re: cube v0.9
« Reply #20 on: June 24, 2011, 05:23:15 pm »
If you really would like to add something then I was thinking of some team randomiser - command only for admins. Sometimes teams are so unballanced that nothing can be really done or people want just to shuffle teams. I'd really like to see a feature allowing you to shuffle teams keeping server ballanced.
"My senses are so powerful that I can hear the blood pumping through your veins."

Offline freestyler

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 326
Re: cube v0.9
« Reply #21 on: June 25, 2011, 04:08:36 am »
um

Quote
Changes 0.7 -> 0.8:
added: /mix (or /shuffle) admin-only command to shuffle the teams
Quote
And in case of a big unbalance that lasts for a longer period of time, you can shuffle the teams (put the players, from most kills to fewest kills, to alternating teams)

Offline Furai

  • Administrator
  • Veteran
  • *****
  • Posts: 1908
    • TransHuman Design
Re: cube v0.9
« Reply #22 on: June 25, 2011, 05:00:30 am »
um

Quote
Changes 0.7 -> 0.8:
added: /mix (or /shuffle) admin-only command to shuffle the teams
Quote
And in case of a big unbalance that lasts for a longer period of time, you can shuffle the teams (put the players, from most kills to fewest kills, to alternating teams)

Damn, and I thought I read the first post carefully enough...my bad. Sorry.
"My senses are so powerful that I can hear the blood pumping through your veins."

Offline PKS|Shooter

  • Soldier
  • **
  • Posts: 130
  • Dont fuck with us!
    • PKS - La Familia
Re: cube v0.9
« Reply #23 on: July 21, 2011, 03:48:08 pm »
Quote
(22:37:20) [Error] cube -> (OnPlayerCommand): Type Mismatch
(22:37:20) Connection to the server lost

:o

Offline freestyler

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 326
cube v1.2b
« Reply #24 on: October 27, 2011, 05:41:27 pm »
cube v1.2b is out!


Changes 1.1b -> 1.2:
added: '/kickbots' and '/kickspec' commands to kick all bots/spectators from the server
added: option to keep team's score even if everyone from that team left (Soldat itself clears the score if a team is empty). said option (named KeepTeamScore) is disabled by default
added: some checks for incorrect values of Weight and MinDiff
added: more '!balance' aliases
modified: fixed incorrect balancing when Weight and MinDiff are small and there are few players (e.g. 3v0, 0:5, W=2, MD=2 - cube thought it was balanced) (reported by Vampir)
modified: in-game admins can now use '/bal' command even if they're in the spectator team
modified: enriched readme.txt and divided config in cube.pas into categories to make it neater


Changes 1.2 -> 1.2b:
modified: fixed double writeconsole message when an admin uses /bal
modified: /bal now properly returns error messages when used by remote admin
modified: automatic balance won't trigger right after map change now (at least 5 seconds must pass first)
« Last Edit: November 05, 2011, 08:04:14 am by freestyler »

Offline Mighty

  • Camper
  • ***
  • Posts: 276
Re: cube v1.2b
« Reply #25 on: November 06, 2011, 03:58:42 pm »
Code: [Select]
21:57:07 [Fromage] !Bal
►            > Checking team balance (request by player)... [6v2 7:1]
►            > Performing another balance check... [5v3 7:1]
►            > Performing another balance check... [4v4 7:1]
►            > Performing another balance check... [3v5 7:1]
►            > Performing another balance check... [4v4 7:1]
►            > Everyone in Alpha Team is immune to balance. Using alternative method.
►            > Performing another balance check... [3v5 7:1]
►            > Performing another balance check... [4v4 7:1]
►            > Everyone in Alpha Team is immune to balance. Using alternative method.
►            > Performing another balance check... [3v5 7:1]
►            > Everyone in Bravo Team is immune to balance. Using alternative method.
►            > Performing another balance check... [4v4 7:1]
►            > Everyone in Alpha Team is immune to balance. Using alternative method.
►            > Performing another balance check... [3v5 7:1]
►            > Everyone in Bravo Team is immune to balance. Using alternative method.
►            > Performing another balance check... [4v4 7:1]
►            > Everyone in Alpha Team is immune to balance. Using alternative method.
►            > Performing another balance check... [3v5 7:1]
►            > Everyone in Bravo Team is immune to balance. Using alternative method.
►            > Performing another balance check... [4v4 7:1]
►            > Everyone in Alpha Team is immune to balance. Using alternative method.
►            > Performing another balance check... [3v5 7:1]
►            > Everyone in Bravo Team is immune to balance. Using alternative method.
►            > Performing another balance check... [4v4 7:1]
►            > Everyone in Alpha Team is immune to balance. Using alternative method.
►            > Performing another balance check... [3v5 7:1]
►            > Everyone in Bravo Team is immune to balance. Using alternative method.
►            > Performing another balance check... [4v4 7:1]
►            > Everyone in Alpha Team is immune to balance. Using alternative method.
►            > Performing another balance check... [3v5 7:1]
►            > Everyone in Bravo Team is immune to balance. Using alternative method.
►            > Performing another balance check... [4v4 7:1]
►            > Everyone in Alpha Team is immune to balance. Using alternative method.
►            > Performing another balance check... [3v5 7:1]
►            > Everyone in Bravo Team is immune to balance. Using alternative method.
►            > Performing another balance check... [4v4 7:1]
►            > Everyone in Alpha Team is immune to balance. Using alternative method.
►            > Performing another balance check... [3v5 7:1]
►            > Everyone in Bravo Team is immune to balance. Using alternative method.
►            > Performing another balance check... [4v4 7:1]
►            > Everyone in Alpha Team is immune to balance. Using alternative method.
►            > Performing another balance check... [3v5 7:1]
►            > Everyone in Bravo Team is immune to balance. Using alternative method.
►            > Performing another balance check... [4v4 7:1]
►            > Everyone in Alpha Team is immune to balance. Using alternative method.
►            > Performing another balance check... [3v5 7:1]
►            > Everyone in Bravo Team is immune to balance. Using alternative method.
►            > Performing another balance check... [4v4 7:1]
►            > Everyone in Alpha Team is immune to balance. Using alternative method.
►            > Performing another balance check... [3v5 7:1]
►            > Everyone in Bravo Team is immune to balance. Using alternative method.
►            > Performing another balance check... [4v4 7:1]
►            > Everyone in Alpha Team is immune to balance. Using alternative method.
►            > Performing another balance check... [3v5 7:1]
►            > Everyone in Bravo Team is immune to balance. Using alternative method.
►            > Performing another balance check... [4v4 7:1]
►            > Everyone in Alpha Team is immune to balance. Using alternative method.
►            > Performing another balance check... [3v5 7:1]
►            > Everyone in Bravo Team is immune to balance. Using alternative method.
►            > Performing another balance check... [4v4 7:1]
►            > Everyone in Alpha Team is immune to balance. Using alternative method.
►            > Performing another balance check... [3v5 7:1]
►            > Everyone in Bravo Team is immune to balance. Using alternative method.
►            > Performing another balance check... [4v4 7:1]
►            > Everyone in Alpha Team is immune to balance. Using alternative method.
►            > Performing another balance check... [3v5 7:1]
►            > Everyone in Bravo Team is immune to balance. Using alternative method.
►            > Performing another balance check... [4v4 7:1]
►            > Everyone in Alpha Team is immune to balance. Using alternative method.
►            > Performing another balance check... [3v5 7:1]
►            > Everyone in Bravo Team is immune to balance. Using alternative method.
►            > Performing another balance check... [4v4 7:1]
►            > Everyone in Alpha Team is immune to balance. Using alternative method.
►            > Performing another balance check... [3v5 7:1]
►            > Everyone in Bravo Team is immune to balance. Using alternative method.
►            > Performing another balance check... [4v4 7:1]
►            > Everyone in Alpha Team is immune to balance. Using alternative method.
►            > Performing another balance check... [3v5 7:1]
►            > Everyone in Bravo Team is immune to balance. Using alternative method.
►            > Performing another balance check... [4v4 7:1]
►            > Everyone in Alpha Team is immune to balance. Using alternative method.
►            > Performing another balance check... [3v5 7:1]
►            > Everyone in Bravo Team is immune to balance. Using alternative method.
►            > Performing another balance check... [4v4 7:1]
►            > Everyone in Alpha Team is immune to balance. Using alternative method.
►            > Performing another balance check... [3v5 7:1]
►            > Everyone in Bravo Team is immune to balance. Using alternative method.
►            > Performing another balance check... [4v4 7:1]
►            > Everyone in Alpha Team is immune to balance. Using alternative method.
►            > Performing another balance check... [3v5 7:1]
►            > Everyone in Bravo Team is immune to balance. Using alternative method.
►            > Performing another balance check... [4v4 7:1]
►            > Everyone in Alpha Team is immune to balance. Using alternative method.
►            > Performing another balance check... [3v5 7:1]
►            > Everyone in Bravo Team is immune to balance. Using alternative method.
►            > Performing another balance check... [4v4 7:1]
►            > Everyone in Alpha Team is immune to balance. Using alternative method.
►            > Performing another balance check... [3v5 7:1]
►            > Everyone in Bravo Team is immune to balance. Using alternative method.
►            > Performing another balance check... [4v4 7:1]
►            > Everyone in Alpha Team is immune to balance. Using alternative method.
►            > Performing another balance check... [3v5 7:1]
►   21:57:08 > Teams balanced.
►            [.huhu// Xar0ne] huhu
« Last Edit: November 07, 2011, 02:21:08 am by Mighty »
xFire: macmil        e-mail: macekmil@gmail.com
My scripts: Accuracy Script       Flashbang       Punishments GUID
            CatchMe Gamemod       AntiFake
            CW System             AntiFakeGUID

Offline freestyler

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 326
Re: cube v1.2b
« Reply #26 on: November 06, 2011, 05:18:33 pm »
Would be nice if you specified what is your config (Weight and MinDiff), because without those I can't replicate this. On default values it works properly (balances to 4v4).

Offline Mighty

  • Camper
  • ***
  • Posts: 276
Re: cube v1.2b
« Reply #27 on: November 07, 2011, 02:20:43 am »
Quote
Weight_CTF  = 4;          // don't set it higher than MinDiff
MinDiff_CTF = 5;

:)
xFire: macmil        e-mail: macekmil@gmail.com
My scripts: Accuracy Script       Flashbang       Punishments GUID
            CatchMe Gamemod       AntiFake
            CW System             AntiFakeGUID

Offline freestyler

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 326
Re: cube v1.2b
« Reply #28 on: November 07, 2011, 02:48:18 am »
I can't replicate this - I checked a few times in identical situation (6v2, 7:1) and the script balanced it to 4v4 in two iterations. If SwapOnUnbal is false then it balances to 3v5. Which version are you using?

Also, links revived - my host magically erased contents of dl.php.

Offline Mighty

  • Camper
  • ***
  • Posts: 276
Re: cube v1.2b
« Reply #29 on: November 07, 2011, 03:32:40 pm »
It's 1.1

Anyway, just wanted you to know something like that occured, it's not really something that makes me mad or whatever. Happened once till now.
xFire: macmil        e-mail: macekmil@gmail.com
My scripts: Accuracy Script       Flashbang       Punishments GUID
            CatchMe Gamemod       AntiFake
            CW System             AntiFakeGUID

Offline freestyler

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 326
Re: cube v1.5 - major update
« Reply #30 on: November 25, 2011, 01:07:36 pm »
After a lot of tests, re-tests and re-re-tests I present you with the newest version, which is now so feature-rich it needed a significant version number change.

cube v1.5 - get it while it's hot!

Changes 1.2b -> 1.5:
removed: hardcoded four config values: Balance3v1, SwapOnUnbal, Weight and MinDiff. cube started to grow dangerously big while struggling with compatibility issues. Some new features wouldn't work correctly on non-default config anyway.
added: !join trigger for spectators - joins weaker team (one with fewer players and points)
added: new players are now forced to join weaker team (except they're on the exclusion list)
added: iteration limiter to only balance as many times as it's needed
added: a few more aliases to already existing triggers
modified: balance procedure rewritten and simplified a bit; main stress moved to another function (CalcWeakerTeam)
modified: recently moved (locked) players get unlocked if they're trying to join weaker team (this one was annoying: you couldn't fix unbalanced teams yourself, because cube moved you back)
modified: players that are on the exclusion list have more rights: they can switch team and use team-change triggers without limits
modified: swap doesn't touch players that have capped the flag (except everyone did - in such cases it chooses one who capped fewest times)
modified: all players' lock timers are reset before manual /shuffle or /mix
modified: AppOnIdle is now compatible with Falcon's modified server binary (60 Hz)
modified: improved performance a bit and fixed some omissions that could cause bugs

Offline homerofgods

  • Soldat Beta Team
  • Rainbow Warrior
  • ******
  • Posts: 2029
  • We can do better!
Re: cube v1.5 - major update
« Reply #31 on: November 25, 2011, 04:22:52 pm »
I will defenetly get this if I get a server up. It's great that you have made this unique balancer and care about it, it makes me care about it too. Good job

Offline Bonecrusher

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1397
  • High above
    • Zabijaka.pl
Re: cube v1.5 - major update
« Reply #32 on: November 25, 2011, 06:49:40 pm »
Keep up the good job fri

Im chill like that

Offline Irlandec

  • Soldier
  • **
  • Posts: 176
Re: cube v1.5 - major update
« Reply #33 on: December 05, 2011, 05:57:42 am »
Suggestion: Adding AFK handling would be great addition for the balancer. Also, for example, script could use TF2-like function: if team scores insanely fast for X minutes, vote for /mix is called. Hoper you got the point.

Still, good job there,definately using it!

Offline Leo

  • Soldat Beta Team
  • Veteran
  • ******
  • Posts: 1011
Re: cube v1.5 - major update
« Reply #34 on: February 25, 2012, 04:17:54 am »
I enabled this for inf server but I get endless spam in logs with this: "Too few players. Balance is disabled."   ???

Offline Mighty

  • Camper
  • ***
  • Posts: 276
Re: cube v1.5 - major update
« Reply #35 on: February 25, 2012, 10:18:04 am »
Also, the way your script works disables team changing even performed by admin (Meaning, /setteamX X doesnt work). That's a bit annoying.
xFire: macmil        e-mail: macekmil@gmail.com
My scripts: Accuracy Script       Flashbang       Punishments GUID
            CatchMe Gamemod       AntiFake
            CW System             AntiFakeGUID

Offline Bonecrusher

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1397
  • High above
    • Zabijaka.pl
Re: cube v1.5 - major update
« Reply #36 on: January 09, 2013, 06:53:42 am »
Unforutnately it's not as good in balancing as it used to be. I would be grateful if someone went through the code and find out what might be wrong. Mostly fails with swapping best player with the weakest one, what I think is wrong it excludes players who scored a cap from balancing.
« Last Edit: January 09, 2013, 06:55:35 am by Bonecrusher »

Im chill like that

Offline Bonecrusher

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1397
  • High above
    • Zabijaka.pl
Re: cube v1.5 - major update
« Reply #37 on: July 10, 2013, 03:11:21 pm »
@up anyone?

Im chill like that

Offline freestyler

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 326
Re: cube v1.5 - major update
« Reply #38 on: July 10, 2013, 05:43:30 pm »
That might have been the intended behavior (I don't remember now), but you can change it by modifying the code a tiny bit. The changes are really minimal:

Locate line 305 (it's inside "method 0"):
Code: [Select]
for i := 1 to j do if (GetPlayerStat(player[i], 'Flags') = 0) then begin
Change it to:
Code: [Select]
for i := 1 to j do begin
---

Locate line 571 (inside "swaps limit not reached, swap the players!"):
Code: [Select]
pl2 := ChoosePlayer(iif(temp=11, 1, 2), 5);
Change "5" to "2":
Code: [Select]
pl2 := ChoosePlayer(iif(temp=11, 1, 2), 2);
---

That's it. Swap will now ignore player's caps and only count kills.

Offline Bonecrusher

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1397
  • High above
    • Zabijaka.pl
Re: cube v1.5 - major update
« Reply #39 on: July 11, 2013, 03:37:26 am »
(10:37:17) 
  • cube15 -> [Error] (306:30): Identifier expected

Im chill like that