A simple launcher for TruckersMP to be used with Wine/Proton
Project description
truckersmp-cli
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. The Windows versions of ATS and ETS2 can be installed and updated via SteamCMD while all running Steam processes will be stopped to prevent Steam from loosing connection. Your Steam password and guard code are required by SteamCMD once for this to work.
On Linux it's possible to start TruckersMP through Proton. A working native Steam installation is needed for this which has the desired game installed or with an update pending. SteamCMD can use your saved credentials for convenience.
Known issues
- It was reported that "ProMods + ETS2MP" crashes with Proton 5.13 but Proton 5.0 works (issue #147)
- If (default) OpenGL rendering backend is used, game crashes due to a bug in Multiplayer DLL when trying to choose a color for "Player tag" or "Players on the world map" (issue #91)
- A workaround is to use D3D11 rendering backend by specifying
-d(--enable-d3d11)
- A workaround is to use D3D11 rendering backend by specifying
- If D3D11 rendering backend is used, TruckersMP login screen is not shown without Windows native 64-bit
d3dcompiler_47.dlltruckersmp-cliprovides--activate-native-d3dcompiler-47option as a workaround: When this is specified with-s(--start),truckersmp-clidownloads/activates the DLL- Once the DLL is activated, there's basically no need to specify the option again
- When downgrading Proton, the native DLL is removed: Then
--activate-native-d3dcompiler-47is needed again
Install
From repository (recommended)
System repository (recommended)
If available install from your repository. Updates will ship through your normal system update process.
Python Package Index
| Operation | System-wide | Per-user (recommended) |
|---|---|---|
| Installation | python3 -m pip install truckersmp-cli |
python3 -m pip install --user truckersmp-cli |
| Optional dependencies | python3 -m pip install truckersmp-cli[optional] |
python3 -m pip install --user truckersmp-cli[optional] |
| Update | python3 -m pip install truckersmp-cli --upgrade |
python3 -m 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. |
Manual download
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.
Runtime dependencies
Required
pythonin version 3.3 (released in September 2012) or latersdl2in x86_64steameither the native Linux version in use with Proton or the Windows Steam in use with Wine
Optional
pkg_resources(part ofsetuptools) to get the version information from the Python packagevdfto automatically detect the steam account with saved credentialswineas a possible replacement to Proton
Syntax
$ truckersmp-cli (options...) [action] [game name]
Actions
| Name | Description |
|---|---|
start |
Start game |
update |
Update/install latest game |
downgrade |
Downgrade game (install game from temporary_X_Y branch) |
updateandstart(or ustart) |
update + start (Default) |
downgradeandstart(or dstart) |
downgrade + start |
Game names
| Name | Game |
|---|---|
ets2mp |
ETS2 multiplayer (Default) |
ets2 |
ETS2 singleplayer |
atsmp |
ATS multiplayer |
ats |
ATS singleplayer |
Options
| Short option | Long option | Description |
|---|---|---|
-h |
--help |
Show help |
-a |
--ats |
DEPRECATED 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 |
DEPRECATED 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 |
DEPRECATED Start the game [Default if neither start or update are specified] |
-u |
--update |
DEPRECATED 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) | --check-windows-steam |
Check for the Windows Steam version on updating when using Proton |
| (Not available) | --disable-proton-overlay |
Disable Steam Overlay when using Proton |
| (Not available) | --downgrade |
DEPRECATED Downgrade to the latest version that is supported by TruckersMP. Note: This option implies "--update" option and is ignored if "--beta" ("-b") option is specified |
| (Not available) | --game-options OPTIONS |
Specify ATS/ETS2 options Note: If specifying one option, use --game-options=-option format [Default: -nointro -64bit] |
| (Not available) | --native-steam-dir |
Choose native Steam installation, useful only if your Steam directory is not detected automatically [Default: auto] |
| (Not available) | --self-update |
Update files to the latest release and quit |
| (Not available) | --singleplayer |
DEPRECATED Start singleplayer game, useful for save editing, using/testing DXVK in singleplayer, etc. |
| (Not available) | --skip-update-proton |
Skip updating already-installed Proton when updating game with Proton enabled |
| (Not available) | --steamruntimedir |
Choose a different Steam Runtime directory for Proton 5.13 or newer |
| (Not available) | --use-wined3d |
Use OpenGL-based D3D11 instead of DXVK when using Proton |
| (Not available) | --wine-desktop SIZE |
Use Wine desktop, work around missing TruckerMP overlay after tabbing out using DXVK, mouse clicking won't work in other GUI apps while the game is running, SIZE must be 'WIDTHxHEIGHT' format (e.g. 1920x1080) |
| (Not available) | --wine-steam-dir |
Choose a directory for Windows version of Steam [Default: C:\Program Files (x86)\Steam in the prefix] |
| (Not available) | --without-steam-runtime |
Don't use Steam Runtime even when using Proton 5.13 or newer |
| (Not available) | --without-wine-discord-ipc-bridge |
Don't use wine-discord-ipc-bridge for Discord Rich Presence |
| (Not available) | --version |
Print version information and quit |
Proton versions and AppIDs
| Version | AppID |
|---|---|
| 5.0 (Default) | 1245040 |
| 4.11 | 1113280 |
Build
- Clone or download this repository
- Run
makein the main folder to build the injector executable. Bash/zsh completion files will also be generated. - Optional run
setup.pyto manually start the installation process.
Buildtime dependencies
Required
gcc-mingw-w64to build the injector executablemake
Optional
gitto clone this repo and help developingsetuptoolsto runsetup.py
bash/zsh completion
make generates shell completion files for bash (bash-completion) and zsh. They enable tab-completion of available positional arguments and command-line options.
System-wide installation
| 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.bashneeds to be renamed totruckersmp-cli - Debian-based systems are using the
/usr/share/zsh/vendor-completions/directory for zsh completions
Per-user installation
bash
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"
zsh
Copy _truckersmp-cli to a directory that is part of $fpath and run compinit.
Usage examples
Basic
Everything default
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.
Install and update Euro Truck Simulator 2
$ truckersmp-cli update ets2mp
Start American Truck Simulator with TruckersMP
$ truckersmp-cli start atsmp
How to downgrade games
When the latest game version is not compatible with TruckersMP yet, the user can downgrade the games with truckersmp-cli downgrade [game name] which installs the latest version that is supported by TruckersMP by determining the Steam game branch name by using TruckersMP Web API.
$ truckersmp-cli downgrade ets2mp
--beta option can be used to specify the branch name directly.
$ truckersmp-cli --beta temporary_1_39 downgrade ets2mp
If both options are given, the branch name from --beta option is used.
Advanced
Install, update and start TruckersMP (ATS) with Proton from a custom location
$ truckermsp-cli --gamedir "/path/to/gamedir" ustart atsmp
Start TruckersMP (ETS2) using Wine
$ truckersmp-cli --wine start ets2mp
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)\Steamin the same Wine prefix or - You're specifying the path to the Window version of Steam with
--wine-steam-dir
Using a different prefix location
$ truckersmp-cli --proton --prefixdir "/path/to/prefix" start ets2mp
$ truckersmp-cli --wine --prefixdir "/path/to/prefix/pfx" start ets2mp
- While the prefix for Wine will point directly to the prefix location, Proton uses a subfolder
pfxfor the actual prefix and points to the parent folder. - Your prefix must be 64bits, the mod is not 32bits-compatible.
Rendering backends
OpenGL (default)
- Stable and faster than wined3d. But slower than DXVK.
- Useful if you're not using Vulkan-capable GPU.
Direct3D 11 (DXVK or wined3d)
- 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.
- 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
-dor--enable-d3d11is specified.
Default directories
Game data
| Game | Path |
|---|---|
| ATS | $XDG_DATA_HOME/truckersmp-cli/American Truck Simulator/ |
| ETS2 | $XDG_DATA_HOME/truckersmp-cli/Euro Truck Simulator 2/ |
Wineprefix
| 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/ |
Profile / Savegame
| Game | Proton | Wine |
|---|---|---|
| ATS | $XDG_DATA_HOME/truckersmp-cli/American Truck Simulator/prefix/pfx/drive_c/users/steamuser/My Documents/American Truck Simulator/profiles/ |
$XDG_DATA_HOME/truckersmp-cli/American Truck Simulator/prefix/pfx/drive_c/users/(os_login_name)/My Documents/American Truck Simulator/profiles/ |
| ETS2 | $XDG_DATA_HOME/truckersmp-cli/Euro Truck Simulator 2/prefix/pfx/drive_c/users/steamuser/My Documents/Euro Truck Simulator 2/profiles/ |
$XDG_DATA_HOME/truckersmp-cli/Euro Truck Simulator 2/prefix/pfx/drive_c/users/(os_login_name)/My Documents/Euro Truck Simulator 2/profiles/ |
Game logs
| 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/ |
Singleplayer mods and ProMods
| 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/ |
Season (weather) mods for ETS2MP/ATSMP
| 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.
Additional information
- If Steam is running while SteamCMD is being used the Steam client looses all connections and maybe 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.
Credits
- 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file truckersmp-cli-0.6.2.tar.gz.
File metadata
- Download URL: truckersmp-cli-0.6.2.tar.gz
- Upload date:
- Size: 44.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7514546d23a847069b9d1330ab1b6368f49decbedb9d15ae25486a1337057113
|
|
| MD5 |
1af6cc543782429d62eba0920130a8ab
|
|
| BLAKE2b-256 |
ed7fcfd1f08e40cde66402b286ef68ea0b3f5baaeb3983f3a19abb6890fc56c6
|
File details
Details for the file truckersmp_cli-0.6.2-py3-none-any.whl.
File metadata
- Download URL: truckersmp_cli-0.6.2-py3-none-any.whl
- Upload date:
- Size: 41.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94e541a016483eca439dba64099d52bf76745e1828361d3ba21b6a555c10566e
|
|
| MD5 |
b0de3db183a972065ee109903e0d25fa
|
|
| BLAKE2b-256 |
d6171e2f75551555520a7d191adc631681498fde03ad570c043c60e914db5539
|