Re: EvenMatchOmni
Posted: Sun Jan 23, 2022 11:59 am
Can you change it to guids? The Server maintains a list of guids for known players.
Home of Omnip)o(tents 2.0
https://www.omnipotents.com/forums/
Does shuffle restart the map?captainsnarf wrote: ↑Sat Jan 22, 2022 2:29 pm Ok, so I have shuffle working and also the config database for known players.
For shuffle, admin must login then type "shuffle" in chat to shuffle teams.
...
Sure np. The existing code hashes all the IDs so it's not as straightforward as it might seem but easily doable.
It does not restart the map.
I like the idea of it working as a chat command. I'd even like "admin kick" to work from the chat, that way everyone could see that "idiot that is idle" got kicked.captainsnarf wrote: ↑Sun Jan 23, 2022 2:06 pm ...
Also I wasn't sure about making it a chat command. I just copied the 'teams' chat stuff. If you want I can change that to make it just a regular console command.
Code: Select all
"043dc3cc1018c2bb2f546b3634fde396 captainsnarf xxxxpasswordhashxxxx"
Code: Select all
[EvenMatchKnownPlayerDatabase KnownPlayerPPH]
PPH=(ID="043dc3cc1018c2bb2f546b3634fde396",Multiplier=1.0)
Can't we just use whatever the Mulligan does, its essentially a full restart...I think making it restart is probably possible but would take a ton of work.
Mulligan doesn't restart though. Someone kills the core, the round ends, and when the next round starts it determines if it was a mulligan or not and shuffles teams. This happens inside the CheckScore function. I could probably make it reset the score also like a mulligan, but I'm not able to reset the map without a bit more work. Whatever active powernodes are out there would still be active.
Code: Select all
if (Level.GRI.ElapsedTime < MinDesiredFirstRoundDuration && Level.GRI.Teams[0].Score + Level.GRI.Teams[1].Score > 0) {
MinDesiredFirstRoundDuration = 0; // one restart is enough
bBalancing = True;
if (Level.GRI.Teams[0].Score > 0)
FirstRoundResult = 1;
else
FirstRoundResult = 2;
Tag = 'EndGame';
log("Quick first round, shuffling teams...", 'EvenMatch');
ShuffleTeams();
BroadcastLocalizedMessage(class'UnevenMessage', 0,,, Level.GRI.Teams[FirstRoundResult-1]);
// force round restart
if (Level.Game.GameStats != None) {
if (EvenMatchMutator.bDebug) log("Resetting team score stats...", 'EvenMatchDebug');
if (Level.GRI.Teams[0].Score > 0)
Level.Game.GameStats.TeamScoreEvent(0, -Level.GRI.Teams[0].Score, "reset");
if (Level.GRI.Teams[1].Score > 0)
Level.Game.GameStats.TeamScoreEvent(1, -Level.GRI.Teams[1].Score, "reset");
}
if (EvenMatchMutator.bDebug) log("Resetting team scores...", 'EvenMatchDebug');
Level.GRI.Teams[0].Score = 0;
Level.GRI.Teams[1].Score = 0;
bBalancing = False;
return true;