Variables
-
speed
- Controls the speed of the race. You can use a float value to set the speed to a lower value than 1. Setting the speed to very high values like100
may result in skipping inputs by the game which can cause desyncs. This is not because TMInterface cannot apply inputs at this speed, but because the game will intentionally stop reading input state at each tick. By default this is1
. -
replay_speed
- Controls the speed of the game while replaying inputs loaded with areplay
command. The speed will be automatically managed when using thereplay
command to allow for quick run resetting & attempts. The speed will be applied at the beginning of the run and reset 1 second before the specified time used in thereplay
command. If no time specified, the speed will not be reset. By default this is1
. -
countdown_speed
- Controls the speed of the countdown phase. The speed will be automatically applied only for the countdown, simulating a faster countdown seen in TM2020. Note that this is not modifying the internal countdown time offset and only setting the global speed. The former is possible but not desired, since it affects the physics in some cases. By default this is5
. -
autologin
- If set, tries to auto login the player at the startup of the game. The autologin variable is set to the profile login you want to be logged to. This is the name that is visible in the choose profile menu with the Account: label. If your account is not identifiable with login (The Account: label isnone
), you can instead use an index that identifies which account to choose from the account list. The index is 1 based from top to bottom. For example, if you want to be logged into an account with login namedonadigo
, executeset autologin donadigo
. If your account is not identifiable and is e.g. second in the account list, execute:set autologin 2
. TMInterface will remember that you set this variable for the next time you launch the game, unless you disabled thebuiltin.txt
config file. -
script_folder
- The absolute path to the script folder in which all of your scripts are stored. By default this isC:\Users\username\Documents\TMInterface\Scripts
. -
execute_commands
- Whether or not TMInterface should inject inputs that are currently loaded withload
orreplay
. By default this istrue
. Set tofalse
to disable input replaying. -
log_simulation
- Prints information in the console about the simulation / race events. These events include:- Beginning a new simulation
- Ending a simulation
- Passing through a checkpoint
- Beginning a new lap
- Finishing the race
- Message signaling that the run was driven with TMInterface
-
log_bot
- Prints inputs in the console as they are being applied by the bot. By default this isfalse
. -
format_decmial_time
- when set totrue
, TMInterface will use a decimal time formatting (e.g.2.94
) instead of the millisecond time formatting (e.g.2940
) for timed commands in all its output. This includes commands likedump_inputs
,recover_inputs
and bruteforce result output. By default this istrue
. format_separate_rel
- when set totrue
, TMInterface will generate two separate script lines for both, press and release of a key instead of generating a singular line for both events. For example withformat_separate_rel
settrue
:1.34-9.07 press up
becomes:
1.34 press up 9.07 rel up
discord_presence
- Controls whether or not TMInterface reports its status to Discord. If you are working on a secret project, it is recommended not to use Discord presence to prevent revealing your work. The statuses currently include:- Playing solo - playing a solo map
- Editing an input script - shown when an input script is loaded
- In editor - editing a map
- Bruteforcing - bruteforcing a replay using the built-in bruteforce script. Displays the most important statistics about the current status
-
draw_game
- Disables or enables drawing of the game. Setting this tofalse
will not disable drawing of widgets provided by TMInterface or the console itself. By default this istrue
. -
use_valseed
- When set totrue
, enables an internal feature ingame that randomizes start state of the car, given a seed. The seed is generated by TMInterface itself, but the randomization happens in the native game code. This invalidates every run, and makes the game physics random. By default this isfalse
. -
skip_map_load_screens
- Skips map load screens including “Press any key to continue” in the load screen and choose opponents screen. By default this isfalse
. -
cmd_base_time
- The base time of all timed commands. This variable can be used to offset a group of commands in a script file, without changing timestamp of each command. The injection time is calculated ascurrent_race_time + cmd_base_time
. This value is always reset to0
at the beginning of the race, to prevent its side effects across loading other scripts. Setting this variable at time0
is valid and will work. -
cmd_steer_invert
- Inverts the steering axis for allsteer
andpress
commands that steer the car. Setting this totrue
will result in allsteer
commands having a flipped sign, allpress left
commands steering right and allpress right
commands steering left. This value is always reset tofalse
at the beginning of the race, to prevent its side effects across loading other scripts. Setting this variable at time0
is valid and will work. -
cmd_steer_offset
- Adds a fixed offset to every applied analog steer value. This is useful when wanting to change the strengthness of multiple steer values at once in a script. Be aware that if the resulting value overflows the range[-65536,65536]
, TMInterface will clamp it down. This clamping will be only performed when the original value was previously in the range. The formula for calculating the value is as follows:floor (value * cmd_steer_multiplier + cmd_steer_offset)
This value is always reset to0
at the beginning of the race, to prevent its side effects across loading other scripts. Setting this variable at time0
is valid and will work. -
cmd_steer_multiplier
- Multiplies by a fixed amount every applied analog steer value. This is useful when wanting to change the strengthness of multiple steer values at once in a script. This value is always reset to1
at the beginning of the race, to prevent its side effects across loading other scripts. Setting this variable at time1
is valid and will work. sim_priority
- Specifies what process priority should be used for the game process when a simulation is playing out. The following values are available:none
- normal priorityhigh
- high priorityrealtime
- realtime priority
By default this is
none
.-
sim_debug
- Enables a debug mode for simulations in which the game runs all game-related systems, such as input, graphics and sound. In this mode TMInterface will enable the game camera and perform modifications in the game scene to make it able to view the simulation play-out live. Note that in debug mode, the simulation will take longer time because of additional overhead. You can modify the simulation speed by settingsim_speed
. -
sim_speed
- Modifies the simulation speed in debug mode. This is not the same as thespeed
variable, which controls the speed of the entire game. By default, this is equal to5
which is also what the game uses for simulation by default. This variable does not affect anything whensim_debug
isfalse
. -
sim_convert_analog
- Converts keyboard left/right inputs to analogsteer
commands. The feature works globally for all validations, so it works with thedump_inputs
command and bruteforce. -
sim_show_valid_window
- If set tofalse
, TMInterface will hide the “Validating” message window while simulating the race.true
by default. -
extended_steer
- If set totrue
, enables the extended steering range of[-6553600, 6553600]
. Note that this range is not physically possible, therefore this variable is by default set tofalse
. -
random_seed
- When set, fixes the random seed to the provided numerical value. Setting this value will result in features like bruteforce to always generate the same solutions every time. Allowed range of the seed is[0, 4294967295]
. By default this is-1
, which means disabled. -
autorewind
- Controls whether TMInterface should detect changes in scripts and automatically rewind to the latest save state. Depending on how long the run is, TMInterface may rewind to more than 1 second difference from the actual point of change. By default this istrue
, which means enabled. -
autorewind_nofinish
- Controls whether making a change in the input file will prevent ending the race. This is useful, when you are changing the script just before the finish. By default this istrue
, which means that finish will be prevented. -
background
- Draws a solid background behind all the widgets, while covering the entire game’s screen with a single color. Useful when wanting to key out certain elements like the input viewer. To set a new color, provide a an RGB value value separated with commas like so:set background 255,100,190
. viz_type
- the visualization style in which the input widget shows inputs. This can be one of the following:standard
- the standard input viewerjoystick
- a circular joystick visualization, used exclusively for analog inputs
controller
- The controller that will be executed at simulation time. This can be:-
bruteforce
- The bruteforce script. To bruteforce a replay, choose the replay you want to bruteforce, click Launch and then Validate. TMInterface will automatically open a standard output console alongside the game’s window when bruteforcing, to print all relevant information and inputs if a better time is found. The script may be stopped at any point by pressing the Escape key on the keyboard (the console window has to be focused).The bruteforce controller can work for different targets. The default target is the finish time. Other available targets are checkpoint time and trigger. See
bf_target_cp
andbf_target_trigger
.If
bf_target_cp
is-1
,bf_target_trigger
is checked, ifbf_target_trigger
is-1
, then finish time is chosen. -
none
- No controller.
-
-
save_triggers
- if true, triggers will be saved between game sessions. This may not be desired, if you already configure triggers through the config.txt file. By default this is false, which means disabled. -
trigger_default_color
- the default color of trigger boxes on the map. To set a new color, provide a an RGBA value value separated with commas like so:set trigger_default_color 255,0,0,150
. -
trigger_hit_color
- the color when the trigger is hit by the vehicle. To set a new color, provide a an RGBA value value separated with commas like so:set trigger_hit_color 0,255,0,150
. -
ingame_real_speed_display
- displays the “real speed” of the vehicle in the ingame speed display. The real speed is the raw magnitude of the velocity vector, while the vanilla speedometer calculates it also based on other factors such as aim direction. -
disable_forced_camera
- if set to true, disables any MediaTracker clips that might be triggered in the map. By default this is false, which means cameras are enabled. -
auto_reload_plugins
- if set to true, automatically reloads all plugins when a change is detected in the Plugins folder. By default this is true, which means enabled. -
input_steer_display
- if set to true, displays the steer value in the input viewer. By default this is false, which means disabled. -
unfocused_fps_limit
- if set to false, disables the FPS limit when the game window is not focused. By default this is true. -
mass_validation_timeout
- if set to false, disables the timeout for mass validation of replays (/validatepath command line option). By default this is true. -
run_editor_cursor_preview
- whether clicking on a line in Input Editor should rewind to the time of the input. By default this is true. -
high_replay_sample_rate
- if set to true, increases the sample rate of the replay to 20 Hz (every 50ms). By default this is false (10 Hz). -
replay_takeover
- if set to true, the player takes over the race, after rewinding to the replay time. By default this is false (continue executing inputs). -
bf_modify_count
- the number of inputs that should be changed in a single attempt. bf_max_steer_diff
- The maximum difference that a steer value may be changed by in either direction. If the resulting steer falls out of the normal range, it’s limited to the normal range of[-65536, 65536]
. If the original value was already in the extended range, it is limited to the extended range of[-6553600, 6553600]
. By default this is10000
. Setting this value can also affectpress left/right
input. For example2000-3000 press left
withbf_max_steer_diff
set to10000
may get transformed to:2000 steer -58567 3000 steer 0
-
bf_max_time_diff
- The maximum difference that the time of an input may be changed in either direction. This difference applies to all commands and not only steer commands. By default this is0
, which means disabled. -
bf_override_stop_time
- If set, overrides the finish time of the original replay. This variable is useful when trying to achieve a time below a specified time. By default this is-1
, which means disabled. This variable also works for checkpoints and triggers. This variable supports formatted timestamps e.g:set bf_override_stop_time 9.23
. -
bf_inputs_min_time
- If set, specifies the minimum time for an input to qualify to be changed. By default this is-1
which means disabled. This variable supports formatted timestamps e.g:set bf_inputs_min_time 9.23
. -
bf_inputs_max_time
- If set, specifies the maximum time for an input to qualify to be changed. By default this is-1
which means disabled. This variable supports formatted timestamps e.g:set bf_inputs_max_time 9.23
. -
bf_play_sound
- if set totrue
, plays a sound on each improvement. By default this isfalse
, which means disabled. -
bf_target
- the bruteforce optimization target. One of:finish
,checkpoint
,trigger
,point
. -
bf_target_cp
- the target checkpoint index to optimise for. Note that checkpoints are ordered in the way the bruteforced replay passed them. The first checkpoint has an index of1
, second -2
and so on. By default this is-1
. -
bf_target_trigger
- the target custom trigger index to optimise for. A possible target trigger does not need to be passed by the bruteforced replay. The first trigger has an index of1
, second -2
and so on. By default this is-1
. -
bf_inputs_fill_steer
- whether or not bruteforce should be able to change steering value at every physics tick. If this is enabled, inputs are automatically transformed from binary to their analog version regardless of thesim_convert_analog
setting. By default this istrue
. -
bf_target_point
- space delimited string with the X Y Z coordinates of the target point that is being bruteforced e.g:223.48 33.73 484.9
. -
bf_weight
- the ratio for point bruteforce -0.0
being full distance optimization and1.0
full velocity optimization. By default this is0.0
. -
bf_keep_all_cps
- if set totrue
, forces the script to reject any solution that skips any checkpoint that was collected in the base replay. By default this istrue
. bf_condition_speed
- applies tocheckpoint
,trigger
andpoint
evaluations. A floating point value that makes bruteforce reject any solution if it does not reach the target speed at time of evaluation (the value is inkm/h
). By default this is0.0
.