January 26, 2022, 05:27:12 am

The Gang Garrison 2 Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

NOTICE: Due to a rise in bot activity, new posters need to be approved before posting.

Join the community Discord server!

Pages: [1] 2

Author Topic: (Better) Autoselect when teams are even (Low) [OPEN]  (Read 3046 times)

Ultros

  • Veteran Beta Tester
  • *****
  • Karma: 62
  • Offline Offline
  • Posts: 1757
(Better) Autoselect when teams are even (Low) [OPEN]
« on: February 08, 2012, 07:56:56 pm »

Quote from: in game text
"Let us place you on the team that needs you the most!"

When the teams are even, could we have autoselect (ie. the ? door in the team selection interface) take the current score into account?  So, for instance, in KotH, if red and blu both have 5 players, and red's timer is at 1:00 while blu's is at 2:00, it'd put you on blu.  This obviously wouldn't be a perfect system since score doesn't necessarily say everything about which team currently has the advantage, but it'd be right more often than not.
« Last Edit: May 13, 2012, 11:09:39 am by Wareya »
Logged
11:42 PM - Ultros: http://grooveshark.com/s/Faces/3h83um?src=5  Foooooooooolk
11:43 PM - Snowblind Aces: :0
11:43 PM - Snowblind Aces: this song has 3 fans
11:43 PM - Snowblind Aces: 2 of them are you

Humble Master

  • 2012 Haxxy Award Winner
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 1262
  • Maker of Drakora
Re: Autoselect when teams are even
« Reply #1 on: February 08, 2012, 08:51:30 pm »

Quote from: in game text
"Let us place you on the team that needs you the most!"

When the teams are even, could we also have autoselect take the current score into account?  So, for instance, in KotH, if red and blu both have 5 players, and red's timer is at 1:00 while blu's is at 2:00, it'd put you on blu.  This obviously wouldn't be a perfect system since score doesn't necessarily say everything about which team currently has the advantage, but it'd be right more often than not.
Would work better than the current mechanic.
Logged
Finally returned

Phantom Brave

  • All Hail Classicwell
  • Moderator
  • *****
  • Karma: 70
  • Offline Offline
  • Posts: 12701
  • Another one --
Re: Autoselect when teams are even
« Reply #2 on: February 08, 2012, 09:02:58 pm »

Defeats the purpose of having team selection at all. We're not here to force people on to the most balanced team, that's up to server operators if they want to run a mod for it.
Logged

http://steamcommunity.com/id/wareya/
ladies and gentlemen i would like to announce that the fact of the matter is up that the fact of the matter is a fact and it matters

Ultros

  • Veteran Beta Tester
  • *****
  • Karma: 62
  • Offline Offline
  • Posts: 1757
Re: Autoselect when teams are even
« Reply #3 on: February 08, 2012, 09:26:52 pm »

Nobody's forced to hit Autoselect.  If they do, though, they want to be on the team that needs them most (presumably, anyway, since that's what the option says).
« Last Edit: February 08, 2012, 09:32:11 pm by Ultros »
Logged
11:42 PM - Ultros: http://grooveshark.com/s/Faces/3h83um?src=5  Foooooooooolk
11:43 PM - Snowblind Aces: :0
11:43 PM - Snowblind Aces: this song has 3 fans
11:43 PM - Snowblind Aces: 2 of them are you

Phantom Brave

  • All Hail Classicwell
  • Moderator
  • *****
  • Karma: 70
  • Offline Offline
  • Posts: 12701
  • Another one --
Re: Autoselect when teams are even
« Reply #4 on: February 08, 2012, 09:39:54 pm »

I thought you were talking about forcing people to join the team that that'd benefit them the most.
Logged

http://steamcommunity.com/id/wareya/
ladies and gentlemen i would like to announce that the fact of the matter is up that the fact of the matter is a fact and it matters

Ultros

  • Veteran Beta Tester
  • *****
  • Karma: 62
  • Offline Offline
  • Posts: 1757
Re: Autoselect when teams are even
« Reply #5 on: February 08, 2012, 09:40:29 pm »

Oh, should have been more clear, sorry.  I'll edit the OP.
Logged
11:42 PM - Ultros: http://grooveshark.com/s/Faces/3h83um?src=5  Foooooooooolk
11:43 PM - Snowblind Aces: :0
11:43 PM - Snowblind Aces: this song has 3 fans
11:43 PM - Snowblind Aces: 2 of them are you

Machidro

  • 2013 Haxxy Award Winner
  • *
  • Karma: 5
  • Offline Offline
  • Posts: 1675
  • Gardicolo time is over.
Re: Autoselect when teams are even
« Reply #6 on: February 08, 2012, 11:23:30 pm »

Support, always wondered why we don't do this.
Logged
A CHALLENGER HAS ARRIVED.

Orpheon

  • Moderator
  • *****
  • Karma: 15
  • Offline Offline
  • Posts: 6426
  • Developer
Re: Autoselect when teams are even
« Reply #7 on: February 09, 2012, 06:32:36 am »

Support, always wondered why we don't do this.
Simplicity to code, a "choose(TEAM_RED, TEAM_BLUE)" is much easier.

But yeah, this has my support too.

EDIT: Yay 3000 posts!
« Last Edit: February 09, 2012, 06:36:46 am by Orpheon »
Logged

Ruirize

  • Junior Member
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 69
  • Codemonkey
    • Simply Minecraft!
Re: Autoselect when teams are even
« Reply #8 on: February 09, 2012, 05:44:21 pm »

Integrating into Candied GG2 because I can and because this should be done.

Code: [Select]
var redSuperiority, redScoreSuper;
redteam=0;
blueteam=0;
redSuperiority = 0
redScoreSuper = 0;
for(i=0; i<ds_list_size(global.players); i+=1) {
    player = ds_list_find_value(global.players, i);
    if(player.team == TEAM_RED) {
        redteam+=1;
        if(player != global.myself) {
            redSuperiority += 1;
            redScoreSuper += player.stats[POINTS];
        }
    } else if (player.team == TEAM_BLUE) {
        blueteam+=1;
        if(player != global.myself) {
            redSuperiority -= 1;
            redScoreSuper -= player.stats[POINTS];
        }
    }
}

if(redSuperiority > 0) return TEAM_RED;
else if(redSuperiority < 0) return TEAM_BLUE;
else if(redScoreSuper < 0) return TEAM_RED;
else if(redScoreSuper > 0) return TEAM_BLUE;
else return -1;

The code for this if anyone wants it. Put this in the script 'CalculateTeamBalance'.
« Last Edit: February 09, 2012, 06:06:10 pm by Ruirize »
Logged

Humble Master

  • 2012 Haxxy Award Winner
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 1262
  • Maker of Drakora
Re: Autoselect when teams are even
« Reply #9 on: February 09, 2012, 08:41:46 pm »

Nice coding.
Logged
Finally returned

Phantom Brave

  • All Hail Classicwell
  • Moderator
  • *****
  • Karma: 70
  • Offline Offline
  • Posts: 12701
  • Another one --
Re: Autoselect when teams are even
« Reply #10 on: February 11, 2012, 11:38:06 pm »

Just for future reference, Ruirize, GG2's official bracing style is as such:

if (x)
    asdf;
else
{
    qwer;
    zxcv;
}
switch(thing)
{
case a:
    sdfg;
case b:
    xcvb;
    wert;
}

We came up with syntax rules when we were doing 2.3 but I can't find them written anywhere anymore. Maybe I should re-write them from memory.  :z5:
Logged

http://steamcommunity.com/id/wareya/
ladies and gentlemen i would like to announce that the fact of the matter is up that the fact of the matter is a fact and it matters

Dusty

  • 2012 Haxxy Award Winner
  • *
  • Karma: -78
  • Offline Offline
  • Posts: 11006
  • Dust in a box under a table
Re: Autoselect when teams are even
« Reply #11 on: February 11, 2012, 11:39:08 pm »

Just for future reference, Ruirize, GG2's official bracing style is as such:

if (x)
    asdf;
else
{
    qwer;
    zxcv;
}
switch(thing)
{
case a:
    sdfg;
case b:
    xcvb;
    wert;
}

We came up with syntax rules when we were doing 2.3 but I can't find them written anywhere anymore. Maybe I should re-write them from memory.  :z5:
http://www.ganggarrison.com/forums/index.php?topic=25052.0

Phantom Brave

  • All Hail Classicwell
  • Moderator
  • *****
  • Karma: 70
  • Offline Offline
  • Posts: 12701
  • Another one --
Re: Autoselect when teams are even
« Reply #12 on: February 11, 2012, 11:40:59 pm »

I was talking about a post that had the whole thing all together. I remember making a pastebin of it, but I can't find it now.
Logged

http://steamcommunity.com/id/wareya/
ladies and gentlemen i would like to announce that the fact of the matter is up that the fact of the matter is a fact and it matters

Ultros

  • Veteran Beta Tester
  • *****
  • Karma: 62
  • Offline Offline
  • Posts: 1757
Re: Autoselect when teams are even
« Reply #13 on: February 12, 2012, 07:13:55 pm »

Hm, my suggestion was for it to go by which team is winning (whatever 'winning' means in the current match type).  Dunno if going by the scoreboard instead would be better or worse.
Logged
11:42 PM - Ultros: http://grooveshark.com/s/Faces/3h83um?src=5  Foooooooooolk
11:43 PM - Snowblind Aces: :0
11:43 PM - Snowblind Aces: this song has 3 fans
11:43 PM - Snowblind Aces: 2 of them are you

notajf

  • Guest
Re: Autoselect when teams are even (Low)
« Reply #14 on: March 23, 2012, 05:35:17 pm »

Hm, my suggestion was for it to go by which team is winning (whatever 'winning' means in the current match type).  Dunno if going by the scoreboard instead would be better or worse.
Should it be winning, or points? What about a series of fallbacks (balance -> winning -> points)?
Logged
Pages: [1] 2
 

Page created in 0.053 seconds with 65 queries.