Available commands

General

  • help - Displays a short help for each command available.

    Syntax & Example: help


  • quit - Immediately terminates the game process quitting the game.

    Syntax & Example: quit


  • set - Sets a variable within TMInterface. Setting custom variables is not supported at the moment. If no value is provided, the variable is reset back to its default value.

    Syntax: set [variable_name] [value]

    Example: set speed 2 - Set speed to 2.
    Example: set speed - Resets the speed variable back to 1.


  • vars - Displays all available variables and their current values. The command also copies a config string into the clipboard that can be used to reproduce exact same settings at later point or share them with someone else.

    Syntax: vars [variable name]
    Example: vars - displays all variables and their values and copies the config string into the clipboard.
    Example: vars speed - displays the value of variable speed.


  • clear - Clears the output of the console, leaving it blank.

    Syntax & Example: clear


  • sleep - Synchronously sleeps an amount of specified milliseconds, pausing the game & render loop. This command supports formatted timestamps.

    Syntax: sleep [time in milliseconds]
    Example: sleep 2000 - Sleep for 2 seconds.
    Example: sleep 1.23 - Sleep 1.23 seconds.


  • bind - Binds a key to a user-defined command. A key can be bound to a command made of multiple commands as well by separating them with a ;. For function keys use f1 to f16 as the key string.

    Syntax: bind [key] [command]
    Example: bind u unload - Binds the u key to the unload command.
    Example: bind f2 "set speed 2" - Binds the F2 key to double the speed of the game.
    Example: bind 0 "set execute_commands false; set speed 1" - Binds the 0 key to set execute_commands to false and reset the speed.


  • unbind - Unbinds a key that has been bound before. The same bind rules apply to the key string to this command.

    Syntax: unbind [key]
    Example: unbind f2 - Unbinds the F2 key.


  • binds - Displays all the current key bindings.

    Syntax & Example: binds


  • alias - Aliases a command to another command. The aliased command has to begin with a valid existing command or an existing alias or a timestamp to work. This means you cannot simply alias any text to a command. The aliased input may consist of multiple commands. If TMInterface detects that the alias is recursive, its execution will be stopped after a recursion limit is reached. If your aliased command contains spaces, make sure to quote the entire input. To remove the alias, execute the alias command again without providing the target command.

    Syntax: alias [alias name] [command]
    Example: alias pr "press right" - aliases "pr" to the command "press right"
    Example: alias sp "set speed" - aliases “sp” to the partial command “set speed”. You can then complete the command as you’d expect: “sp 2” - will set the speed to 2
    Example: alias sp - removes the sp alias
    Example: alias s "steer 40000; press up" - aliases “s” to execute two commands when s is executed

    Note: aliases give a lot of freedom in how you write your scripts. If you do end up sharing your script, it is recommended to share the script that does not use any aliases. You can do that through using commands like dump_inputs or recover_inputs.


  • open_scripts_folder - Opens the script folder that’s defined by the script_folder variable in the Windows explorer.

    Syntax & Example: open_scripts_folder


  • copy_log - Copies all of the console log into the clipboard.

    Syntax & Example: copy_log - copies the logs into the clipboard


  • load_infinity - Loads TMInfinity into the existing game client. Note that this command should only ever be executed at the beginning, in the profile menu and not anywhere else.

    Syntax & Example : load_infinity


  • map - Immediately loads a specified map from the Tracks folder. Autocomplete is available and the list of tracks will be regularly refreshed while typing out the name of the map file.

    Syntax & Example : map A01-Race.Challenge.Gbx

  • cam - Changes race camera. This command does not bypass Mediatracker at the moment.

    Syntax: cam [1, 2, 3, 4, 5, 6, 7, 8, 9]

    Syntax & Example: cam 1 - changes the camera to camera 1

  • log - logs a message to the console.

    Syntax: log [message] [warning|error|success]

    Example: log "this is a message" Example: log "Error!" error Example: log "Success!" success Example: log "Warning!" warning

Input commands

  • press - presses a key to steer, accelerate or respawn the car. Possible actions:
    • up - accelerates
    • down - brakes
    • left - steers left
    • right - steers right
    • enter - respawns
    • delete - restarts the current race


    This action supports ranged timestamps such as 0-20000 or 1200-9000. The first timestamp marks key press and the second, it’s release.

    Syntax: press [action]
    Example press up - accelerates the car
    Example 1000-5000 press left - presses the left key for 4 seconds, starting at 1 second


  • rel - releases a key, previously pressed with press

    Syntax: rel [action]
    Example: rel up - releases the up key


  • steer - steers the car using an analog value. The value is an integer in the range of [-65536,65536] and represents how much the car will steer and its direction. A negative value represents a steer to the left and a positive value, steer to the right. A 0 value means no steer. This range is the “normal” range that is possible to actually produce by real hardware but an extended range is available with TMInterface of [-6553600, 6553600]. Note however that using a value outside of the normal range would be considered a run that is not physically possible with physical hardware, therefore, cheating. This range is only possible because of the internal representation used by the game. This range can be enabled by setting extended_steer to true. Additionally steer supports ranged timestamps, a command 1000-2000 steer 40000 will be automatically translated to:
    1000 steer 40000
    2000 steer 0
    

    Syntax: steer [value]
    Example: steer 65536 — steers fully to the right
    Example: steer -20000 — steers slightly to the left


  • gas - accelerates the car using an analog value. The value is an integer in the range of [-65536,65536] and represents how much the car will accelerate or brake. Note that TMNF/TMUF do not support analog acceleration. The action can still be emitted but a larger or smaller value will not change the strength of the car acceleration. The exact value at which the car starts accelerating is -19661 and for braking 19661. Additionally gas supports ranged timestamps, a command 1000-2000 gas 40000 will be automatically translated to:
    1000 gas 40000
    2000 gas 0
    

    Syntax: gas [value]
    Example: gas -50000 — accelerate
    Example: gas 50000 - brake
    Example: gas 0 — reset accelerate and brake

Run & input playback

  • load - Loads a script file with game inputs from the current directory, that can be controlled by setting the scripts_folder variable. If a file does not exist or the interface could not parse the file, an error will be displayed.

    Syntax: load [filename.txt]
    Example: load a01.txt


  • unload - Unloads the current script file loaded with load or replayed with replay. Unloading the file will make the tool not replay any inputs. If no file is currently loaded, this command will do nothing.

    Syntax & Example: unload


  • replay - Reads inputs from the current replay simulation and stores them so they will be replayed in a real run. To choose a replay to be validated, open the replay, click “Validate”, wait for the simulation to play out and then execute this command. The inputs can be unloaded using unload. An additional time parameter may be specified to cut off inputs after this time. Using the command while in the race will use the inputs from the currently loaded input file instead. The command supports delta timestamps such as replay 2.00+.

    Syntax: replay [time to stop in milliseconds]
    Example: replay - replays the validation file in its entirety (while in the menu).
    Example: replay 30000 - replays validation file only to 30s. After that, the control is handed back to the player. Example: replay 2.00+ - only while in the race, fast forwards to 2 seconds ahead of the current time, using the inputs from the currently loaded input file Example: replay 5.00-` - only while in the race, rewinds back to 5 seconds before the current time, using the inputs from the currently loaded input file. Note that this command will not work without an input file being loaded. The ability to rewind from any arbitrary run is being currently implemented.

Save states

  • save_state: saves the current race state into a 10kb file, stored in the States folder inside your Documents\TMInterface directory. This file can then be used to restore the exact state later on and can be also shared with others. The file itself also contains the inputs used to get to that state.

    Syntax: save_state [filename.bin]
    Example: save_state - saves the current state into a file with an auto-generated filename
    Example: save_state state.bin - saves the current state into a file named state.bin


  • load_state: loads the provided file saved with save_state. Note that loading a state from another environment or not loading it in the same race it was saved in, will invalidate the run. load_state can also load the latest save_state saved with save_state, if no filename was provided when saving.

    Syntax: load_state [filename.bin]

    Example: load_state state.bin - loads save state from state.bin Example: load_state - loads the latest save state produced with save_state without any arguments.


  • state_info: displays information about the provided state file such as its version, race time, map name it was saved on and car position

    Syntax & Example: state_info state.bin

Simulation control


  • dump_inputs - Dumps inputs that has been loaded by replay validation. To dump the inputs, execute this command after validating a replay. The inputs will be also copied into the clipboard and can be directly pasted into a script file after.

    Syntax: dump_inputs [filename.txt]
    Example: dump_inputs - dumps inputs from the currently validated replay and copies them into the clipboard.
    Example: dump_inputs inputs.txt - saves inputs from the currently validated replay and saves them to inputs.txt located in the Scripts folder.


  • recover_inputs - Recovers inputs from the current race in run mode. This command is useful when it is not possible to finish the run to save the inputs. The command will print out all the inputs that happened until the current time and copy them into the clipboard, just like dump_inputs.

    Syntax: recover_inputs [filename.txt] Example: recover_inputs - recovers inputs from the current race and copies them into the clipboard.
    Example: recover_inputs inputs.txt - saves inputs from the current race and saves them to inputs.txt located in the Scripts folder.

Cheats

  • tp - Teleports the car to a specified X Y Z coordinates. This command invalidates the run. You may use the + and - syntax to instead move the car by some delta.

    Syntax: tp X[+/-] Y[+/-] Z[+/-]

    Syntax & Example: tp 500 9 500 - teleports the car to X: 500, Y: 9, Z: 500

    Syntax & Example: tp 50- 200+ 100 - teleports the car by -50 units in the X direction, 200 units in the Y direction and sets the Z coordinate to constant 100


  • warp - Changes the race time to a specified time in milliseconds. The value is clamped to a range of [-2147483640, 2147483640]. This command invalidates the run. This command supports formatted timestamps.

    Syntax: warp [time in milliseconds]

    Example: warp 15510 - changes the race time to 15.51ms in-game

    Example: warp 1:23.45 - changes the race time to 1:23.45ms in-game


  • finish - Forcefully finishes the current race. Useful when you need to save the replay without finishing the map e.g: to retrieve the inputs. The command may be used in any race context and TMInterface will force the game to finish the current race.

    Syntax & Example: finish - finishes the current race

Widgets

  • toggle_info - Toggles an info window that displays the raw vectors of position, velocity and the rotation of the car. The command will show the window if it is currently hidden and hide it otherwise. Syntax & Example: toggle_info


  • toggle_speed - Toggles a window visualizing the display speed of the car over time. The command will show the window if it is currently hidden and hide it otherwise.

    Syntax & Example: toggle_speed


  • toggle_inputs - Toggles a window displaying the current inputs applied as seen by the game. The display will change form dynamically based on the current input. Any input is visualized including tool’s own injected inputs and live player inputs. The input display supports two visualization types, see the viz_type variable. You can have multiple input display visible at one time. To add new display use the add_input_display command. The command will show the window if it is currently hidden and hide it otherwise. You can also toggle a specific input display by providing its name after the command.

    Syntax: toggle_inputs [display name]

    Example: toggle_inputs - toggles all input displays that are added

    Example: toggle_inputs A01.txt - toggles only the display that shows inputs of the script A01.txt


  • toggle_triggers - Toggles trigger visualization in the race. The triggers are currently visualized at the top of the game.

    Syntax & Example: toggle_triggers


  • bg_steer_color - Changes the background of the inputs widget. You can choose to which widget you want to apply the background color for by specifying its index. The color specified is three values (R,G,B,[A]) in the range [0-255] separated with commas.

    Syntax: bg_steer_color [R,G,B[,A] color] [id]
    Example: bg_steer_color 255,0,0 - sets the background color of the default input widget to red
    Example: bg_steer_color 0,255,255,50 A01.txt - sets the background color of the “A01.txt” input widget to transparent cyan


  • steer_color - Changes the steer color of the inputs widget. You can choose to which widget you want to apply the steer color for by specifying its index. The color specified is three values (R,G,B) in the range [0-255] separated with commas.

    Syntax: steer_color [R,G,B[,A] color] [id]
    Example: steer_color 255,0,0 - sets the steer color of the default input widget to red
    Example: steer_color 0,255,255,100 A01.txt - sets the steer color of the “A01.txt” input widget to transparent cyan


  • acceleration_color - Changes the acceleration color of the inputs widget. You can choose to which widget you want to apply the steer color for by specifying its index. The color specified is three values (R,G,B) in the range [0-255] separated with commas.

    Syntax: acceleration_color [R,G,B[,A] color] [id]
    Example: acceleration_color 255,0,0 - sets the acceleration color of the default input widget to red
    Example: acceleration_color 0,255,255,100 A01.txt - sets the acceleration color of the “A01.txt” input widget to transparent cyan


  • brake_color - Changes the brake color of the inputs widget. You can choose to which widget you want to apply the steer color for by specifying its index. The color specified is three values (R,G,B) in the range [0-255] separated with commas.

    Syntax: brake_color [R,G,B[,A] color] [id]
    Example: brake_color 255,0,0 - sets the brake color of the default input widget to red
    Example: brake_color 0,255,255,100 A01.txt - sets the brake color of the “A01.txt” input widget to transparent cyan


  • toggle_console - Toggles the main console window. The command will show the window if it is currently hidden and hide it otherwise.

    Syntax & Example: toggle_console


  • add_input_display - Adds a new input display, given a script file. The new input display gets assigned a its name, which can be viewed using input_displays. The inputs loaded from such script are not injected into the game, only visualized in the display.

    Syntax: add_input_display [filename.txt]
    Example: add_input_display b05.txt - adds an input display that visualizes inputs of a script file b05.txt


  • remove_input_display - Removes an input display given its name. To see all currently available displays, use input_displays.

    Syntax: remove_input_display [name]
    Example: remove_input_display A01.txt - removes the input display that displays inputs of the script A01.txt


  • input_displays - Displays all available input displays currently loaded, their names and script files they visualize.

    Syntax & Example: input_displays


  • reload_plugin - Reloads a plugin.

    Syntax: reload_plugin [name]
    Example: reload_plugin "Incremental pack" - reloads a plugin with title “Incremental pack”
    Example: reload_plugin - reloads all plugins


  • steer_text_color - Changes the color of the steer text in the input display. The color specified is three values (R,G,B) in the range [0-255] separated with commas.

    Syntax: steer_text_color [R,G,B] [input display name]
    Example: steer_text_color 255,0,0 - sets the steer text color to red Example: steer_text_color 0,255,255,50 A01.txt - sets the steer text color of the “A01.txt” input widget to transparent cyan

Bruteforce

  • add_trigger - Adds a trigger to evaluate the car state when the car hits the specified trigger. The coordinates are specified using a format of: x1 y1 z1 x2 y2 z2, all elements are in game units. The two points mark the coordinates of the start and end of the cuboid. The toggle_info command can be used to obtain the coordinates at a desired point. You can optionally not provide any arguments to the command, which will place the trigger depending on the current camera (the trigger will be placed close to the camera).

    Syntax: add_trigger [first point (X, Y, Z)] [second point (X, Y, Z)] Example: add_trigger 500 40 500 800 90 800 - adds a trigger at position [500 40 500] expanding to coordinates [800 90 800]. Example: add_trigger` - adds a trigger close to the current camera


  • remove_trigger - Removes a trigger from the trigger list, provided the index. To list all triggers and their indexes use triggers. Alternatively, you can remove all triggers with the all argument.

    Syntax & Example: remove_trigger [index/"all"] Example: remove_trigger 1 - removes the first trigger provided it was added previously. Example: remove_trigger all` - removes all existing triggers


  • triggers - Lists all available triggers and their indexes.

    Syntax & Example: triggers