Monstrofil / replays_unpack

52 stars 19 forks source link

Add ability to pack replays back #17

Open Monstrofil opened 3 years ago

Monstrofil commented 3 years ago

Add functionality that allows replay to be modified and packed back.

We need:

  1. variables & methods packer with same logic as for unpacking
  2. crypter

It seems that while game client is able to read decrypted replays, it is not able to play them because map and scenario data is only in json part of replay.

imkindaprogrammermyself commented 2 years ago

Hmm... Trackpad has already done this before. Basically, we only need to modify the data after the zlib+blowfish decryption then reverse the process to get the modified replay.

What I did is save the msg id of the method/property I want to modify, look up the msg id on the replay, isolate that packet, modify that packet and put it back with the new size.

nickntg commented 2 years ago

Could this be used to unpack replays from earlier versions to newer versions so they can be played by the WOWs client?

Monstrofil commented 2 years ago

Could this be used to unpack replays from earlier versions to newer versions so they can be played by the WOWs client?

Theoretically yes, someone can create translator that migrates replay protocol between client versions. But I don't think that is a good idea because maps change within time, some game resources are added or removed.