IPB WARNING [2] Use of undefined constant TOPIC - assumed 'TOPIC' (this will throw an Error in a future version of PHP) (Line: 1143 of /cache/skin_cache/cacheid_55/skin_topic.php)
IPB WARNING [2] Use of undefined constant REPLY_BUTTON - assumed 'REPLY_BUTTON' (this will throw an Error in a future version of PHP) (Line: 1143 of /cache/skin_cache/cacheid_55/skin_topic.php)
IPB WARNING [2] Use of undefined constant FORUM - assumed 'FORUM' (this will throw an Error in a future version of PHP) (Line: 1143 of /cache/skin_cache/cacheid_55/skin_topic.php)
IPB WARNING [2] Use of undefined constant TOPIC - assumed 'TOPIC' (this will throw an Error in a future version of PHP) (Line: 1144 of /cache/skin_cache/cacheid_55/skin_topic.php)
IPB WARNING [2] Use of undefined constant SHOW_PAGES - assumed 'SHOW_PAGES' (this will throw an Error in a future version of PHP) (Line: 1144 of /cache/skin_cache/cacheid_55/skin_topic.php)
replay parser code - GameReplays.org
 
Explore GameReplays...

Company of Heroes

replay parser code

Reply to this topic Start new topic
# 1pingtoft Aug 14 2011, 18:07 PM
I wanted to see if I could decode a replay file. As it turns out, I could.
Now, I'm not sure what I want to do with it, so I might as well set it free...

There are a couple of bytes that I have yet to decipher, but it parses 99% of the information.
Attached File coh.replayparser.rar
Size: 6.73k
Number of downloads: 342

Posts: 4,341

Game: Company of Heroes


+
Reply to this topic Start new topic

Don't like this display mode? Switch to: Standard

Replies: 


# 2ThisIsKindergarten Aug 15 2011, 17:01 PM
Great stuff!!!

To everybody who doesn't know what it does: this is a new engine like the one in CoH Replay Analyzer (COHRA) for which we had no source code.

I tried it and ... have some questions.

What's the supposed format of the actionDefinitions file?
I tried cohra.dat which is in the format Dyxtra used for COHRA and the replay parser didn't like it. Example:
COHRA: 9,0,BUILDING,"Barracks",0x5eb,1
replay parser: 9,0,"Barracks",1

The action type (BUILDING) doesn't seem to be stored anywhere else and 0x5eb is the actual action ID - how can replay parser work without those?

I used aramonkg's cohra.dat file for 2.602

How does one get / set the mod name?
Not directly related to replay parser ofc: replayParser.replay.modName is RelicCoH for a BK mod game.

replayParser.replay.mapDescription wrong?
replayParser.replay.mapDescription: "0990\0$60995\0Ā\0Ā\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0Ȁ\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0Ā但䑌义但\0͚\0\0\0\0\0\0\0䅄䅔䅂䕓\v\0\0\0\0..\0\0\0\0㨵么\0\0\0佃卌\0\0協剓\0呋噐\0\0\0\0Ā\0ꌀ㡲`\0\0\0\0Ā..\0\0\0\0慧敭業潮癲牥楳湯\0\0\0慧敭慭潪癲牥楳湯ɚ\0\0\0\0\t\0慭捴湨浡ᩥ\0最晥捥瑨瘠湯椠慥扴汯桳癥歩s\0\0\0...

This is the map description for Langres.

In any case very impressive work--especially compared to the mess I coded for CohReplayLister. BTW: I can update it to recognize 2.602 replays if anyone is interested.

Oh, thanks a lot for sharing the source code!

This post has been edited by ThisIsKindergarten: Aug 15 2011, 17:07 PM

Posts: 474

Game: Company of Heroes


+
# 3Qvazar Sep 25 2011, 12:18 PM
QUOTE(ThisIsKindergarten @ Aug 15 2011, 18:01 PM) *

In any case very impressive work--especially compared to the mess I coded for CohReplayLister. BTW: I can update it to recognize 2.602 replays if anyone is interested.


Yes please! smile.gif
Or just give some pointers to what changes there might be smile.gif

Posts: 47

Game: Company of Heroes


+
# 4ThisIsKindergarten Sep 25 2011, 15:05 PM
QUOTE(Qvazar @ Sep 25 2011, 14:18 PM) *

Yes please! smile.gif
Or just give some pointers to what changes there might be smile.gif

Problem is I failed to find out what distinguishes 2.602 replays from 2.601 ones. Main Version and chunk format specifier are the same.

Posts: 474

Game: Company of Heroes


+
# 5Qvazar Sep 27 2011, 15:56 PM
QUOTE(ThisIsKindergarten @ Sep 25 2011, 16:05 PM) *

Problem is I failed to find out what distinguishes 2.602 replays from 2.601 ones. Main Version and chunk format specifier are the same.

Ah, so I am right in assuming that this code is fully compatible with 2.602 replays as well? Great! biggrin.gif

Posts: 47

Game: Company of Heroes


+
# 6ThisIsKindergarten Sep 27 2011, 21:00 PM
QUOTE(Qvazar @ Sep 27 2011, 17:56 PM) *

Ah, so I am right in assuming that this code is fully compatible with 2.602 replays as well? Great! biggrin.gif

Well, ReplayLister doesn't explode if you tell it to list 2.602 replays--it will show them as being 2.601 replays. But one of it's duties is to show you whether a replay will work with your CoH install. And 2.601 replays don't work with a 2.602 install.

There is a bug with filtering for the russian faction though. But as nobody complained yet I take it no one uses it anyway tongue.gif .

In case you are referring to pingtoft's code: I guess it's compatible with 2.602 replays but haven't checked.

This post has been edited by ThisIsKindergarten: Sep 27 2011, 21:04 PM

Posts: 474

Game: Company of Heroes


+

Don't like this display mode? Switch to: Standard

Posts in this topic


1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)