S2R2 is a Python module to parse replay files
It is NOT complete, NOT accurate, may do something incorrect, may be based on incorrect assumptions, etc
What this library does is just parsing entity snapshots ... and thats it
Some data like chats is just skipped for now since main concern was to parse entities
parsing speed is pretty slow ...
Interface is undocumented and pretty lowlevel ... you just have NextFrame() method to advance to next server frame and you have EntityPool property which is the Pool of all world entites and their states for current frame :-/
i doubt someone will find this usefull but i had great time reverse engineering replay format
and you already can make some stupid things like this heat map of TREES deaths (matchid: 6314909):
or this player positions/movement map for madman (played by YoDa, matchid: 7066386)
(i may have messed something with those maps though)
this library (and maybe some example usage) will be/is worked on untill i completely lost interest in this
bitarray python module http://pypi.python.org/pypi/bitarray/
example heatmap scripts require python module heatmap http://www.jjguy.com/heatmap/
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
oh,and about legality of this: S2Ikkyo said one is 'free to figure on your own' about replaydata format ( http://forums.heroesofnewerth.com/sh....php?p=1140614 )
Link : https://github.com/theli-ua/s2r2
this is abandoned, left for research purposes only. you better learn how to get plain text game logs as that should contain most of information you want
Last edited by theli; 05-31-2013 at 09:08 AM.
I must say; awesome job, this can become a very good analyzing tool, in whatever way
Well done, that's impressive! The tree script took 15 minutes to complete (on a 11mb file with 51m40s of game play) but it seems to work nicely:
Could you also share the map background? Couldn't find it in any of your files.
Great research, looking forward to more!
I would have a tecnical question if someone can answer to me..
Inside the struct used for the library, in the "Hero" struct, there are a lot of variable that define the entity hero. One in particolary is in my interest, 'm_yStatus' using to define the status of the hero... what's the difference from the value 0,1,2,3 of this field ?
In your example is used this control:
if x.EntityPool[id]['m_yStatus'] != 0
Your work is awesome a documentation about the replaydata structure will be very nice
unpack_enabled is some pretty gnarly rerversing - nice! Are you still alive and kicking theli?
nat that alive and active as i used to be, also, this particular one project is kinda abandoned since i can't think of a really good use case for this which is worth the efforts
I tried sending you a private message, but was wondering if you'd care to chat over some other messaging service. I'm in the process of porting (and extending) your library to C# and had some questions of some of your reversing. As an avid (albeit newbie) reverse engineer, I've been enjoying comparing your work and to the disassembly and debugger. Let me know if you have any time or interest in sharing some of your experience. :]
I do this in C#, but I do it as the game is running rather than parsing the replays by hooking the snapshot parsing functions. Is that ultimately what you're trying to do, devINVISIBLE?
chat logs are more accessable from game logs then from replays
I have something I wrote for parsing replay files. What exactly do you want to get out of the replay?
http://hondiff.appspot.com/gamelog/matchid to easily download zipped text game logs