Replay File Format

Any and all discussion relating to Rocket League. Post feedback and suggestions here!

Re: Replay File Format

Postby ZorMonkey on Thu Oct 29, 2015 8:07 am

Yeah, I ignore it in most cases and just assume the parser got lost. But the case I'm seeing after ServerName is pretty straightforward. It makes no sense that the entity describing the high level game state would have a RelativeRotation, but there it is (is the server rotated or something? who cares?). I hate it. :) I'll figure it out...
ZorMonkey
Acrobatic
 
Posts: 36
Joined: Sun Oct 04, 2015 6:07 pm
Steam ID: ZorMonkey
Region: US
Switch Friend Code: 0

Re: Replay File Format

Postby Iago on Thu Oct 29, 2015 1:54 pm

Feel free to send me a replay that you think has a ServerName followed by RelativeRotation and we can see what my jumble of code spits out.
Iago
Acrobatic
 
Posts: 34
Joined: Mon Jul 06, 2015 10:47 pm
Steam ID: iago
Region: US
Switch Friend Code: 0

Re: Replay File Format

Postby ZorMonkey on Thu Oct 29, 2015 6:58 pm

I actually just figured it out. My automagic type to class name converter was converting the type "GameInfo_Soccar.GameInfo.GameInfo_Soccar:GameReplicationInfoArchetype" to "Engine.GameReplicationInfo". That makes sense right?

Well kinda yeah, but it should be "TAGame.GRI_TA" probably. Now right after ServerName is ProjectX.GRI_X:bGameStarted, which makes much more sense.

Gah.
ZorMonkey
Acrobatic
 
Posts: 36
Joined: Sun Oct 04, 2015 6:07 pm
Steam ID: ZorMonkey
Region: US
Switch Friend Code: 0

Re: Replay File Format

Postby danielsamuels on Mon Nov 09, 2015 3:09 pm

danielsamuels wrote:
danielsamuels wrote:1.04 replay: 3A090000 AD4FB17B 63030000 09000000
1.05 replay: 020A0000 FD73290D 63030000 09000000


1.06 replay: D70D0000 A5B08C7C 63030000 09000000

Still no change.


1.08 replay: 410E0000 2092E753 64030000 0A000000

It changed! It's now 868.10, used to be 867.9.
danielsamuels
Acrobatic
User avatar
 
Posts: 53
Joined: Thu Jul 30, 2015 10:41 pm
Location: Cambridge, UK
Steam ID: posix_
Region: EU
Switch Friend Code: 0

Re: Replay File Format

Postby tpz on Wed Feb 10, 2016 1:14 pm

Really excited by the content of this thread - I'd love to explore replay files programmatically too!

Several posts ago I saw the following github repo referenced:
https://github.com/jjbott/RocketLeagueReplayParser

Is this the current state-of-the-art in replay file parsing? Are there other codebases worth looking at?

Thanks for all the hard work!
tpz
Supersonic
 
Posts: 1
Joined: Wed Feb 10, 2016 1:07 pm
PSN ID: ka-buzz
Region: United States
Switch Friend Code: 0

Re: Replay File Format

Postby danielsamuels on Wed Feb 10, 2016 5:07 pm

The best one I've seen so far is PyRope. There's an active wiki of the different parsers available here.
danielsamuels
Acrobatic
User avatar
 
Posts: 53
Joined: Thu Jul 30, 2015 10:41 pm
Location: Cambridge, UK
Steam ID: posix_
Region: EU
Switch Friend Code: 0

Re: Replay File Format

Postby ZorMonkey on Wed Feb 10, 2016 5:11 pm

I vote for https://github.com/jjbott/RocketLeagueReplayParser . But it's mine, so I'm biased. :) The others I've seen all have little bugs. Of course with the patch today mine does too...
ZorMonkey
Acrobatic
 
Posts: 36
Joined: Sun Oct 04, 2015 6:07 pm
Steam ID: ZorMonkey
Region: US
Switch Friend Code: 0

Re: Replay File Format

Postby danielsamuels on Wed Feb 10, 2016 5:13 pm

I think PyRope is actually an almost direct port of your library, so it explains why it's the better of the Python ones. :)
danielsamuels
Acrobatic
User avatar
 
Posts: 53
Joined: Thu Jul 30, 2015 10:41 pm
Location: Cambridge, UK
Steam ID: posix_
Region: EU
Switch Friend Code: 0

Re: Replay File Format

Postby ZorMonkey on Wed Feb 10, 2016 8:37 pm

Hehe, I've been indirectly helping fix PyRope as well (and not just by fixing my own). I have too much time on my hands I guess. :)

Mine has been updated for today's patch (based on like 4 replays, so there might be more left). No fair copying!

I'm only half serious. I added a hack, and I'm curious if others come to the same conclusion I did. If my hack is just copied without independent analysis of the data, then it's harder to tell if it's the right thing, or if I just screwed up something somewhere. But so far everything I've recorded today needs the hack.
ZorMonkey
Acrobatic
 
Posts: 36
Joined: Sun Oct 04, 2015 6:07 pm
Steam ID: ZorMonkey
Region: US
Switch Friend Code: 0

Re: Replay File Format

Postby rustixote on Wed Feb 10, 2016 8:42 pm

I've been trying to double check everything in your code ZorMonkey. I'm working on an Elixir version (I was working on a PHP version but it was just too slow). I think I've found a few things that we disagree on. Maybe I'll compile the discrepancies and have you take a look at them.
rustixote
Supersonic
 
Posts: 12
Joined: Mon Sep 28, 2015 4:52 pm
Steam ID: spike-
Region: us
Switch Friend Code: 0

Re: Replay File Format

Postby ZorMonkey on Wed Feb 10, 2016 8:52 pm

That'd be great!

I'm a bit behind. Once I finished parsing the frames in November, I mostly stopped looking at it except to see if patches broke anything. I think mainly I have more "unknown" data than I should.
ZorMonkey
Acrobatic
 
Posts: 36
Joined: Sun Oct 04, 2015 6:07 pm
Steam ID: ZorMonkey
Region: US
Switch Friend Code: 0

Re: Replay File Format

Postby danielsamuels on Thu Feb 11, 2016 12:07 am

The CRC check is the final thing that no-one has yet. I'd be interested in taking another look into it.
danielsamuels
Acrobatic
User avatar
 
Posts: 53
Joined: Thu Jul 30, 2015 10:41 pm
Location: Cambridge, UK
Steam ID: posix_
Region: EU
Switch Friend Code: 0

Re: Replay File Format

Postby Galile0 on Thu Feb 11, 2016 4:59 am

Hey guys,

Dev of pyrope here!
I didn't had the time yet to take an in-depth look at what has changed (The patch isn't even out a day yet, give me some time ~.~) but it seems that in the netcache tree there are caches that have parent id's that are non existent. This is pretty weird. As a quick fix I tried stuffing them under the root netcache, but that ended up with unknown property id's, so those caches belong somewhere in the tree, even tho they have a non-existent parent.
Anyway, at that point my breakfast time was over and now I'm stuck at uni. If I can't figure this ominous error out, I'm just gonna hardcode the structure for those 2 caches where the error happens (iirc the property inheritance was always the same, which makes sense since it always looked like they use baseclasses and inherit from those for specific subclasses, like any programming language supports it)

@Z0rmonkey:
I took many, many pieces from your code (Most important the parsing of serialized integers) and comments in this thread ;)
In fact it's what got the project going in the first place.

On another note: I'm currently working on dropping the dependency for the bitstring lib, which would speed up the whole parsing process a metric shitton, at the cost of less flexibility and error checking (But for our parsing case that should be ok, since we know what we deal with)

Edit:
Ok, so this post needed a moderator approval, which took like the whole day. Therefor I have updated my lib in the meantime. I solved the netcache issue by decrementing the parentid until I actually find a valid netcache as a parent. As far as I can see Z0rmonkey has solved it by hardcoding, which was also my intention at first, but is something I always feel guilty about. On the other hand my approach may break, as it is a total guess. The other things that have changed were easy enough (Some loadout changes and 1-2 new propertys)
Galile0
Supersonic
 
Posts: 1
Joined: Thu Feb 11, 2016 4:49 am
Steam ID: Galile0
Region: EU
Switch Friend Code: 0

Re: Replay File Format

Postby ZorMonkey on Thu Feb 11, 2016 2:24 pm

Hi Galile0! I'm glad you found that you needed a hack just like me. :) Now I don't feel so bad about it.
ZorMonkey
Acrobatic
 
Posts: 36
Joined: Sun Oct 04, 2015 6:07 pm
Steam ID: ZorMonkey
Region: US
Switch Friend Code: 0

Re: Replay File Format

Postby danielsamuels on Sat Feb 13, 2016 3:47 am

Just ported a basic implementation of the parser to Javascript. So now you can parse files directly in your browser (or at least the header, for now).

Repo on Github.
Live demo (open your developer console).
danielsamuels
Acrobatic
User avatar
 
Posts: 53
Joined: Thu Jul 30, 2015 10:41 pm
Location: Cambridge, UK
Steam ID: posix_
Region: EU
Switch Friend Code: 0

Re: Replay File Format

Postby ZorMonkey on Sat Feb 13, 2016 2:18 pm

What sort of awful things have people tried for the crc?

Ages ago I implemented the crc algortithms from the Unreal engine and threw them at bajillions of various segments of replays, hoping to get a hit. I never found anything consistent though. Lately I've been trying to find the corresponding code in the exe, but that's a bit above my head and is making my brains hurt.
ZorMonkey
Acrobatic
 
Posts: 36
Joined: Sun Oct 04, 2015 6:07 pm
Steam ID: ZorMonkey
Region: US
Switch Friend Code: 0

Re: Replay File Format

Postby calsmurf2904 on Sun Mar 13, 2016 12:13 pm

Anyone tried to parse a private match replay which used the PartyOnly setting instead of NamePassword?
It seems that the unknown1 in the PrivateMatchSettings is a mode (PartyOnly (unk1=0) or NamePassword (unk1=1)) and when PartyOnly is set the name and password are not in the format which causes the code to parse incorrectly.

Currently the format seems to be:
mutators: string_array,
joinableBy: int32,
maxPlayers: int32,
if(joinableBy == 1)
name: string,
password: string
else
????
flag: bit1 //I think this is some isPublic/isPrivate flag so not sure if this one will be in here either when joinableBy is set to PartyOnly.
I can't seem to figure it out (or my parsing code is incorrect). Next few bytes after maxPlayers are (when joinableBy is set to PartyOnly):

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00101000 00000101 01001110 11000000 00100000 00110111 01100000 00000000
00 00 00 00 00 00 00 00 14 A0 72 03 04 EC 06 00

Sample replay is available here: https://www.dropbox.com/s/vn81jqa1pitsr ... eplay?dl=0
Haven't tried parsing it with PyRope or RocketLeagueReplayParser yet so it might also be an error in my code. (But it seems unlikely since the preceding mutators and maxPlayers seem correct).
calsmurf2904
Supersonic
 
Posts: 3
Joined: Sun Mar 13, 2016 12:00 pm
Steam ID: calsmurf2904
Region: EU
Switch Friend Code: 0

Re: Replay File Format

Postby danielsamuels on Sun Mar 13, 2016 4:21 pm

RLR is running on PyRope now, so you could try uploading it there. The netstream gets parsed by a cronjob, so I can let you know the outcome if you upload it.
danielsamuels
Acrobatic
User avatar
 
Posts: 53
Joined: Thu Jul 30, 2015 10:41 pm
Location: Cambridge, UK
Steam ID: posix_
Region: EU
Switch Friend Code: 0

Re: Replay File Format

Postby ZorMonkey on Sun Mar 13, 2016 4:57 pm

I don't have any special logic around TAGame.GameEvent_SoccarPrivate_TA:MatchSettings for the game type, so you probably don't need any (unless I messed up). Make sure you're correctly handling 0 length strings. I dont think game names and passwords are in any replay file as of a few weeks ago - I yelled at them about that back in November and they finally fixed it.

Your bits look like two 0 length strings, a bit, a "no more properties" bit, then a new actor state for id 2. I think, I'm a little rusty...

This reminds me, I need to correctly name more properties someday...
ZorMonkey
Acrobatic
 
Posts: 36
Joined: Sun Oct 04, 2015 6:07 pm
Steam ID: ZorMonkey
Region: US
Switch Friend Code: 0

Re: Replay File Format

Postby calsmurf2904 on Mon Mar 14, 2016 4:53 am

Thanks for the replies....turns out that there was an error in my readString function when using 0 length. (name is 0 length when joinableBy is set to PartyOnly). This caused it to read atleast one byte too much. (Since it rounds up or something). Fixed this now and I'm proud to say that all my replays parse correctly now :)

My code is available here for javascript: https://github.com/calvinbaart/rl-replay
calsmurf2904
Supersonic
 
Posts: 3
Joined: Sun Mar 13, 2016 12:00 pm
Steam ID: calsmurf2904
Region: EU
Switch Friend Code: 0

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 4 guests