rattletrap: Parse and generate Rocket League replays.

[ game, library, mit, program ] [ Propose Tags ] [ Report a vulnerability ]

Rattletrap parses and generates Rocket League replays.


[Skip to Readme]

Modules

[Last Documentation]

  • Paths_rattletrap
  • Rattletrap
    • Rattletrap.BitBuilder
    • Rattletrap.BitGet
    • Rattletrap.BitPut
    • Rattletrap.BitString
    • Rattletrap.ByteGet
    • Rattletrap.BytePut
    • Console
      • Rattletrap.Console.Config
      • Rattletrap.Console.Flag
      • Rattletrap.Console.Main
      • Rattletrap.Console.Mode
      • Rattletrap.Console.Option
    • Rattletrap.Data
    • Exception
      • Rattletrap.Exception.CrcMismatch
      • Rattletrap.Exception.Empty
      • Rattletrap.Exception.Fail
      • Rattletrap.Exception.InvalidComponent
      • Rattletrap.Exception.InvalidJson
      • Rattletrap.Exception.MissingAttributeLimit
      • Rattletrap.Exception.MissingAttributeName
      • Rattletrap.Exception.MissingClassName
      • Rattletrap.Exception.MissingObjectName
      • Rattletrap.Exception.MissingProductName
      • Rattletrap.Exception.NotEnoughInput
      • Rattletrap.Exception.UnknownActor
      • Rattletrap.Exception.UnknownAttribute
      • Rattletrap.Exception.UnknownName
      • Rattletrap.Exception.UnknownProduct
      • Rattletrap.Exception.UnknownProperty
      • Rattletrap.Exception.UnknownSystemId
    • Rattletrap.Get
    • Rattletrap.Schema
    • Type
      • Rattletrap.Type.Attribute
        • Rattletrap.Type.Attribute.AppliedDamage
        • Rattletrap.Type.Attribute.Boolean
        • Rattletrap.Type.Attribute.Boost
        • Rattletrap.Type.Attribute.Byte
        • Rattletrap.Type.Attribute.CamSettings
        • Rattletrap.Type.Attribute.ClubColors
        • Rattletrap.Type.Attribute.CustomDemolish
        • Rattletrap.Type.Attribute.DamageState
        • Rattletrap.Type.Attribute.Demolish
        • Rattletrap.Type.Attribute.Enum
        • Rattletrap.Type.Attribute.Explosion
        • Rattletrap.Type.Attribute.ExtendedExplosion
        • Rattletrap.Type.Attribute.FlaggedByte
        • Rattletrap.Type.Attribute.FlaggedInt
        • Rattletrap.Type.Attribute.Float
        • Rattletrap.Type.Attribute.GameMode
        • Rattletrap.Type.Attribute.GameServer
        • Rattletrap.Type.Attribute.Int
        • Rattletrap.Type.Attribute.Int64
        • Rattletrap.Type.Attribute.Loadout
        • Rattletrap.Type.Attribute.LoadoutOnline
        • Rattletrap.Type.Attribute.Loadouts
        • Rattletrap.Type.Attribute.LoadoutsOnline
        • Rattletrap.Type.Attribute.Location
        • Rattletrap.Type.Attribute.MusicStinger
        • Rattletrap.Type.Attribute.PartyLeader
        • Rattletrap.Type.Attribute.Pickup
        • Rattletrap.Type.Attribute.PickupInfo
        • Rattletrap.Type.Attribute.PickupNew
        • Rattletrap.Type.Attribute.PlayerHistoryKey
        • Rattletrap.Type.Attribute.PrivateMatchSettings
        • Rattletrap.Type.Attribute.Product
        • Rattletrap.Type.Attribute.ProductValue
        • Rattletrap.Type.Attribute.QWord
        • Rattletrap.Type.Attribute.RepStatTitle
        • Rattletrap.Type.Attribute.Reservation
        • Rattletrap.Type.Attribute.RigidBodyState
        • Rattletrap.Type.Attribute.Rotation
        • Rattletrap.Type.Attribute.StatEvent
        • Rattletrap.Type.Attribute.String
        • Rattletrap.Type.Attribute.TeamPaint
        • Rattletrap.Type.Attribute.Title
        • Rattletrap.Type.Attribute.UniqueId
        • Rattletrap.Type.Attribute.WeldedInfo
      • Rattletrap.Type.AttributeMapping
      • Rattletrap.Type.AttributeType
      • Rattletrap.Type.AttributeValue
      • Rattletrap.Type.Cache
      • Rattletrap.Type.ClassAttributeMap
      • Rattletrap.Type.ClassMapping
      • Rattletrap.Type.CompressedWord
      • Rattletrap.Type.CompressedWordVector
      • Rattletrap.Type.Content
      • Rattletrap.Type.Dictionary
      • Rattletrap.Type.F32
      • Rattletrap.Type.Frame
      • Rattletrap.Type.Header
      • Rattletrap.Type.I32
      • Rattletrap.Type.I64
      • Rattletrap.Type.I8
      • Rattletrap.Type.Initialization
      • Rattletrap.Type.Int8Vector
      • Rattletrap.Type.Keyframe
      • Rattletrap.Type.List
      • Rattletrap.Type.Mark
      • Rattletrap.Type.Message
      • Rattletrap.Type.Property
        • Rattletrap.Type.Property.Array
        • Rattletrap.Type.Property.Bool
        • Rattletrap.Type.Property.Byte
        • Rattletrap.Type.Property.Float
        • Rattletrap.Type.Property.Int
        • Rattletrap.Type.Property.Name
        • Rattletrap.Type.Property.QWord
        • Rattletrap.Type.Property.Str
        • Rattletrap.Type.Property.Struct
      • Rattletrap.Type.PropertyValue
      • Rattletrap.Type.Quaternion
      • Rattletrap.Type.RemoteId
        • Rattletrap.Type.RemoteId.Epic
        • Rattletrap.Type.RemoteId.PlayStation
        • Rattletrap.Type.RemoteId.PsyNet
        • Rattletrap.Type.RemoteId.QQ
        • Rattletrap.Type.RemoteId.Splitscreen
        • Rattletrap.Type.RemoteId.Steam
        • Rattletrap.Type.RemoteId.Switch
        • Rattletrap.Type.RemoteId.Xbox
      • Rattletrap.Type.Replay
      • Rattletrap.Type.Replication
        • Rattletrap.Type.Replication.Destroyed
        • Rattletrap.Type.Replication.Spawned
        • Rattletrap.Type.Replication.Updated
      • Rattletrap.Type.ReplicationValue
      • Rattletrap.Type.Rotation
      • Rattletrap.Type.Section
      • Rattletrap.Type.Str
      • Rattletrap.Type.U32
      • Rattletrap.Type.U64
      • Rattletrap.Type.U8
      • Rattletrap.Type.Vector
      • Rattletrap.Type.Version
    • Utility
      • Rattletrap.Utility.Bytes
      • Rattletrap.Utility.Crc
      • Rattletrap.Utility.Helper
      • Rattletrap.Utility.Json
      • Rattletrap.Utility.Monad
    • Rattletrap.Version

Flags

Manual Flags

NameDescriptionDefault
pedanticDisabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.1.7, 0.2.0, 0.3.0, 0.4.0, 0.4.1, 1.0.0, 2.0.0, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.2.4, 2.3.0, 2.3.1, 2.4.0, 2.5.0, 2.5.1, 2.5.2, 3.0.0, 3.1.0, 3.1.1, 3.1.2, 4.0.0, 4.0.1, 4.0.2, 4.0.3, 4.0.4, 4.0.5, 4.0.6, 4.0.7, 4.0.8, 4.0.9, 4.1.0, 4.1.1, 4.1.2, 5.0.0, 5.0.1, 6.0.0, 6.0.1, 6.0.2, 6.1.0, 6.2.0, 6.2.1, 6.2.2, 6.2.3, 6.3.0, 6.3.1, 6.3.2, 6.4.0, 7.0.0, 7.0.1, 7.0.2, 7.0.3, 8.0.0, 9.0.0, 9.0.1, 9.0.2, 9.0.3, 9.0.4, 9.0.5, 9.0.6, 9.0.7, 9.0.8, 9.0.9, 9.0.10, 9.1.0, 9.1.1, 9.1.2, 9.1.3, 9.1.4, 9.2.0, 9.3.0, 9.3.1, 9.3.2, 9.3.3, 9.4.0, 9.4.1, 10.0.0, 10.0.6, 10.0.7, 11.0.0, 11.0.1, 11.1.0, 11.1.1, 11.2.0, 11.2.1, 11.2.3, 11.2.4, 11.2.5, 11.2.6, 11.2.7, 11.2.8, 11.2.9, 11.2.10, 11.2.11, 11.2.12, 11.2.13, 11.2.14, 12.0.0, 12.0.1, 12.0.2, 12.0.3, 12.1.0, 12.1.1, 12.1.2, 12.1.3, 13.0.1, 13.0.2, 13.0.3, 13.1.0, 14.0.0
Change log CHANGELOG.md
Dependencies aeson (>=2.1.2.1 && <2.2 || >=2.2.2.0 && <2.3), aeson-pretty (>=0.8.10 && <0.9), array (>=0.5.5.0 && <0.6), base (>=4.18.0.0 && <4.19 || >=4.19.0.0 && <4.20 || >=4.20.0.0 && <4.21), bytestring (>=0.11.4.0 && <0.12 || >=0.12.0.2 && <0.13), containers (>=0.6.7 && <0.8), filepath (>=1.4.100.1 && <1.5 || >=1.5.2.0 && <1.6), http-client (>=0.7.17 && <0.8), http-client-tls (>=0.3.6.3 && <0.4), rattletrap, text (>=2.0.2 && <2.2) [details]
License MIT
Author
Maintainer Taylor Fausak
Category Game
Source repo head: git clone https://github.com/tfausak/rattletrap
Uploaded by fozworth at 2024-10-29T02:15:56Z
Distributions LTSHaskell:12.1.3, Stackage:14.0.0
Reverse Dependencies 1 direct, 0 indirect [details]
Executables rattletrap
Downloads 65544 total (597 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2024-10-29 [all 2 reports]

Readme for rattletrap-14.0.0

[back to package description]

Rattletrap

CI Hackage

Rattletrap parses and generates Rocket League replays. Parsing replays can be used to analyze data in order to collect high-level statistics like players and points, or low-level details like positions and cameras. Generating replays can be used to modify replays in order to force everyone into the same car or change the map a game was played on.

Rattletrap supports every version of Rocket League up to 2.45, which was released on 2024-10-22. If a replay can be played by the Rocket League client, it can be parsed by Rattletrap. (If not, that's a bug. Please report it!)

Install

Rattletrap is a command-line application. You should only use it if you're comfortable running things in terminals or command prompts. Otherwise consider using another tool like Ball Chasing.

The best way to get Rattletrap is by downloading the latest release for your platform.

Rattletrap is written in [Haskell][]. If you'd like to use a program written in a different language, consider one of the following:

Replays

Rocket League saves your replays in a folder that depends on your operating system.

  • Windows:
    • %UserProfile%/Documents/My Games/Rocket League/TAGame/Demos
    • For example: C:/Users/Taylor/Documents/My Games/Rocket League/TAGame/Demos
  • macOS:
    • $HOME/Library/Application Support/Rocket League/TAGame/Demos
    • For example: /Users/taylor/Library/Application Support/Rocket League/TAGame/Demos
  • Linux:
    • $HOME/.local/share/Rocket League/TAGame/Demos
    • For example: /home/taylor/.local/share/Rocket League/TAGame/Demos

Interface

Rattletrap is a command line application.

$ rattletrap --help
rattletrap version 12.0.0
  -c           --compact         minify JSON output
  -f           --fast            only encode or decode the header
  -h           --help            show the help
  -i FILE|URL  --input=FILE|URL  input file or URL
  -m MODE      --mode=MODE       decode or encode
  -o FILE      --output=FILE     output file
               --schema          output the schema
               --skip-crc        skip the CRC
  -v           --version         show the version

By default Rattletrap will try to determine the appropriate mode (either decode or encode) based on the file extensions of the input or output. You can override this behavior by passing --mode (or -m) with either decode or encode.

Input extension Output extension Mode
.replay anything decode (parse)
.json anything encode (generate)
anything .replay encode (generate)
anything .json decode (parse)
anything anything decode (parse)

Parse

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

$ rattletrap --input http://example.com/input.replay --output output.json
# or
$ rattletrap -i input.replay -o output.json
# or
$ rattletrap < input.replay > output.json

The input argument can either be a local path or a URL.

By default the JSON is pretty-printed. To minify the JSON, pass --compact (or -c) to Rattletrap. Even when the JSON is minified, it's extremely large. The output can be up to 100 times larger than the input. For example, a 1.5 MB replay turns into 31 MB of minified JSON or 159 MB of pretty-printed JSON.

Generate

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

$ rattletrap --input http://example.com/input.json --output output.replay
# or
$ rattletrap -i input.json -o output.replay
# or
$ rattletrap --mode encode < input.json > output.replay

The input argument can either be a local path or a URL.

If the JSON was generated by Rattletrap, the output replay will be bit-for-bit identical to the input replay.

Modify

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

$ rattletrap -i input.replay |
  modify-replay-json |
  rattletrap -o output.replay