EvenMatchOmni

Discuss and provide feedback on Maps.
User avatar
captainsnarf
Posts: 2708
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.6.zip

Changes
- more updates to customscore function
- add server info line for evenmatchomni version

meat of changes, note it no longer uses Level.GRI.Teams[]

Code: Select all

onsgame = ONSOnslaughtGame(Level.Game);

bHasScored = onsgame.Teams[Scorer.Team.TeamIndex].Score > 0;
bEnemyCoreDestroyed = onsgame.PowerCores[onsgame.FinalCore[1-Scorer.Team.TeamIndex]].Health <= 0;

if(bHasScored && bEnemyCoreDestroyed)
{
    //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;
}
User avatar
pooty
Posts: 4525
Joined: Sat Apr 03, 2021 10:22 am
Location: Michigan
Server Sponsor: Yes
Server Admin: Yes

Re: EvenMatchOmni

Post by pooty »

So its still doing the OT scoring thing, where if I team gets 2pts on the second round it subtracts 2 (and then makes it 0 if negative)...
Maybe the solution is since the 2pt regulation was for a mulligan which is irrelevant now, maybe just make regulation 2 mins and let the cores begin to drain, or maybe just make regulation 1 minute. I can slow the core drain a bit so the matches are about the same length of time. As it sits regulation win doesn't mean anything different anyway (except losing a point like a reverse mulligan or something).

Also, on the joins, its not working right. see: Image

I was specing, balance, (teams were 3v3) and you can see joined me to red, and should have put me on blue.
User avatar
captainsnarf
Posts: 2708
Joined: Tue Jul 06, 2021 1:51 pm
Location: Washington
Server Sponsor: Yes
Server Admin: Yes
Contact:

Re: EvenMatchOmni

Post by captainsnarf »

So I pointed out earlier there are two places the score is stored and kept track - Level.Game and Level.GRI.

I made the change to use Level.Game instead of Level.GRI. I'm going to put that back and just leave your fix and see what that does. :?
User avatar
captainsnarf
Posts: 2708
Joined: Tue Jul 06, 2021 1:51 pm
Location: Washington
Server Sponsor: Yes
Server Admin: Yes
Contact:

Re: EvenMatchOmni

Post by captainsnarf »

ok, here it is EvenMatchOmni_2.7.zip

This goes back to using Level.GRI , but uses your fix for core destroyed.

Code: Select all

 onsgame = ONSOnslaughtGame(Level.Game);
 bHasScored = Level.GRI.Teams[Scorer.Team.TeamIndex].Score > 0;
 bEnemyCoreDestroyed = onsgame.PowerCores[onsgame.FinalCore[1-Scorer.Team.TeamIndex]].Health <= 0;

 if(bHasScored && bEnemyCoreDestroyed)
 {
     //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;
 }
User avatar
captainsnarf
Posts: 2708
Joined: Tue Jul 06, 2021 1:51 pm
Location: Washington
Server Sponsor: Yes
Server Admin: Yes
Contact:

Re: EvenMatchOmni

Post by captainsnarf »

So you mentioned that it seems like it's getting called twice. I added one more change this morning.

Code: Select all

if(Role == ROLE_Authority)
{
...
}
I didn't see where this would be running on the client but I think I found a place it might happen. I added this check to make sure it's only server code running.
User avatar
captainsnarf
Posts: 2708
Joined: Tue Jul 06, 2021 1:51 pm
Location: Washington
Server Sponsor: Yes
Server Admin: Yes
Contact:

Re: EvenMatchOmni

Post by captainsnarf »

Also, I forgot to mention the new joins.

In normal/default behavior, when teams are even the player goes to their preferred team preference which is a setting you can change. EvenMatch works by changing their preferred team to whatever it wants it to be in the ModifyLogin() method. I think the problem is UAdminMod and ONSPlus also use ModifyLogin() to change the team preference. Not sure who is winning but apparently not EvenMatch. If ONSPlus bDisablePreferredTeam is true then I don't think EvenMatch will work correctly for new joins. It depends which mutator runs last.
User avatar
pooty
Posts: 4525
Joined: Sat Apr 03, 2021 10:22 am
Location: Michigan
Server Sponsor: Yes
Server Admin: Yes

Re: EvenMatchOmni

Post by pooty »

Code: Select all

ONS-2Fast2Furious.ut2?Translocator=False?Gamestats=True?Mutator=UAdminModV095b.UAdminMod,ONSPlus_101beta31.ONSPlusMutator,EvenMatchOmni.MutTeamBalance,CSBadgerFix.MutBadgerFix,CSVehiclePack.MutSnarfVehiclePack?MaxPlayers=32
No idea how UT does load order.....I can take a look through and disable and team stuff on UAdminMod and ONSPlus as well.
User avatar
pooty
Posts: 4525
Joined: Sat Apr 03, 2021 10:22 am
Location: Michigan
Server Sponsor: Yes
Server Admin: Yes

Re: EvenMatchOmni

Post by pooty »

So I set the ONSPlusOmni (now loaded) to allow preferred team, so hopefully it works.

Hopefully the game scoring thing is fixed too, if not I can adjust the timing (right now 4 mins regulation and 8 pts/sec core drain ..(which would be fastest 4500 (core health) / 8 pts/sec = 9.375 mins.
However OvertimeCoreDrainPerSec - OvertimeCoreDrainPerSec * TeamNodes / TotalNodes (https://unrealadmin.org/forums/showthread.php?t=17546)
So if there's 10 nodes and you have 0 nodes
8 - (8 * 0/10) = 8 pts sec.
If you have 5 of 10 (even type map LIKE DRIA)
8 - (8* 5/10) = 4pts sec. So now the match takes twice as long. So instead of 9.4 mins, a Dria might take 17-18 ish.

I think looking at this, I'd up the core drain to 10 / s. It will speed up the matches overall, and lopsided matches will end even faster.
Going to set it to 10 and see how it plays, leaving the 4 mins regulation time (which is more or less meaningless now with all 1 pt rounds), but it gives your team time to recover a bad start without losing core points. So at 10 if you have no nodes its only 7.5 mins of misery...which means to make a comeback you have to do it a bit faster. With 10 a dria map (10 - (10*5/10)) = 5pts sec is going to be 15 mins...which is plenty long for that map, IMO.
User avatar
pooty
Posts: 4525
Joined: Sat Apr 03, 2021 10:22 am
Location: Michigan
Server Sponsor: Yes
Server Admin: Yes

Re: EvenMatchOmni

Post by pooty »

So I think tonight dira - Randomizer full 3 rounds ended up at about 33 minutes...which is plenty long IMO.
Matches did go faster, anyone feel that it was too fast? I'll take faster maps which = more maps per night.
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 »

captainsnarf wrote: Mon Mar 28, 2022 11:51 pm Also, I forgot to mention the new joins.

In normal/default behavior, when teams are even the player goes to their preferred team preference which is a setting you can change. EvenMatch works by changing their preferred team to whatever it wants it to be in the ModifyLogin() method. I think the problem is UAdminMod and ONSPlus also use ModifyLogin() to change the team preference. Not sure who is winning but apparently not EvenMatch. If ONSPlus bDisablePreferredTeam is true then I don't think EvenMatch will work correctly for new joins. It depends which mutator runs last.
This would be good if you can get new joins on the team that needs it the most. Which team is that?
1. The one that is currently losing.
2. Or the team that has the lower balance count?
Post Reply