Skip to content

TrackAndTruckDevs/SPF_ConsoleCommandHotkeys

Repository files navigation

SPF Console Command Hotkeys Plugin

Logo SPF Framework

GitHub Release GitHub License

Patreon Stars Discord Youtube


A plugin for American Truck Simulator and Euro Truck Simulator 2 that allows you to execute any console command using customizable hotkeys. It features a powerful "Cycle Mode" to alternate between multiple commands with a single key press.

See It In Action

Watch a demonstration and tutorial of the plugin on YouTube

Features

  • Custom Console Hotkeys: Map any game command (e.g., g_police 0, g_set_time 12, warp 0.8) to a keyboard or gamepad button.
  • Cycle Mode: Create sequences of commands that alternate with each press (e.g., toggle between different time scales or weather settings).
  • In-Game Manager: A user-friendly UI to add, manage, and delete your command actions directly within the game.
  • Live Notifications: Optional on-screen notifications to confirm when a command has been successfully executed.
  • Seamless Integration: Uses the core SPF Framework keybind system for easy configuration.
  • Full Localization: Support for 15 languages, including Ukrainian, English, German, French, and more.

Support the Project

If you enjoy this plugin and want to support the development of future projects, consider supporting us on Patreon.

Support on Patreon

How to Build 🛠️

This is a standard CMake project. To build it from source:

  1. Clone this repository.
  2. Ensure you have CMake and a compatible C++ compiler with the MSVC toolchain (e.g., Visual Studio) installed.
  3. Create a build directory inside the project folder.
  4. Run CMake from the build directory to generate project files (e.g., cmake ..).
  5. Build the project using your chosen build tool (e.g., run cmake --build . or open the generated .sln file in Visual Studio and build from there).

Installation

Prerequisites

You must have the SPF Framework installed for this plugin to work.

Steps

  1. If you haven't already, download and install the SPF Framework according to its instructions.
  2. Download the latest release of this plugin from the Releases page.
  3. You will have a folder named SPF_ConsoleCommandHotkeys. Copy this entire folder into your game's \bin\win_x64\plugins\spfPlugins\ directory.

The final folder structure should look like this:

...your_game_root\bin\win_x64\plugins\spfPlugins\
└───SPF_ConsoleCommandHotkeys
    │   SPF_ConsoleCommandHotkeys.dll
    │
    └───localization
            en.json
            uk.json
            ... (other languages)

How to Use

  1. Start the game.
  2. Press the DELETE key to open the main SPF Framework window.
  3. In the plugin list, find SPF_ConsoleCommandHotkeys and enable it.
  4. Press Ctrl + Q to open the plugin's main manager window.
  5. In the manager window:
    • Click "Add a new command" to open the creation form.
    • Enter a Name (how it will appear in the keybinds list), an optional Description, and the Console Command(s) you want to execute.
    • Click Save.
  6. Now, go back to the main SPF menu (DELETE key), navigate to the "Key Binds" tab, and assign a hotkey to your newly created action.

🙏 Acknowledgements

This project would not be possible without the incredible work of the open-source community. This plugin was created using the SPF-Framework, which provides the foundation for modern plugin development in ATS/ETS2.

About

A plugin for ATS & ETS2 to execute any console command via hotkeys and cycle sequences. Features an in-game manager UI. Powered by SPF-Framework.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors