barrett777 / heroes.replayparser Goto Github PK
View Code? Open in Web Editor NEWA C# library for parsing Heroes of the Storm replay files (.StormReplay)
License: MIT License
A C# library for parsing Heroes of the Storm replay files (.StormReplay)
License: MIT License
Commit 4fd0b11 broke parsing for Custom games with observers.
ClientListByWorkingSetSlotID also includes observer players but the Player value will be null.
Replays attached.
Replays.zip
I parsed a replay file to extract the map objectives data, and I know it will be stored in the player's ScoreResult
-> MiscellaneousScoreResultEventDictionary
.
But I found there are some strange data:
The map is Volskaya Foundry
, and the replay parsed with no error.
But the MiscellaneousScoreResultEventDictionary
data are:
"MiscellaneousScoreResultEventDictionary": {
"TeamTakedowns": 4,
"Tier1Talent": 1,
"Tier2Talent": 1,
"Tier3Talent": 2,
...
"DragonNumberOfDragonCaptures": 0,
"DragonShrinesCaptured": 0
They are the map objectives data of the Dragon Shire??
The same thing happed again when I parsed a Hanamura replay, this time the MinesSkullsCollected
from Haunted Mines showed up.
The current way I am getting hero deaths isn't very good. It is accurate, but only for older replays. In the current patch 35360, this method only works for 'Garden of Terror' replays.
Currently I am getting deaths from a replay.game.event cutscene event, which I believe is the screen shatter effect playing when a hero dies. I'm not sure why this is only in 'Garden of Terror.'
The best way to track hero unit deaths would be using the in game tracker event for unit deaths - unfortunately there is a known issue in Starcraft 2 which I believe is applying to hero units here:
"There's a known issue where revived units are not tracked, ..." (https://github.com/Blizzard/s2protocol)
The hero units in Heroes of the Storm do have a death event for the hero's first death, and as the above comment suggests, they no longer receive born/position/death events after their first death.
Until Blizzard fixes that, there may be another replay.game.event we can use for tracking deaths, but I haven't found it yet.
Alright, I figured out the issue with my Lambda parser. I read the replay in as bytes.
So, it throws error "Heroes.ReplayParser.MPQFiles.DetailedParsedException: 'Not Hero'"
So to test the similar approach my Lambda parser uses, I changed the input file section to the following.
byte[] bytes = System.IO.File.ReadAllBytes(replayFile);
var (replayParseResult, replay) = DataParser.ParseReplay(bytes, ParseOptions.MediumParsing);
Hello!
After using your library quite a lot, I came across replays involving Murky. Killing Murky only yields a quarter of a kill, and thus it takes four Murky kills for a complete takedown.
Is it possible to retrieve the number of kills, assists and deaths as doubles instead of integers, as it is shown in the in-game stats-board? This would allow more detailed analysis and insight.
If system region format is set to Turkish (either Turkey or Cyprus), the line:
These replays:
https://drive.google.com/drive/folders/19xOgMhJtKwBq9vRLTziRNCvGkwi-3Onj?usp=sharing
Fail on this line:
There is an issue with the parser. Default/Minimal parsing returns a result for the linked replay, but when I run Medium or Full, it throws an exception.
I have narrowed it down to ShouldParseDetailedBattleLobby flag causing the exception.
Throw exception at System.IndexOutOfRangeException: 'Index was outside the bounds of the array.'
Looks like it is passing 15 for userID.value into the replay.ClientListByUserID array which is null at index 15
Are the messages object meant to parse the in-game chat? If so, they are not working
Attaching replay file.
I am getting an extra 8th talent for stitches in this replay. Occurs after level 20 talent. Thoughts?
It's unclear how the build and packaging functions. Particularly, versioning is done in the GitVersion build task, but dotnet build
doesn't function with this build task.
I can't find out how to create a local package and how to version it.
Games vs. bots give XP however are ignored by HotsLogs, causing discrepancies between actual character level and tracked character level.
Hi,
richTextBox1.AppendText(replay.ReplayHash.ToString());
This always returns a blank GUID - how do we uniquely identify a particular replay?
For the latest patch, the parser is returning patch version 2.54.2.85894, but the launcher says we are on 2.54.3.85894.
The heroprotocol is for 2.54.3.85894 as well. Is this a problem with the parser, or did blizz mess something up? Or am I missing something?
You're violating Blizzard's EULA by parsing 'Hero of the Storm' game replays.
http://us.blizzard.com/en-us/company/legal/eula.html
Section 2. BLIZZARD’S OWNERSHIP.
A. Blizzard is the owner or licensee of all right, title, and interest in and to the Battle.net Client, Battle.net, the Games, Accounts, and all of the features and components thereof. Battle.net and the Games may contain materials licensed by third-parties to Blizzard, and these third-parties may enforce their ownership rights against you in the event that you violate this Agreement. The following components of Battle.net and/or the Games, are owned or licensed by Blizzard:
- All recordings, Game replays, or reenactments of in-game matches, battles, duels, etc.;
Ben, good day!
I'm trying to parse locally my replies as in example code and getting error at the line "ReplayTrackerEvents.Parse" - "Unexpected data in tracker event".
Replay file for example: https://www.dropbox.com/s/ilzza52r0iyn5uf/TestReplay.StormReplay?dl=0
Code:
var bytes = File.ReadAllBytes(filename);
var replay = new Replay();
MpqHeader.ParseHeader(replay, filename);
ReplayInitData.Parse(replay, bytes);
ReplayTrackerEvents.Parse(replay, bytes);
Can you help me please, what am I doing wrong?
P.S.
And maybe I found in "Example Code" minor misprint:
MpqHeader.ParseHeader(replay, bytes); , second parameter should be "filename"?
The build should be automated through CI with build configuration in the repo. I would contribute it, but I don't understand how the build works
Hey again,
Wasn't sure how best to report this as it is related to the actual website, not the parser.
Just refreshed the page and noticed the site now displays weird on my smaller monitor (17", 1280 x 1024 Res). Image attached - Notice everything is being pushed to the left side.
Tested in Chrome, Firefox, and IE, all have the same problem. Happens on all pages. Displays normally on my other monitor at any size.
No errors in console.
Did you update the CSS?
Is it possible to do something to get .NET Core 1.0 support? I tried some stuff but SharpZipLib doesn't seem to want to work with it. But I'm not a dotnet person, so I'm mostly just confused by all of this and may have missed something obvious.
I'd like this because I want to run this project on AWS Lambda, which doesn't support 2.0 yet.
v 1.2.3. is API breaking vs 1.2.2. The package seems to be packaged with semver (at least, according to the used plugins), which means the package major version should have changed to 2.0.0 per https://semver.org/
I think I am running into this issue on more than this replay, but I will submit this one.
I am getting empty battletag_name and battletag_id values for the player playing Ana in the following game
Hi,
I think in ReplayAttributeEvents.cs the text for Difficulty.Hard is "hdvh" instead of "hard". At least in my replays I have this text when I choose Veteran. And I'm not sure if "insa" even exists in HotS.
It would be good to have nightly builds published as pre-releases packages on merge.
You might want to create a 'csharp5' branch that contains the code which compiles on C# 5, I needed it, so I figured to make it available.
Trying to build v1.2.3 fails for me with the following error:
"C:\Users\marti\source\hots\Heroes.ReplayParser\Heroes.ReplayParser.ConsoleApplication\ConsoleApplication.csproj" (default target) (1) ->
"C:\Users\marti\source\hots\Heroes.ReplayParser\Heroes.ReplayParser\Heroes.ReplayParser.csproj" (default target) (2:2) ->
(GetAssemblyVersion target) ->
C:\Program Files\dotnet\sdk\3.1.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.GenerateAssemblyInfo.targets(160,5): error MSB4044: The "GetAssemblyVersion" task was not given a value for the required parameter "NuGetVersion". [C:\Users\marti\source\hots\Heroes.ReplayParser\Heroes.ReplayParser\Heroes.ReplayParser.csproj]
4 Warning(s)
1 Error(s)
Time Elapsed 00:00:01.55
I build using MSBuild.exe Heroes.ReplayParser.ConsoleApplication/ConsoleApplication.csproj
Foole's MPQTool is published as source of this package. That's problematic for multiple reasons, among which:
Error getting thrown at
Hi @barrett777,
I am attempting to parse the 'replay.game.events' file and I find that an event with integer value 15 is causing a not implemented exception from the default handler in the event switch. Do you have any idea what the structure could be for event 15? There isn't anything in the sc2protocol repo...
ReplayInitData.Parse
throws various exceptions on latest version of HotS. I've attached a few replays that I can't parse.
In this latest patch, every players BattleTag value is 0. Not sure if blizz broke something, or if its something with the parser
2021-06-19 22.16.58 Silver City.zip
2021-06-19 20.28.04 - 30k vs. STORM Esports - Game 1 - Sky Temple.zip
No talents, no stats.
Hey there,
I don't really have any experience with this sort of thing but I have looking over the replays for the few last day to see if there is any way to track player deaths.
The one thing I have noticed is that the replay.resumable.events file contains a number of references to each player equal to the number of times they have died.
I would say I have found this to be ~80% accurate, but I have noticed (from my small sample group) that these are often for a Jaina/Raynor, so I believe most differences were caused by pet deaths. The only other factor I was able to identify when the count in the events file did not match the player death count was the player dying at the end of the match, so a death event may not have been recorded before the game was "over."
I am actually really interested in this project - But I am struggling a bit with how you are able to determine what the specific bit/byte references are, and how you are able to decode some of this gibberish.
Just wanted to share as an avid HotS player!
@barrett777, you provide a wonderful service for the HotS community with http://hotslogs.com and some of us would love to help give back.
Would you consider open sourcing http://hotslogs.com to accept pull requests? I know there's a bunch of UX improvements I'd love to personally incorporate, but I'm sure there are things others would love to contribute too. What about your own honey do list? Have you considered publishing that and letting the community cherry pick and contribute?
Thanks a bunch!
Hi how do you manage the map & character name on hotslogs as they are different for every localization?
Do you use a a map id / character id from replay.details or any other way?
thank you
First off, really great work on this library! I'm surprised that it has received limited attention so far.
Is it currently possible to determine the final number of takedowns, deaths and the score of a player at the end of the game using this library? I dug through the game events and tracker events and didn't manage to find anything pertaining to these stats. I wanted to use this to write a tool that permits me to track my performance with each hero (wins/losses, takedowns/deaths/score per game, etc.).
The ClientList only seems to contain win/loss and hero data.
Thanks!
Any chance you make release branches when a new stable version is available?
Parsing this map gives no talents or scores.
Not sure if this can be resolved or not, or maybe a bypass option?
I started using a PROXY in my Chrome and as soon as I did hotslogs no longer connected properly - (it's in EU).
I disabled it in LAN in chrome, and instantly all files uploaded successfully.
I'm assuming it's using a http connection settings provided via chrome/default browser - any chance of a bypass proxy/connection setting?
Hi, how would I go about calculating the hit rate of Ana's q from a replay? I'm a veteran C# programmer, a few tips should be enough
Hello!
I've tried to parse several old replays with success, but all my replays with of ReplayBuild 49838 fails due to an IndexOutOfRangeException.
It seems that workingSetSlotID in ReplayInitData.Parse is set to 255, which is an invalid index for the array Replay.ClientListByWorkingSetSlotID of size 16.
I've attached two of the replays failing due to this error.
See link below for 39 replays that fail with "UnexpectedResult". I will take a look to try and determine why its failing, but figured i'd throw this out there if anyone else wants to take a look.
https://heroesprofile.s3.us-east-2.amazonaws.com/Replays.zip
@koliva8245 This might be something you are interested in per your last comment in HeroesToolChest/HeroesMatchTracker#13
The players that got match awards got doubled.
This popped up within the past few patches
Something has changed in the replay.game.events event structure, and it has to do with Lost Vikings and Longboat Raid.
It likely has to do with unit selection or movement. I spent some time trying to find it, but wasn't too easy. I'll look into it more in the future
For now, this means we can't parse talent selections for most replays with a 'Longboat Raid' Viking player
To parse replay.server.battlelobby try using https://github.com/EugenPolyakov/HOTS_battlelobby/blob/master/battlelobby.py
Sorry for te spam.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.