The TruckersMP Client SDK lets you write native plugins for the TruckersMP client for Euro Truck Simulator 2 and American Truck Simulator. It can react to game events, read live world state, draw overlays, and extend gameplay systems.
The SDK is header-only. There is nothing to link against; the client binds everything at runtime through function tables.
- Windows x64
- A C++17 (or newer) compiler; any toolchain producing a Windows x64 DLL works
- The TruckersMP client
All headers live in include/TruckersMP. The following
are the public ones that you may include in your build:
| Header | When to include |
|---|---|
TruckersMP.hxx |
Always. The C++ API: Session, typed modules, std::optional getters, type-safe events. |
Bus.hxx |
Only if your plugin covers bus gameplay. |
The remaining headers (TruckersMP.h, TruckersMP_Bus.h, TruckersMP_Base.h,
TruckersMP_Runtime.hxx) are the C interop layer and wrapper internals, there
for binary compatibility between your plugin and the client. The two headers
above pull them in; you do not have to include them yourself. C++ is the
supported wrapper today.
The bus module is gated behind an intent, a named grant that gives a plugin access to a module. The bus intent is public, so its add-on ships in this repository. Other intents are granted per project on request; the Intents page explains how to apply.
| Example | Shows |
|---|---|
general |
Basic SDK usage: getters, events, entity handles, and the bus module add-on. |
Each example is a standalone CMake project; build it with:
cmake -B build -A x64
cmake --build build --config ReleaseThe full documentation lives at docs.truckersmp.com/client-sdk. The Getting Started guide takes to a working plugin; the rest covers core concepts, a reference for every public module, how-to articles, and the change log for each SDK release.
Ask questions in the Discord server. Report bugs on the issue tracker.
The SDK is released under the MIT License.
