Replay Formatting for Replay Analysis Tool

Enhance your gameplay with these tools. This category is also the right place for tools useful for modders.
Mod databases, calculators, cheatsheets, multiplayer, scripts, libs and other useful stuff that is not strictly in-game mods.
Post Reply
freact
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sat Jul 22, 2017 8:01 pm
Contact:

Replay Formatting for Replay Analysis Tool

Post by freact »

Hi first post on this forum so I apologize if this is in the wrong spot or something but I did do some searches and couldn't find this information elsewhere.

What I am trying to do is make a small utility tool that will analyze a replay file and give some information about the playthrough. The first most basic feature I'm hoping to implement is a simple calculation of how long a player spent 'idle'. It's my understanding that this file is basically a list of player actions and the tick that they occur at. Unfortunately I haven't been able to decode any of the information in the replay.dat file. If anyone has had any success in decoding replay files, has some tips for how I might proceed, or other resources they could point me at; I would be very grateful for any help!

Jap2.0
Smart Inserter
Smart Inserter
Posts: 2339
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: Replay Formatting for Replay Analysis Tool

Post by Jap2.0 »

I have no experience in this, however a good way to start would be to do something along these lines:

1. Start a game, do nothing, close it, look at replay, see if there is anything, try to decode it.
2. Only craft one pickaxe, decode.
3. Only craft one transport belt, decode.
4. Move one direction, decode.
5. Move same direction for different length of time, decode.

You can probably get what I'm getting at now, and you can proceed like this and (maybe) figure out the codes for crafting all items, placing items, completing researches, moving, etc.
There are 10 types of people: those who get this joke and those who don't.

Jap2.0
Smart Inserter
Smart Inserter
Posts: 2339
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: Replay Formatting for Replay Analysis Tool

Post by Jap2.0 »

Now that I think about it, I might try to make a replay interpreter sometime (generating a text file showing what was done, not really doing the replay). It probably won't happen for a while, though, as I should probably wait for the 0.15 stable so it doesn't change for a while (I'm quite busy right now too). It sounds like a fun challenge. If I ever do, I'll try to add some analysis to it. If you figure anything out regarding replays, be sure to let me know.

Thanks!
There are 10 types of people: those who get this joke and those who don't.

daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: Replay Formatting for Replay Analysis Tool

Post by daniel34 »

Here is some info: viewtopic.php?f=34&t=44225#p255694
Rseding91 wrote:All inputs contain the following data:
  • uint8_t action ID
  • uint32_t tick of action
  • uint16_t player index
  • payload *variant - tons of different combinations*
As far as I understand it the action ID list (possible kinds of action IDs) is the same as used by the input action permissions system (/permissions in console).
quick links: log file | graphical issues | wiki

Jap2.0
Smart Inserter
Smart Inserter
Posts: 2339
Joined: Tue Jun 20, 2017 12:02 am
Contact:

Re: Replay Formatting for Replay Analysis Tool

Post by Jap2.0 »

Thanks a lot!

I'll start work on this when I'm sure we're at the final version of 0.15 and I have a bit of extra time.
There are 10 types of people: those who get this joke and those who don't.

Post Reply

Return to “Tools”