GW2's Mumble Link "context" data format

#1 - July 6, 2013, 3:47 p.m.
Blizzard Post

We know Mumble Link uses this data format:

Data format Description
uint32_t uiVersion
uint32_t uiTick
float[ 3 ] fAvatarPosition
float[ 3 ] fAvatarFront
float[ 3 ] fAvatarTop
wchar_t[ 256 ] name
float[ 3 ] fCameraPosition
float[ 3 ] fCameraFront
float[ 3 ] fCameraTop
wchar_t[ 256 ] identity / character name
uint32_t context_len
byte[ 256 ] context
wchar_t[ 2048 ] description

But what about the stuff inside context? GW2 writes context_len as 48 bytes, but what’s inside?

What I’ve been able to figure out within those so far is:

Data format Description
(u)int32_t region_id (speculated)
ubyte[ 4 ] server_ip (0.1.2.3)
byte[ 20 ] unknown
(u)int32_t map_id
byte[ 4 ] unknown
(u)int32_t world_id
byte[ 4 ] unknown
(u)int32_t build

Anything else useful in there?

#9 - July 10, 2013, 7:08 p.m.
Blizzard Post

You guys did a good job tracking down most of it.

Here’s the whole thing:


// uniquely identifies a map instance for mumble
struct MumbleContext {
    byte serverAddress[28]; // contains sockaddr_in or sockaddr_in6
    unsigned mapId;
    unsigned mapType;
    unsigned shardId;
    unsigned instance;
    unsigned buildId;
};

#11 - Aug. 6, 2013, 12:22 p.m.
Blizzard Post

In the latest patch, the mumble link was enhanced to provide more information about the character in the ‘identity’ field. Hopefully this extra information is useful for API developers.

#16 - Aug. 6, 2013, 10:07 p.m.
Blizzard Post

Cliff, thank you for sharing with us the API and continually improving them.

I know this may be a long shot, but…it would be fair to say that attempts to get MumbleLink to work on Mac OS X have been unsuccessful.
Is there any chance that you would be able to confirm with Transgaming that their cider wrapper of GW2 client for mac is actually executing the part of the Gw2 client code that is writing to a shared mapped memory “MumbleLink”?

Also, would it be against the rules to scan the memory of the GW2 client itself and get the necessary values of the coordinates, given the MumbleLink is not working at present on Mac?

Sorry, I wouldn’t expect Mac support any time soon. The Mac version of Mumble uses a completely different transport mechanism. Even if you could tap into the Cider win32 emulation layer, and create a memory mapped file, the GW2 code responsible may simply be disabled for safety when running on Mac. We are just not setup to test and support this scenario at this time.

It would be against our 3rd party app policy to scan the client in the manner you describe.

#19 - Aug. 8, 2013, 1:44 p.m.
Blizzard Post

Cliff, could please you provide us with some information about the character sets which are allowed (or better: forbidden, since the PCRE will match only ASCII chars) in character names so that we could e.g. run a regexp on them in order to store them in a DB or use them in scripts/apps/websites in a XSS/hack safe manner

I assume you’re asking about the JSON in the identity structure? JSON is UTF-8, and so any valid UTF-8 character is possible. You’ll need to do whatever you need to do to store and safely present any data, though I can’t really think of any possible attacks related to the mumble data.

It’s not clear to me how PCRE is related to any of this.