Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sc2reader replay.messages and sc2reader.events.message.ChatEvent not getting all messages sent #153

Open
Andrene opened this issue Aug 26, 2021 · 2 comments

Comments

@Andrene
Copy link
Contributor

Andrene commented Aug 26, 2021

It looks like SC2Reader for some reason isn't reading all in-game messages. I'm not sure if it's just this one replay or not as I don't really check through them. This one instance was brought to my attention, otherwise I wouldn't have noticed it.

When either using the chatevent or replay.messages a few messages are missed at a certain point in this specific replay. Messages from the user affected were processed earlier in the replay which is the weird part...
Heres the sc2reader output

[00:23:02] Chat - Gudash: ?
[00:23:04] Chat - Gudash: u wanna team
[00:23:11] Chat - Gudash: k
[00:24:17] Chat - ChannelMiner: close
[00:24:33] Chat - Gudash: help me
[00:24:43] Chat - ChannelMiner: I almost got him
[00:24:45] Chat - Gudash: lol
[00:24:58] Chat - Gudash: hes chasing my ass
[00:24:59] Chat - Gudash: cap
[00:25:10] Chat - Gudash: up right
[00:25:12] Chat - Gudash: of screen
[00:25:16] Chat - Gudash: idk where it is
[00:25:17] Chat - Gudash: xD
[00:25:19] Chat - Gudash: ye

Heres what I get from s2protocol

{'m_chatMessage': b'close', '_event': 'NNet.Game.STriggerChatMessageEvent', '_eventid': 32, '_gameloop': 23315, '_userid': {'m_userId': 7}, '_bits': 72}
{'m_chatMessage': b'so', '_event': 'NNet.Game.STriggerChatMessageEvent', '_eventid': 32, '_gameloop': 23365, '_userid': {'m_userId': 4}, '_bits': 48}
{'m_chatMessage': b'your answer now?', '_event': 'NNet.Game.STriggerChatMessageEvent', '_eventid': 32, '_gameloop': 23409, '_userid': {'m_userId': 4}, '_bits': 160}
{'m_chatMessage': b'help me', '_event': 'NNet.Game.STriggerChatMessageEvent', '_eventid': 32, '_gameloop': 23579, '_userid': {'m_userId': 11}, '_bits': 88}
{'m_chatMessage': b'cool', '_event': 'NNet.Game.STriggerChatMessageEvent', '_eventid': 32, '_gameloop': 23646, '_userid': {'m_userId': 4}, '_bits': 64}
{'m_chatMessage': b'get armory only', '_event': 'NNet.Game.STriggerChatMessageEvent', '_eventid': 32, '_gameloop': 23677, '_userid': {'m_userId': 4}, '_bits': 152}

For some reason user 4's messages aren't getting processed at this particular time in the replay, but they were earlier...

Here's the replay if you want to take a look.
not_all.zip

@StoicLoofah
Copy link
Collaborator

That is unusual. Off the top of my head, it's possible that this could be a core problem in the readers not parsing chat properly, or maybe something wonky is happening in the translation into events. It would definitely take some debugging, so I invite anyone to jump in to take a deeper look.

Just to confirm, does s2protocol appear to be getting all chat messages parsed correctly?

@Andrene
Copy link
Contributor Author

Andrene commented Aug 30, 2021

Yes, although it looks like the method I copied for s2protocol is referencing the trigger event for a chat event. After hooking the sc2reader trigger_chat_message_event up to a game event that I defined, it produces expected results. So, the messages are definitely getting sent, and noticed by the game. Either they arent getting read properly, or aren't getting saved into replay.messages(?) it would seem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants