Extracting inputs from replays

Replay files produced by the game (even without the client) contain the exact inputs of the ghost that drove the record. These inputs are used for validation purposes, but we can use them for improving current world records and splicing the race. TMInterface allows for easy extraction of those inputs directly in the client.

Prerequisite

The replay you want to extract inputs from must finish the race. Replays that are incomplete (did not finish the race) do not contain inputs in the replay file, therefore it is not possible to extract inputs from these replays.

How do I extract the inputs?

  1. From the main menu screen click Replays, then Edit a replay.
  2. Enter the Replays folder. Choose a replay from the replay list.
  3. Click Launch and then Validate.
  4. Go to Input Editor, and click Load validated replay. If you have some inputs loaded already, click Unload first.
  5. The inputs are now loaded from the replay. You can now enter the map the replay was driven on and replay/edit/save the inputs to a file.

Validating a replay makes the game load the inputs of a replay you’ve chosen, which can then be captured by TMInterface. The validate function is used for other purposes as well, such as bruteforcing.

The replay is available online but I do not know how to get it into the game.

Usually, you will want to extract inputs from a current world record available on TMX, or a replay someone sent you instead. To make the replay show in the in-game list, you have to put the .Replay.Gbx file inside your TrackMania Replays folder, which should be located in the respective folder:

  • TrackMania Nations Forever: C:\Users\username\Documents\TmForever\Tracks\Replays
  • TrackMania United Forever: C:\Users\username\Documents\TrackMania\Tracks\Replays

After putting the replay into the folder, restart the game to make the replay appear in the replay list.

The validate button is greyed out and I cannot click it

If the Validate button is greyed out, it means either that the replay did not finish the race, or it is an online replay. At the moment, TMInterface does not support extracting inputs from an online replay, even though it is possible with external scripts. Those scripts are available publicly, but require knowledge on how to properly run them.

I have extracted the inputs to a file, what now?

Once you have extracted the inputs into a file, you can load them with the load command, load the map the replay was driven on and start experimenting with the inputs in a text editor. To learn what commands are available and how to manage your scripts, see Your first script.

What if I want to extract the inputs from the current race but cannot finish it?

At any point in the race, you can execute the recover_inputs command to extract inputs from the current race you are in. This will extract all inputs up to the current point in time. You can also click Copy Inputs from the Current Race in the Input Editor if you have an input file already loaded. This command’s behavior is the same as dump_inputs, here you can also specify the filename to automatically save the inputs to, like so: recover_inputs recovered.txt.