tfausak / rattletrap

:car: Parse and generate Rocket League replays.
https://hackage.haskell.org/package/rattletrap
MIT License
150 stars 21 forks source link

Freeplay Replays #251

Closed wadethestealth closed 2 years ago

wadethestealth commented 2 years ago

Hi @tfausak, I'm trying to make a bakkesmod plugin that captures freeplay and transforms it into a replay that would be playable by the default rocket league replay viewer.

Rocket League already records a replay behind the scenes (I'm assuming it's only current purpose is for live goal replays), but I have successfully managed to export this file. Unfortunately, loading the file in the default viewer crashes because it is missing some required data for replays (data I plan to spoof or fill in if possible).

The reason I am stating this here is because this exported file is (afaik) very similar to the current replays but with a few extra properties and a lack of some other properties. I would like to take the freeplay replay and compare it to a normal replay to see what values I would need, but I can't parse the freeplay replay into anything just yet.

This is the current error I get when trying to parse this to json.

rattletrap -i freeplay.replay -o freeplay.json
ERROR: MissingClassName "cs_p.TheWorld:PersistentLevel.WorldInfo_3"
-- Context: Replay, content, Content, frames, element (0), Frame, replications, element (0), Replication, value, ReplicationValue, Spawned
-- You are using Rattletrap version 11.2.4
-- Config {compact = False, fast = False, help = False, input = Just "freeplay.replay", mode = Nothing, output = Just "freeplay.json", schema = False, skipCrc = False, version = False}
-- Please report this problem at https://github.com/tfausak/rattletrap/issues/new

If you believe it to be out-of-scope of your project to support this case, I would love any kind of writing or guidance you may have on this so that I can build a parser from scratch.

Thanks, @wadethestealth.

tfausak commented 2 years ago

My general approach with Rattletrap is: If you can watch a replay in Rocket League, then Rattletrap should be able to parse it. These tutorial replays are interesting because they can't be saved or loaded by RL, but they're very similar to regular replays. It may be possible to modify Rattletrap to support these replays, but I'm not terribly interested in doing that work myself.

Surprisingly this issue has come up before in #150. At the time it looked like rrrocket could parse these tutorial replays. I'm not sure if that's still true or not.

wadethestealth commented 2 years ago

https://github.com/nickbabcock/rrrocket was able to parse my file. Thank you!