Find if a game is AutoMM(ladder) or custom

10 views
Skip to first unread message

Tanag

unread,
Nov 8, 2011, 12:28:31 PM11/8/11
to phpsc2replay
I'm looking to find out whether a game is a ladder game or not. I've
noticed in SC2Gears it knows whether a game was AutoMM (Automatic
Match Making) or Private. Does phpsc2replay pull this data as well?
I don't see it anywhere in the parseables.

Any help would be appreciated. Currently I am checking via the map
names, but that's unreliable as a user could play a custom game on a
ladder map.
Additionally it makes language localization a lot more difficult
checking map names for each language.

Thanks!

Zsol

unread,
Nov 8, 2011, 12:54:54 PM11/8/11
to phpsc2...@googlegroups.com
Looks like we don't expose that information. What we currently have is
the 'gamePublic' attribute; which is set here:
http://code.google.com/p/phpsc2replay/source/browse/php/sc2replay.php#367
If that's false, it's definitely not a ladder match. If it's true, it
could either be a public custom game or a ladder match.

(Possible values I've seen for that attribute are 'Priv', 'Pub', 'Amm'
for multiplayer replays; I think it's empty for single player)

HTH,
Zsol

spa...@sc2buddy.net

unread,
Nov 8, 2011, 2:27:21 PM11/8/11
to phpsc2replay
We used to have a gameType attribute which seems to have vanished in
the last revision. but working backwards from the isGamePublic
attribute we can work out if it is ladder.

The following should help you create an isGameLadder attribute. If it
returns true it is an AMM which in my eyes means it's a ladder game
(although come to think of it I have no proof or documentation that
that's true lol)

Search for the 3 top lines below in sc2replay.php and add the 2nd
lines underneath them.

function isGamePublic() { return $this->gamePublic; }function
isGameLadder() { return $this->gameLadder; }
private $gamePublic;
private $gameLadder;

$this->gamePublic = (($attribArray[0x0BC1][0x10] == "Priv")?
false:true);
$this->gameLadder = (($attribArray[0x0BC1][0x10] == "Amm")?
true:false);

Then call it in the same way you call isGamePublic, and voila. It will
return true if it is an AMM.

spa...@sc2buddy.net

unread,
Nov 8, 2011, 2:29:43 PM11/8/11
to phpsc2replay
google has played about with the lines there but it should be obvious
where the line breaks should be.

Zsol

unread,
Nov 8, 2011, 3:13:34 PM11/8/11
to phpsc2...@googlegroups.com
isGamePublic is also true when you create a custom game and make it public

spa...@sc2buddy.net

unread,
Nov 8, 2011, 3:20:53 PM11/8/11
to phpsc2replay
Yes, but the isgameLadder attribute I outlined above doesn't. I was
querying whether AMM is true only when it is a ladder game?

Zsol

unread,
Nov 8, 2011, 3:26:35 PM11/8/11
to phpsc2...@googlegroups.com
Sorry I misread that part :)
Yes, I believe AMM = ladder only

Tanag

unread,
Nov 8, 2011, 5:27:19 PM11/8/11
to phpsc2replay
Wow thanks so much sparky. This will help me immensely. :)
Reply all
Reply to author
Forward
0 new messages