Blizzard / s2protocol

Python library to decode StarCraft II replay protocols
MIT License
622 stars 111 forks source link

Where is Skin Info? #102

Open allenzhang1997 opened 4 years ago

allenzhang1997 commented 4 years ago

I was interested in whether a player is using skins in a replay.

I thought the skin info is this: m_syncLobbyState->m_userInitialData->m_skin

So the code was like (if I want to print out the first player's skin info): archive = mpyq.MPQArchive(replay_path) contents = archive.header['user_data_header']['content'] header = versions.latest().decode_replay_header(contents) baseBuild = header['m_version']['m_baseBuild'] protocol = versions.build(baseBuild) initData = archive.read_file('replay.initData') InitData = protocol.decode_replay_initdata(initData)['m_syncLobbyState']['m_userInitialData'] print(InitData[0]['m_skin'])

But for all the replays I checked, all players had b'' , which means they are not using skin....? While some of the replays did have players using skin.

So it that the right place to find skin info? Or is it actually stored somewhere else?