EvenMatchOmni

Discuss and provide feedback on Maps.
User avatar
captainsnarf
Posts: 2714
Joined: Tue Jul 06, 2021 1:51 pm
Location: Washington
Server Sponsor: Yes
Server Admin: Yes
Contact:

Re: EvenMatchOmni

Post by captainsnarf »

pooty wrote: Thu Mar 24, 2022 9:46 am Snarf, I wonder if we could code it so when a match ends we do a balance check and if the difference is above the threshold, we do a reshuffle? The biggest problem is same as with manual shuffle, most don't seem to like it when they get reshuffled. When it happens there's like a chorus of whining about it.

The other side is there's been badly one-sided matches that either turn because the team finally gets their shit together, or they get a join or two that then tips it back.

When I think that often the balance isn't great its usually because PPH scores don't reflect:
Team Dynamic - If you get a team with decent players but they are all sit back an snipe, or you have the "Leroy Jenkins" types in power vehicles, or they just don't understand the node layouts, lack of comms all doing their own thing.
PPH inflation, where a lower level player has really high score on that map because last time they got to levi spam for 5 minutes...

But there's been more times I think where things even out or get turned around.
Sure we can do that. Life has been busy so haven't had much time to do mods but I'll see what I can do.
User avatar
pooty
Posts: 4537
Joined: Sat Apr 03, 2021 10:22 am
Location: Michigan
Server Sponsor: Yes
Server Admin: Yes

Re: EvenMatchOmni

Post by pooty »

Personally not a fan of one round matches. Between startup time, wait time (25s) to start, too much time spent loading/waiting, plus it gives you a nice back and forth. I don't think we want to change that...

I think Admin discretion on really bad mix to either reshuffle manually or force a new map.
User avatar
McLovin
Posts: 1194
Joined: Sat Apr 03, 2021 12:54 pm
Location: Salt Lake City, Utah
Server Sponsor: Yes
Server Admin: Yes

Re: EvenMatchOmni

Post by McLovin »

pooty wrote: Thu Mar 24, 2022 2:57 pm Personally not a fan of one round matches.
...
Exactly!
User avatar
Enyo
Posts: 1710
Joined: Mon Apr 05, 2021 11:27 pm
Server Sponsor: Yes
Server Admin: Yes

Re: EvenMatchOmni

Post by Enyo »

pooty wrote: Thu Mar 24, 2022 2:57 pm Personally not a fan of one round matches. Between startup time, wait time (25s) to start, too much time spent loading/waiting, plus it gives you a nice back and forth. I don't think we want to change that...

I think Admin discretion on really bad mix to either reshuffle manually or force a new map.
I'm fine with that long as you're willing to field the complaints every time an admin reshuffles, along with the accusations of us using it to get a winning team. 😉
“Never argue with stupid people, they will drag you down to their level and then beat you with experience.”
― Mark Twain
User avatar
captainsnarf
Posts: 2714
Joined: Tue Jul 06, 2021 1:51 pm
Location: Washington
Server Sponsor: Yes
Server Admin: Yes
Contact:

Re: EvenMatchOmni

Post by captainsnarf »

New version, download here EvenMatchOmni_2.5.zip

changes
- Add 'bShuffleTeamsAtRoundStart' config value, default is true

If bShuffleTeamsAtRoundStart is true, shuffle teams between rounds when team balance is off by TeamImbalancePPHThreshold.
User avatar
pooty
Posts: 4537
Joined: Sat Apr 03, 2021 10:22 am
Location: Michigan
Server Sponsor: Yes
Server Admin: Yes

Re: EvenMatchOmni

Post by pooty »

I'm fine with that long as you're willing to field the complaints every time an admin reshuffles, along with the accusations of us using it to get a winning team. 😉
Sure, I can mute FuriousRabbit. lol. But for the most part, the poll says just let it play out, for whatever reason, and maybe because yes it is fun to steamroll a team once in a while, it usually changes anyway. Like DJY last night, first round was complete steamroll, second round was pretty even, and there's always joins and quits so mostly just let it play out...

But if theres too much complaining then force it either reshuffle, or if I don't like the map and new map. ;)
User avatar
McLovin
Posts: 1194
Joined: Sat Apr 03, 2021 12:54 pm
Location: Salt Lake City, Utah
Server Sponsor: Yes
Server Admin: Yes

Re: EvenMatchOmni

Post by McLovin »

pooty wrote: Fri Mar 25, 2022 8:03 am ...
because yes it is fun to steamroll a team once in a while
...
Like when GTKY says, "Rape the core", LOL

Or if you really want to taunt the losing team, give them your mino. That is if they don't blow it up before they take it.
User avatar
pooty
Posts: 4537
Joined: Sat Apr 03, 2021 10:22 am
Location: Michigan
Server Sponsor: Yes
Server Admin: Yes

Re: EvenMatchOmni

Post by pooty »

EvenMatch 2.5 on server.
Have we figured out what's causing the scoring glitch? It happened on Arctic Stronghold last night too.

Config:

Code: Select all

[EvenMatchOmni.MutTeamBalance]
bCustomScoring=True
ActivationDelay=25
MinDesiredFirstRoundDuration=0
bShuffleTeamsAtMatchStart=True
;bShuffleTeamsAtMatchStart=False
bShuffleTeamsAtRoundStart=False
bRandomlyStartWithSidesSwapped=True
bAssignConnectingPlayerTeam=True
bIgnoreConnectingPlayerTeamPreference=True
bAnnounceTeamChange=True
bIgnoreBotsForTeamSize=True
bBalanceTeamsBetweenRounds=False
bBalanceTeamsWhilePlaying=False
bBalanceTeamsDuringOvertime=False
bBalanceTeamsOnPlayerRequest=False
bBalanceTeamsOnAdminRequest=True
bDisplayRoundProgressIndicator=False
SmallTeamProgressThreshold=0.500000
SoftRebalanceDelay=10
ForcedRebalanceDelay=30
SwitchToWinnerProgressLimit=0.600000
ValuablePlayerRankingPct=50
RecentBalancingPlayerTime=140
NoBalancingUndoTime=30
MinPlayerCount=4
TeamsCallString=
DeletePlayerPPHAfterDaysNotSeen=90
bDebug=True
PlayerGameSecondsBeforeStoringPPH=150
PlayerMinScoreBeforeStoringPPH=4
TeamImbalancePPHThreshold=400
CustomRegulationPoints=1
CustomOvertimePoints=1
User avatar
pooty
Posts: 4537
Joined: Sat Apr 03, 2021 10:22 am
Location: Michigan
Server Sponsor: Yes
Server Admin: Yes

Re: EvenMatchOmni

Post by pooty »

Code: Select all

if(EvenMatchMutator.bCustomScoring)
    {
        if(Level.Game.bOverTime)
        {
            oldscore = 1;
            newscore = EvenMatchMutator.CustomOvertimePoints;
        }
        else
        {
            oldscore = 2;
            newscore = EvenMatchMutator.CustomRegulationPoints;
        }

        onsgame = ONSOnslaughtGame(Level.Game);

        //bHasScored = Level.GRI.Teams[0].Score + Level.GRI.Teams[1].Score > 0;
        bHasScored = Level.GRI.Teams[Scorer.Team.TeamIndex].Score > 0;
        bCoreDestroyed = (onsgame.PowerCores[onsgame.FinalCore[0]].Health <= 0) || (onsgame.PowerCores[onsgame.FinalCore[1]].Health <= 0);

        if(bHasScored && bCoreDestroyed)
        {
            //todo unwind stats?
            Level.GRI.Teams[Scorer.Team.TeamIndex].Score -= oldscore;
            Level.GRI.Teams[Scorer.Team.TeamIndex].Score += newscore;
            if(Level.GRI.Teams[Scorer.Team.TeamIndex].Score < 0)
                Level.GRI.Teams[Scorer.Team.TeamIndex].Score = 0;

            Level.GRI.Teams[Scorer.Team.TeamIndex].NetUpdateTime = Level.TimeSeconds - 1;

        }
    }
}
I think I see the issue. First match scored, second match ends before OT.
I think this is getting called twice... once for the team that actually scored giving them 1 pt and second time its subtracting 2 (which then gets zero'd out) from the first team.

Everything depends on Scorer.Team.TeamIndex except bCoreDestroyed. Is it possible at the end of the match that this is getting called and if the other team scored first and match is over that bCoreDestroyed is always True (since one of the cores were blown up). I wonder if changing it to
bCoreDestroyed = onsgame.PowerCores[onsgame.FinalCore[Scorer.Team.TeamIndex]].Health <= 0

Would fix it? Assuming that only the losing team's core health goes to 0?
User avatar
captainsnarf
Posts: 2714
Joined: Tue Jul 06, 2021 1:51 pm
Location: Washington
Server Sponsor: Yes
Server Admin: Yes
Contact:

Re: EvenMatchOmni

Post by captainsnarf »

That is not the latest version of the source code. Sorry I haven't updated it yet on github. Will do shortly.

There is another issue here that is hard to spot. There are multiple places this score is being stored.

Level.GRI.Teams[].Score

ONSOnslaughtGame(Level.Game).Teams[].Score

Level.GRI and Level.Game are two different objects.

In the latest version I changed this:

Code: Select all

   if(bHasScored && bCoreDestroyed)
        {
            //todo unwind stats?
            Level.GRI.Teams[Scorer.Team.TeamIndex].Score -= oldscore;
            Level.GRI.Teams[Scorer.Team.TeamIndex].Score += newscore;
            if(Level.GRI.Teams[Scorer.Team.TeamIndex].Score < 0)
                Level.GRI.Teams[Scorer.Team.TeamIndex].Score = 0;

            Level.GRI.Teams[Scorer.Team.TeamIndex].NetUpdateTime = Level.TimeSeconds - 1;
        }
to this

Code: Select all

   if(bHasScored && bCoreDestroyed)
        {
            //todo unwind stats?
            onsgame.Teams[Scorer.Team.TeamIndex].Score -= oldscore;
            onsgame.Teams[Scorer.Team.TeamIndex].Score += newscore;
            if(onsgame.Teams[Scorer.Team.TeamIndex].Score < 0)
                onsgame.Teams[Scorer.Team.TeamIndex].Score = 0;

            onsgame.Teams[Scorer.Team.TeamIndex].NetUpdateTime = Level.TimeSeconds - 1;
        }

I see your point how that variable is the only odd ball. I'll make that change also.
Post Reply