Introduction
TMInterface allows for creating plugins using the AngelScript embeddable scripting language. The language compiler is integrated with TMInterface along with API’s that allow you to access different features of TMInterface and the game programmatically.
A plugin can e.g:
- Implement a new bruteforce evaluation
- Implement a separate bruteforce algorithm
- Create new UI for real-time displays
- Inject game inputs and control vehicle state
Creating a new plugin
To create a new plugin, open TMInterface, and head over to the Settings > Plugins tab. From there, click the Create New Plugin button. A new plugin will be created and loaded immediately in TMInterface and your default text editor will open the plugin’s main script file.
Changing the plugin code will reload the plugin in-game automatically. Check out Callback functions for more information on when certain functions are called within your plugin.
Creating a plugin with multiple files
TMInterface’s AngelScript currently does not support import
statements.
A plugin file is an AngelScript file with the extension .as
. To create a plugin with multiple files, create a new folder in the Documents/TMInterface/Plugins
folder
and place your .as
files in there. TMInterface will automatically recursively load all .as
files in the folder. A plugin is either a singular .as
file or a folder
in the top level Documents/TMInterface/Plugins
folder.
Plugin distribution
If your plugin is a single .as
file, you can distribute it as-is. If your plugin is a folder, you can distribute it as a .zip
file that is then later extracted in the Plugins directory by the end user.