Coder Social home page Coder Social logo

vls / heroes.replayparser Goto Github PK

View Code? Open in Web Editor NEW

This project forked from barrett777/heroes.replayparser

0.0 2.0 0.0 298 KB

A C# library for parsing Heroes of the Storm replay files (.StormReplay). Currently developed and used by HOTSLogs.com.

C# 100.00%

heroes.replayparser's Introduction

Heroes.ReplayParser

A C# library for parsing Heroes of the Storm replay files (.StormReplay).

Currently developed and used by HOTSLogs.com.

Requirements: An external tool to extract files from the .StormReplay container, such as MpqLib.dll

Explanation

This project is not near complete. In fact, I've decided to open it to the public in hopes of others helping to complete this. Many areas of this code skip over unknown bytes of unknown structure, or skip over unknown information in a known structure. It would be great to know what everything is for, and store useful information in the appropriate Replay or Player objects.

Currently each file within the .StormReplay container has a separate parse function, which you will pass a 'Replay' object, and the bytes from that inner file, however you obtain it. Currently order does matter, as some rely on information from others. Here is an example order of parsing, and some explanation of information obtained in each:

MpqHeader.ParseHeader

Structure is known, most information is known

Replay Version and Heroes of the Storm Build are stored here

ReplayInitData.Parse

Structure is mostly unknown, most information is unknown

I believe this contains hero skins, mounts, and color tints, which would be neat to parse

Lots of game options as well, though most of this is based on Starcraft 2 and probably quite different now

ReplayTrackerEvents.Parse

Structure is known, most information is known

This currently has a lot of placeholders, but I expect Blizzard will fill this in, once development is further along.

ReplayDetails.Parse

Structure is known, most information is known

This is where most of the player details are found, as well as the map and timestamp the match occurred.

ReplayAttributeEvents.Parse

Structure is known, most information is known

Most of the information in this file is likely also defined elsewhere, but the format of this file is well known so it is most convenient to retrieve, and most resistant to new version format changes.

ReplayGameEvents.Parse

Structure is known, some information is known

I was pretty hasty in my implementation of these game events. Many of these events are pretty sloppy. I hurried because all I really wanted was hero talent choices.

ReplayServerBattlelobby.Parse

Structure is mostly unknown, minimal information is known

Currently I'm only using this to get player's BattleTags, using some horrible, horrible code. There may be other interesting information, I'm not sure. This wasn't mentioned much in Starcraft 2 projects.

Example Code

I've added a console application that demonstrates how to use Heroes.ReplayParser and MpqLib to parse replays and access the available data.

Special Thanks

Most of my progress is a direct result of other people's efforts with the Starcraft 2 replay file format. Of particular importance is this C# parser which was basically the foundation of this project: https://github.com/ascendedguard/sc2replay-csharp

These projects have also been very helpful in referecing different areas of the replay file format:

https://github.com/Blizzard/s2protocol

https://github.com/GraylinKim/sc2reader

https://code.google.com/p/phpsc2replay

heroes.replayparser's People

Contributors

barrett777 avatar vls avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.