A simple launcher for TruckersMP to play ATS or ETS2 in multiplayer.
truckersmp-cli allows to download TruckersMP and handles starting TruckersMP through Wine while supporting the Windows versions of American Truck Simulator and Euro Truck Simulator 2. The Windows version of Steam should already be able to run in the same Wine prefix.
On Linux it's possible to install and update the game's Windows versions automatically through SteamCMD and start TruckersMP through Proton. While updating all running Steam processes will be stopped to prevent Steam from asking for password and guard code at Steam's next startup. A working native Steam installation is needed for starting through Proton.
Short option | Long option | Description |
---|---|---|
-h |
--help |
Show help |
-a |
--ats |
Use American Truck Simulator |
-b VERSION |
--beta VERSION |
Set game version to VERSION, useful for downgrading (e.g. temporary_1_35 ) |
-d |
--enable-d3d11 |
Use Direct3D 11 instead of OpenGL |
-e |
--ets2 |
Use Euro Truck Simulator 2 [Default if neither ATS or ETS2 are specified] |
-g DIR |
--gamedir DIR |
Choose a different directory for the game files [Default: $XDG_DATA_HOME/truckersmp-cli/(Game name)/data ] |
-i APPID |
--proton-appid APPID |
Choose a different AppID for Proton (Needs an update for changes) |
-l LOG |
--logfile LOG |
Write log into LOG, -vv option is recommended [Default: Empty string (only stderr)] Note: Messages from Steam/SteamCMD won't be written, only from this script (Game logs are written into My Documents/{ETS2,ATS}MP/logs/client_*.log ) |
-m DIR |
--moddir DIR |
Choose a different directory for the mod files [Default: $XDG_DATA_HOME/truckersmp-cli/TruckersMP , Fallback: ./truckersmp ] |
-n NAME |
--account NAME |
Steam account name to use |
-o DIR |
--protondir DIR |
Choose a different Proton directory [Default: $XDG_DATA_HOME/truckersmp-cli/Proton ] |
-p |
--proton |
Start the game with Proton [Default on Linux if neither Proton or Wine are specified] |
-s |
--start |
Start the game [Default if neither start or update are specified] |
-u |
--update |
Update the game [Default if neither start or update are specified] |
-v |
--verbose |
Verbose output (none:error, once:info, twice or more:debug) |
-w |
--wine |
Start the game with Wine [Default on other systems if neither Proton or Wine are specified] |
-x DIR |
--prefixdir DIR |
Choose a different directory for the prefix [Default: $XDG_DATA_HOME/truckersmp-cli/(Game name)/prefix ] |
(Not available) | --activate-native-d3dcompiler-47 |
Activate native 64-bit d3dcompiler_47.dll when starting (Needed for D3D11 renderer) |
(Not available) | --disable-proton-overlay |
Disable Steam Overlay when using Proton |
(Not available) | --self-update |
Update files to the latest release and quit |
(Not available) | --singleplayer |
Start singleplayer game, useful for save editing, using/testing DXVK in singleplayer, etc.) |
(Not available) | --use-wined3d |
Use OpenGL-based D3D11 instead of DXVK when using Proton |
(Not available) | --wine-steam-dir |
Choose a directory for Windows version of Steam [Default: C:\Program Files (x86)\Steam in the prefix] |
(Not available) | --version |
Print version information and quit |
Version | AppID |
---|---|
5.0 (Default) | 1245040 |
4.11 | 1113280 |
If available install from your repository. Updates will ship through your normal system update process.
Operation | System-wide | Per-user (recommended) |
---|---|---|
Installation | pip install truckersmp-cli |
pip install --user truckersmp-cli |
Optional dependencies | pip install truckersmp-cli[optional] |
pip install --user truckersmp-cli[optional] |
Update | pip install truckersmp-cli --upgrade |
pip install --user truckersmp-cli --upgrade |
Additional information | This usually requires root permission and can interfere with other python packages installed through your normal repository so be careful. | Make sure the binary path (e.g. $HOME/.local/bin ) is in your $PATH . |
You can get the latest pre-built release from the release page and decompress it into the desired folder. This version is capable to update itself by running --self-update
so make sure it's placed in a folder where your user has write permissions.
- Clone or download this repository
- Run
make
in the main folder to build the injector executable. Bash/zsh completion files will also be generated if genzshcomp is available. - Optional run
setup.py
to manually start the installation process.
If genzshcomp
is installed, make
generates shell completion files for bash (bash-completion) and zsh. They enable tab-completion of available command-line options.
Shell | System-wide search paths |
---|---|
bash | $(pkg-config --variable=completionsdir bash-completion) (e.g. /usr/share/bash-completion/completions/ ), /usr/local/share/bash-completion/completions/ |
zsh | /usr/share/zsh/site-functions/ , /usr/local/share/zsh/site-functions/ |
- The bash-completion file
truckersmp-cli.bash
needs to be renamed totruckersmp-cli
- Debian-based systems are using the
/usr/share/zsh/vendor-completions/
directory for zsh completions
Copy truckersmp-cli.bash
to $XDG_DATA_HOME/bash-completion/completions/truckersmp-cli
.
$ mkdir -p "${XDG_DATA_HOME:-~/.local/share}/bash-completion/completions"
$ cp truckersmp-cli.bash "${XDG_DATA_HOME:-~/.local/share}/bash-completion/completions/truckersmp-cli"
Copy _truckersmp-cli
to a directory that is part of $fpath
and run compinit
.
python
in version 3.3 (released in September 2012) or latersdl2
in x86_64steam
either the native Linux version in use with Proton or the Windows Steam in use with Wine
pkg_resources
(part ofsetuptools
) to get the version information from the Python packagevdf
to automatically detect the steam account with saved credentialswine
as a possible replacement to Proton
gcc-mingw-w64
to build the injector executablemake
genzshcomp
to generate bash/zsh completionsgit
to clone this repo and help developingsetuptools
to runsetup.py
To just try out TruckersMP (ETS2) on Linux with nothing already downloaded you can simply run truckersmp-cli
which will download everything needed to get you going with Proton and a native Steam installation.
$ truckersmp-cli --ets2 --update
$ truckersmp-cli --ats --start
$ truckermsp-cli --ats --update --start --gamedir "/path/to/gamedir"
$ truckersmp-cli --ets2 --start --wine
Make sure that
- The Windows version of Steam is already running in the same Wine prefix or
- The Windows version of Steam is installed in
C:\Program Files (x86)\Steam
in the same Wine prefix or - You're specifying the path to the Window version of Steam with
--wine-steam-dir
$ truckersmp-cli --ets2 --start --proton --prefixdir "/path/to/prefix"
$ truckersmp-cli --ets2 --start --wine --prefixdir "/path/to/prefix/pfx"
- While the prefix for Wine will point directly to the prefix location, Proton uses a subfolder
pfx
for the actual prefix and points to the parent folder. - Your prefix must be 64bits, the mod is not 32bits-compatible.
- Stable and faster than wined3d. But slower than DXVK.
- Useful if you're not using Vulkan-capable GPU.
- Faster than OpenGL when DXVK is used.
- DXVK requires Vulkan support.
- DXVK 1.4.6 or newer is needed because older versions have rendering issue. If you're using Proton, use 4.11-10 or newer.
- Windows native 64-bit
d3dcompiler_47.dll
is needed for multiplayer.- Without this native DLL, TruckersMP login screen will not be shown.
- When
--activate-native-d3dcompiler-47
is specified with-s
(--start
),truckersmp-cli
downloads/activates the DLL. - Once the DLL is activated, there's no need to specify the option again.
- Proton uses DXVK by default.
- When using Proton, wined3d can be used by specifying
--use-wined3d
, but it's not recommended because this is slower than OpenGL.
- When using Proton, wined3d can be used by specifying
- Used only when
-d
or--enable-d3d11
is specified.
Game | Path |
---|---|
ATS | $XDG_DATA_HOME/truckersmp-cli/American Truck Simulator/ |
ETS2 | $XDG_DATA_HOME/truckersmp-cli/Euro Truck Simulator 2/ |
Game | Path |
---|---|
ATS | $XDG_DATA_HOME/truckersmp-cli/American Truck Simulator/prefix/pfx/ |
ETS2 | $XDG_DATA_HOME/truckersmp-cli/Euro Truck Simulator 2/prefix/pfx/ |
Game | Proton | Wine |
---|---|---|
ATS | $XDG_DATA_HOME/truckersmp-cli/American Truck Simulator/prefix/pfx/drive_c/users/steamuser/My Documents/American Truck Simulator/game.log.txt |
$XDG_DATA_HOME/truckersmp-cli/American Truck Simulator/prefix/pfx/drive_c/users/(os_login_name)/My Documents/American Truck Simulator/game.log.txt |
ATSMP | $XDG_DATA_HOME/truckersmp-cli/American Truck Simulator/prefix/pfx/drive_c/users/steamuser/My Documents/ATSMP/logs/ |
$XDG_DATA_HOME/truckersmp-cli/American Truck Simulator/prefix/pfx/drive_c/users/(os_login_name)/My Documents/ATSMP/logs/ |
ETS2 | $XDG_DATA_HOME/truckersmp-cli/Euro Truck Simulator 2/prefix/pfx/drive_c/users/steamuser/My Documents/Euro Truck Simulator 2/game.log.txt |
$XDG_DATA_HOME/truckersmp-cli/Euro Truck Simulator 2/prefix/pfx/drive_c/users/(os_login_name)/My Documents/Euro Truck Simulator 2/game.log.txt |
ETS2MP | $XDG_DATA_HOME/truckersmp-cli/Euro Truck Simulator 2/prefix/pfx/drive_c/users/steamuser/My Documents/ETS2MP/logs/ |
$XDG_DATA_HOME/truckersmp-cli/Euro Truck Simulator 2/prefix/pfx/drive_c/users/(os_login_name)/My Documents/ETS2MP/logs/ |
Game | Proton | Wine |
---|---|---|
ATS | $XDG_DATA_HOME/truckersmp-cli/American Truck Simulator/prefix/pfx/drive_c/users/steamuser/My Documents/American Truck Simulator/mod/ |
$XDG_DATA_HOME/truckersmp-cli/American Truck Simulator/prefix/pfx/drive_c/users/(os_login_name)/My Documents/American Truck Simulator/mod/ |
ETS2 | $XDG_DATA_HOME/truckersmp-cli/Euro Truck Simulator 2/prefix/pfx/drive_c/users/steamuser/My Documents/Euro Truck Simulator 2/mod/ |
$XDG_DATA_HOME/truckersmp-cli/Euro Truck Simulator 2/prefix/pfx/drive_c/users/(os_login_name)/My Documents/Euro Truck Simulator 2/mod/ |
Game | Proton | Wine |
---|---|---|
ATS | $XDG_DATA_HOME/truckersmp-cli/American Truck Simulator/prefix/pfx/drive_c/users/steamuser/My Documents/ATSMP/mod/ |
$XDG_DATA_HOME/truckersmp-cli/American Truck Simulator/prefix/pfx/drive_c/users/(os_login_name)/My Documents/ATSMP/mod/ |
ETS2 | $XDG_DATA_HOME/truckersmp-cli/Euro Truck Simulator 2/prefix/pfx/drive_c/users/steamuser/My Documents/ETS2MP/mod/ |
$XDG_DATA_HOME/truckersmp-cli/Euro Truck Simulator 2/prefix/pfx/drive_c/users/(os_login_name)/My Documents/ETS2MP/mod/ |
See TruckersMP Knowledge Base.
- If Steam is running while SteamCMD is using the same session credentials the Steam client looses all connections and asks for the password and the guard code at the next startup. This script closes all Steam processes before acting with SteamCMD so starting an update with a shortcut out of the Steam client won't work because Steam waits for the script to finish and the script waits for Steam to quit.
- I was greatly inspired by mewrev's Inject tool and TheUnknownNO's unofficial TruckersMP-Launcher.
- Amit Malik's article on dll injection was also a great help.
- kakurasan and Lucki for the helper script.