-1

I have a .plr file that contains all of the player information for the game Terarria. I would like to decode it to have a look at what data is stored on this file so that I can play around with making edits.

Opening the file in a text editor, it appears as such: https://pastebin.com/x19Triv1

I had hoped that converting this file to binary and then converting the binary to text would work, but it just converts it back into garbage characters. Here is the binary: https://pastebin.com/uX2p5kGr

Any ideas on how to go about decoding this file will be appreciated.

1

One approach is to make changes to the player in the game, and export the data again. Compare what has changed in the .plr to what was changed in game. Repeat until you've figured most everything out.

There are likely some automated tools out there to help with this, or it could be scripted. I know there are some mobile apps for rooted devices that help see what's changed in memory when values in the game change.

Since you may be dealing with non-printable characters, you'll want to use a hex editor to view the file. Depending on the hex editor, you may be able to view a proper diff between files.

It may be tedious, but look for common data types. For example, let's say there's a game that stores how much money you currently have. You would dump the configuration before and after making a big purchase. I would then look for perhaps a 4 or 8 byte value (int) that has changed. Or maybe it's a 32-bit float. Definitely have your favorite number conversion tool available.

While there's some trial and error involved, the right assumptions can help get you there.

2
  • If the .plr file is encoded so that only garbage characters are displayed when it is opened in a text editor, how can I notice a change? Even if I convert the file to binary, combing it for changes would be more than laborious.
    – VirgilCane
    Apr 9 '20 at 10:34
  • @VirgilCane I updated the answer with some suggestions Apr 9 '20 at 14:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.