Detection of winning team

65 views
Skip to first unread message

whisky

unread,
Sep 3, 2012, 5:30:30 PM9/3/12
to sc2ge...@googlegroups.com
Hi,
I have a little plugin that uses the API to parse replays and put some stats in a database. I have come across a peculiar problem recently (after SC2 patch 1.5 didn't occur before as far as i can tell). The winners of custom multiplayer games (2v2,3v3) are sometimes not determined correctly. Using SC2 Gears 12.3 and the latest API the winners are sometimes not even in the same team. As i noticed, both IReplay.getWinnerNames() and IPlayer.isWinner() return the same (wrong) values. This effect seems to happen more often in shorter games, but that might be a coincidence. The winning team is displayed correctly in the SC2 client

Is this a problem on my part (for example leaving the game too early), or is there some problem on the SC2 Gears side of things?

Regards,

Daniel

András Belicza

unread,
Sep 4, 2012, 12:22:09 AM9/4/12
to sc2ge...@googlegroups.com
Can you send me a few of these replays?

whisky

unread,
Sep 4, 2012, 4:51:02 PM9/4/12
to sc2ge...@googlegroups.com
Sure you can download a replay pack here:


Some 2v2 some 3v3.

Thanks for looking into it

András Belicza

unread,
Sep 11, 2012, 7:04:02 AM9/11/12
to sc2ge...@googlegroups.com
Bad winner info is also displayed in Sc2gears if you open them the Replay analyzer, so you're not doing anything wrong.

The problem is that the recorded game format is 1v1 in these replays. Team info has to be read/interpreted based on the game format. And since SC2 recorded them as 1v1, teams are parsed incorrectly.

András Belicza

unread,
Sep 11, 2012, 7:51:54 AM9/11/12
to sc2ge...@googlegroups.com
Correction: winner info is correct, the team info is incorrect.
Message has been deleted

whisky

unread,
Sep 12, 2012, 4:08:15 PM9/12/12
to sc2ge...@googlegroups.com
Would it be possible to implement a sanity check for correct teams before setting the winner variables, so it just doesn't show any winners instead of incorrect ones?

András Belicza

unread,
Sep 13, 2012, 2:30:27 AM9/13/12
to sc2ge...@googlegroups.com
As far as I know and understand, the situation is the following:

The replay is recorded incorrectly by SC2, stating that it was a 1v1 game (when clearly it was a team game).
Therefore the team info (e.g. in which team was a player) is parsed incorrectly.
Whether a player won or lost is correct.

These info are consistent: the Game info tab shows the same result as returned by the plugin API.

If this is not the case, please write concrete example (replay with the listed data, both from the game info tab and returned by the plugin API).

András Belicza

unread,
Sep 13, 2012, 2:32:37 AM9/13/12
to sc2ge...@googlegroups.com
Also keep in mind that in team games for players leaving first, at the time when their replay is saved the match outcome (who won and who lost) is not yet available and therefore not recorded in the replay. Sc2gears has an algorithm to determine the winners in these cases, but this algorithm is not 100% accurate and it requires the game actions to be parsed.
Reply all
Reply to author
Forward
0 new messages