A reference plugin for American Truck Simulator and Euro Truck Simulator 2 that demonstrates how to intercept and manipulate the in-game Convoy chat system. This plugin is primarily intended for educational purposes and research.
This project is a high-level example of reverse engineering and plugin development using the SPF-Framework. It showcases:
- Signature Scanning: Finding internal game functions by instruction patterns.
- Dynamic Data Extraction: Extracting global pointers and structure offsets directly from machine code.
- Function Hooking: Intercepting game logic using trampolines to monitor or modify behavior.
- Programmatic Chat Sending: Send messages to the convoy chat directly from the plugin UI.
- Message Type Support: Test different chat channels: Player (Broad), Local, Private, and System.
- Real-time Interception: Log every incoming and outgoing chat message, including Sender IDs and internal type IDs.
- Auto-Capture Logic: Automatically finds the game's Chat Manager instance using advanced memory scanning.
- Integrated Logger: View the history of intercepted messages within the plugin window.
If you find this reference plugin useful for your own development, consider supporting us on Patreon.
This is a standard CMake project. To build it from source:
- Clone this repository.
- Ensure you have CMake and a compatible C++ compiler with the MSVC toolchain (e.g., Visual Studio) installed.
- Create a
builddirectory inside the project folder. - Run CMake from the
builddirectory to generate project files (e.g.,cmake ..). - Build the project using your chosen build tool (e.g., run
cmake --build .).
You must have the SPF Framework installed for this plugin to work.
- Download the latest release of this plugin.
- Copy the
SPF_ConvoyChatMessagingfolder into your game's\bin\win_x64\plugins\spfPlugins\directory.
- Start the game and enter a Convoy session.
- Press
Ctrl + Yto open the Convoy Chat Manager window. - Capture the instance: The plugin is designed to automatically capture the Chat Manager as soon as you create or join a Convoy session. If the status remains red for any reason, simply type any message in the standard game chat to trigger manual capture via the input hook.
- Send Messages: Enter text, select the message type, and click "Send".
- Monitor Chat: View all captured messages in the "Intercepted Messages" table.
This project was created using the SPF-Framework, the foundation for modern plugin development in ATS/ETS2.
