Open ZetaTwo opened 6 years ago
Hello, any news ? =) Seems the idea was good
Haven't really worked on this since. I had some issues with missing features in Kaitai and then I lost interest at some point. I may pick up the project again later. Are you looking for a demo parser?
Hello, well in fact I'm not looking for a demo parser since I already worked on one long time ago (statshelix/demoinfo). At that time I already thought of using both kaitai and protobuf together but never took time to get further. It's good to see someone at least tried it :p
In fact I'm trying to parse .dem file recorded for Counter-Strike Source and not CS:GO. So I tried to analyze the differences in the bytes between the two files. I thought using kaitai might help me in this task. In fact don't need to parse everything but I just want to be able to extract the frags to recompose the scoreboard. But sadly it seems both protocols are too different from one another...
Ah cool. Yeah Kaitai mostly worked for parsing the outer layer but I encountered issues at when point since Kaitai (at least back then) didn't support dictionary-like back references. I have not looked at the CS:S format but I would be surprised if there wasn't enough public info in the modders wikis etc to build a parser. Whether the same issue appears with Kaitai is a different question though.
Yeah I also thought it should exists but except this https://github.com/alliedmodders/hl2sdk/blob/css/public/demofile/demoformat.h and https://github.com/alliedmodders/hl2sdk/blob/c33f7155e9aff9573c20d86e10c8158425a3d67a/common/proto_version.h which is pretty light, I can't find anything else useful...
The thing is with CSGO, Valve made the proto files public, which they didn't with CSS...
Ah, I see. Yeah that's really annoying. You can of course recover the "wire types" from the protocol but it will be quite a pain to figure out what each value corresponds to I guess.
Packet frames contain messages. Messages has an "outer" type which is parsed. Some of them contain additional "inner" data which needs to be parsed. There are basically X ways to do this:
First I started doing 3 but that breaks the possibility to use multiple languages. Then I started thinking about 1 but realized that it is overkill for now and I'll probably just go with 2.