Skip to content
This repository has been archived by the owner on Sep 3, 2022. It is now read-only.

4.10. How to Parse Replay Files

Lizardy edited this page Nov 5, 2021 · 1 revision

In this section we learn about how to get information from .lrf (LOLReplay) files.

LRF files to readable packet data

Here we will explain how to get the packet information from the LRF files.

  1. Clone LoLReplayUnpacker, compile and build it (may require installing Newtonsoft.Json NuGet package).
  2. Clone LeaguePackets, compile and build it.
  3. Prepare some lrf files (there are links to plenty in discord - requires member role).
  4. Create a .bat file in the same folder as ENetUnpack.exe and place this text:
@echo off
setlocal

set file=%1

ENetUnpack.exe %file% Patch420

echo Finished.

pause
  1. Drag & Drop a 4.20 .lrf file onto the .bat file, you should get an rlp.json file.
  2. Drag & Drop the json file onto LeaguePacketsSerializer.exe, after some time you should get an rlp.serialized.json file.

This serialized.json file should contain all the packets of the lrf file in txt form.

Example packet entry:

{
    "RawID": 186,
    "Packet": {
      "$type": "LeaguePackets.Game.OnEnterVisibilityClient, LeaguePackets",
      "ID": 186,
      "Packets": [
        {
          "$type": "LeaguePackets.Game.SpawnMinionS2C, LeaguePackets",
          "ID": 124,
          "NetID": 1073741868,
          "OwnerNetID": 0,
          "NetNodeID": 64,
          "Position": {
            "X": 4342.503,
            "Y": -146.3385,
            "Z": 2515.9644
          },
          "SkinID": 0,
          "CloneNetID": 0,
          "TeamID": 300,
          "IgnoreCollision": false,
          "IsWard": false,
          "IsLaneMinion": false,
          "IsBot": true,
          "IsTargetable": true,
          "IsTargetableToTeamSpellFlags": 33554432,
          "VisibilitySize": 0.0,
          "Name": "OdinNeutralGuardian",
          "SkinName": "OdinNeutralGuardian",
          "InitialLevel": 1,
          "OnlyVisibleToNetID": 0,
          "SenderNetID": 1073741868,
          "ExtraBytes": ""
        }
      ],
      "Items": [],
      "ShieldValues": null,
      "CharacterDataStack": [],
      "LookAtNetID": 0,
      "LookAtType": 0,
      "LookAtPosition": {
        "X": 1.0,
        "Y": 0.0,
        "Z": 0.0
      },
      "BuffCount": [],
      "UnknownIsHero": false,
      "MovementData": {
        "$type": "LeaguePackets.Game.Common.MovementDataStop, LeaguePackets",
        "Type": 3,
        "Position": {
          "X": 4342.503,
          "Y": 2515.9644
        },
        "Forward": {
          "X": 0.0,
          "Y": 0.99999994
        },
        "SyncID": 49
      },
      "SenderNetID": 1073741868,
      "ExtraBytes": ""
    },
    "Time": 94321.0,
    "ChannelID": "Broadcast",
    "RawChannel": 3
  }

The packet structure explained in detail in LeaguePackets repo.

Tips:

  • See how the flow of packet goes to get the full picture
  • NetIDs (league concept to identify objects) could help you to track behaviours that affect only the specific object you want to inspect.
  • the json that you get from spectator LRF files is less detailed and also with strange and wrong flow. That's because we haven't fully integrated/developed these parts in LoLReplayUnpacker.

Watching LRF files

In order to watch LRF files you should follow the next steps:

  1. Download proper LOLReplay version, We recommend using only 0.8.9.41. You can try other version but usually it fails.
  2. Add this line: 4.20.0.315 957ad5b28823f3351cacd751b83b7d90 to the client_versions.txt file in user/documents/lolreplay/data. You will see (probably after running LOLReplay) that folder was created in some related folder. You should copy the specific version exe (you can get it from LOLDownloader).
  3. You will need also to change some settings in LOLRecorder.exe. Run LOLRecorder.exe, then clieck on the cog button for settings. Here you need to change the paths to 4.20 LOL client (you can try other versions too), and data folder to LOLReplay folder in documents folder.
  4. Drag & Drop LRF file that was recorded with similar version to 4.20 in spectator mode only.