@hackage rattletrap0.1.0

Parse and generate Rocket League replays.

Rattletrap

Windows build badge Build badge

Rattletrap parses and generates Rocket League replays.

Install

Rattletrap does not yet offer compiled binaries for download. To install it, first install Stack. Then download or clone this repository and run stack --install-ghc install.

Parse

Rattletrap can parse (decode) Rocket League replays and output them as JSON.

> rattletrap decode input.replay output.json
# or
> rattletrap decode input.replay > output.json
# or
> rattletrap.decode < input.replay > output.json

The resulting JSON is minified, but extremely large. A 4.3 MB replay file turns into a 123 MB JSON file. To easily view the file, use a JSON pretty printer and a pager. For example:

> cat output.json | python -m json.tool | less

Generate

Rattletrap can also generate (encode) Rocket League replays from JSON files.

> rattletrap encode input.json output.replay
# or
> rattletrap encode input.json > output.replay
# or
> rattletrap.encode < input.json > output.replay

If the JSON was generated by Rattletrap, the resulting replay should be identical to the original.

Modify

By inserting another program between parsing and generating, Rattletrap can be used to modify replays.

> rattletrap decode < original.replay |
  modify-replay-json |
  rattletrap encode > modified.replay