theli
07-13-2010, 04:10 PM
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 :eek: 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 :p
and you already can make some stupid things like this heat map of TREES deaths (matchid: 6314909):
http://img215.imageshack.us/img215/9825/treesc.png
or this player positions/movement map for madman (played by YoDa, matchid: 7066386)
http://a.imageshack.us/img29/6922/madmanout2.png
(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
Requirements:
Python 2.6
bitarray python module http://pypi.python.org/pypi/bitarray/
example heatmap scripts require python module heatmap http://www.jjguy.com/heatmap/
disclaimer:
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/showthread.php?p=1140614 )
download : http://dl.dropbox.com/u/4443078/HoN/s2r2/s2r2.7z
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
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 :eek: 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 :p
and you already can make some stupid things like this heat map of TREES deaths (matchid: 6314909):
http://img215.imageshack.us/img215/9825/treesc.png
or this player positions/movement map for madman (played by YoDa, matchid: 7066386)
http://a.imageshack.us/img29/6922/madmanout2.png
(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
Requirements:
Python 2.6
bitarray python module http://pypi.python.org/pypi/bitarray/
example heatmap scripts require python module heatmap http://www.jjguy.com/heatmap/
disclaimer:
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/showthread.php?p=1140614 )
download : http://dl.dropbox.com/u/4443078/HoN/s2r2/s2r2.7z
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