Package: truckersmp-cli
truckersmp-cliA simple launcher forTruckersMPto play ATS or ETS2 in multiplayer.truckersmp-cliallows to download TruckersMP and handles starting TruckersMP throughWinewhile supporting the Windows versions ofAmerican Truck SimulatorandEuro Truck Simulator 2.TheWindows version of Steamshould already be able to run in the same Wine prefix.
The Windows versions of ATS and ETS2 can be installed and updated viaSteamCMDwhile 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 throughProton. A workingnative Steaminstallation is needed for this which has the desired gameinstalled or with an update pending. SteamCMD can use your saved credentials for convenience.Known issuesWhen Proton is used, DLCs don't work without installing the native version of the game. A pending download is also sufficient. For the details, seeissue #253.If D3D11 rendering backend is used, TruckersMP login screen is not shown without Windows native 64-bitd3dcompiler_47.dlltruckersmp-cliwill automatically download and set up the Windows native dll when D3D11 is usedIf 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 sostarting an update with a shortcut out of the Steam client won't workbecause Steam waits for the script to finish and the script waits for Steam to quit.If there are game MOD files with German umlautsüandßin filename, game crashes on German locale. For the details, seeissue #248.InstallFrom repository (recommended)System repository (recommended)If available install from yourrepository. Updates will ship through your normal system update process.Python Package IndexOperationSystem-widePer-user (recommended)Installationpython3 -m pip install truckersmp-clipython3 -m pip install --user truckersmp-cliOptional dependenciespython3 -m pip install truckersmp-cli[optional]python3 -m pip install --user truckersmp-cli[optional]Updatepython3 -m pip install truckersmp-cli --upgradepython3 -m pip install --user truckersmp-cli --upgradeAdditional informationThis 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 downloadYou can get the latest pre-built release fromthe release pageand decompress it into the desired folder. This version is capable to update itself by running--self-updateso make sure it's placed in a folder where your user has write permissions.Runtime dependenciesRequiredpythonin version 3.6 (released in December 2016) or latersdl2in x86_64steameither thenative Linux versionin use with Proton or theWindows Steamin use with WineOptionalpkg_resources(part ofsetuptools) to get the version information from the Python packagevdfto automatically detect the steam account with saved credentialswineas a possible replacement to ProtonSyntax$ truckersmp-cli (options...) [action] [game name]ActionsNameDescriptionstartStart gameupdateUpdate/install latest gamedowngradeDowngrade game (install game fromtemporary_X_Ybranch)updateandstart(orustart)update+start(Default)downgradeandstart(ordstart)downgrade+startkillKill running processes in the same Wine prefixGame namesNameGameets2mpETS2 multiplayer (Default)ets2ETS2 singleplayeratsmpATS multiplayeratsATS singleplayerOptionsShort optionLong optionDescription-h--helpShow help-b VERSION--beta VERSIONSet game version to VERSION, useful for downgrading (e.g.temporary_1_35)-c FILE--configfile FILEUse alternative configuration fileDefault:$XDG_CONFIG_HOME/truckersmp-cli/truckersmp-cli.conf-f--flatpak-steamUse Flatpak version of Steam with ProtonNote: Currently Steam Runtime is not supported and will be disabled-g DIR--gamedir DIRChoose a different directory for the game filesDefault:$XDG_DATA_HOME/truckersmp-cli/(Game name)/data-i APPID--proton-appid APPIDChoose a different AppID or version name ("X.Y" format) of Proton (Needs an update for changes)-l LOG--logfile LOGWrite log into LOG,-vvoption is recommendedDefault: Empty string (only stderr)Note: Messages from Steam/SteamCMD won't be written, only from this scriptSee#game-logsfor game log locations.-m DIR--moddir DIRChoose a different directory for the mod filesDefault:$XDG_DATA_HOME/truckersmp-cli/TruckersMP-n NAME--account NAMESteam account name to use-o DIR--protondir DIRChoose a different Proton directoryDefault:$XDG_DATA_HOME/truckersmp-cli/Proton-p--protonStart the game with ProtonDefault on Linux if neither Proton or Wine are specified-r {auto,dx11,gl}--rendering-backend {auto,dx11,gl}Choose a rendering backendDefault:autoOpenGL is used whenrendering-backendis not specified for the game in the configuration file-v--verboseVerbose outputnone: error, once: info, twice or more: debug-w--wineStart the game with WineDefault on systems other than linux if neither Proton or Wine are specified-x DIR--prefixdir DIRChoose a different directory for the prefixDefault:$XDG_DATA_HOME/truckersmp-cli/(Game name)/prefix(Not available)--check-windows-steamCheck for the Windows Steam version on updating when using Proton(Not available)--disable-proton-overlayDisable Steam Overlay when using Proton(Not available)--disable-steamruntimeDon't use Steam Runtime even when using Proton 5.13 or newer(Not available)--download-throttle SPEEDLimit download speed to SPEED (KiB/s), disabled if negative value is specifiedDefault:-1(Not available)--game-options OPTIONSSpecify ATS/ETS2 optionsDefault:-nointro -64bitNote: If specifying only one option, use--game-options=-optionformat(Not available)--native-steam-dirChoose native Steam installation, useful only if your Steam directory is not detected automaticallyDefault:auto(Not available)--self-updateUpdate files to the latest release and quit(Not available)--skip-update-protonSkip updating already-installed Proton when updating game with Proton enabled(Not available)--steamruntimedirChoose a different Steam Runtime directory for Proton 5.13 or newer(Not available)--use-wined3dUse OpenGL-based D3D11 instead of DXVK when using Proton(Not available)--wine-desktop SIZEUse Wine desktop, work around resolution issue, 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-dirChoose a directory for Windows version of SteamDefault:C:\Program Files (x86)\Steamin the prefix(Not available)--without-wine-discord-ipc-bridgeDon't use wine-discord-ipc-bridge for Discord Rich Presence(Not available)--versionPrint version information and quitBuildClone or download this repositoryRunmakein the main folder to build the injector executable. Bash/zsh completion files will also be generated.Optional runsetup.pyto manually start the installation process.Buildtime dependenciesRequiredgcc-mingw-w64to build the injector executablemakeOptionalgitto clone this repo and help developingsetuptoolsto runsetup.pybash/zsh completionmakegenerates shell completion files for bash (bash-completion) and zsh. They enable tab-completion of available positional arguments and command-line options.System-wide installationShellSystem-wide search pathsbash$(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 filetruckersmp-cli.bashneeds to be renamed totruckersmp-cliDebian-based systems are using the/usr/share/zsh/vendor-completions/directory for zsh completionsPer-user installationbashCopytruckersmp-cli.bashto$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"zshCopy_truckersmp-clito a directory that is part of$fpathand runcompinit.Usage examplesBasicEverything defaultTo just try out TruckersMP (ETS2) on Linux with nothing already downloaded you can simply runtruckersmp-cliwhich 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 ets2mpStart American Truck Simulator with TruckersMP$ truckersmp-cli start atsmpHow to downgrade gamesWhen the latest game version is not compatible with TruckersMP yet, the user can downgrade the games withtruckersmp-cli downgrade [game name]which installs the latest version that is supported by TruckersMP by determining the Steam game branch name by usingTruckersMP Web API.$ truckersmp-cli downgrade ets2mp--betaoption can be used to specify the branch name directly.$ truckersmp-cli --beta temporary_1_39 downgrade ets2mpIf both options are given, the branch name from--betaoption is used.AdvancedInstall, update and start TruckersMP (ATS) with Proton from a custom location$ truckermsp-cli --gamedir "/path/to/gamedir" ustart atsmpStart TruckersMP (ETS2) using Wine$ truckersmp-cli --wine start ets2mpMake sure thatThe Windows version of Steam is already running in the same Wine prefixorThe Windows version of Steam is installed inC:\Program Files (x86)\Steamin the same Wine prefixorYou're specifying the path to the Window version of Steam with--wine-steam-dirUsing a different prefix location$ truckersmp-cli --proton --prefixdir "/path/to/prefix" start ets2mp
$ truckersmp-cli --wine --prefixdir "/path/to/prefix/pfx" start ets2mpWhile the prefix for Wine will point directly to the prefix location, Proton uses a subfolderpfxfor the actual prefix and points to the parent folder.Your prefix must be 64bits, the mod is not 32bits-compatible.Rendering backendsOpenGL (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.Used only when-r dx11or--rendering-backend dx11is given.Configuration fileIt's possible to set various game settings and third party programs in a configuration file.The configuration file format is similar to the INI format known from Windows with several sections[section]containing key-value-pairskey = value.
All sections are optional and a key-value-pair has to be in a section.
Boolean values can be{yes,no},{true,false},{on,off}and{1,0}.Default configuration file pathThe default search path for the file is$XDG_CONFIG_HOME/truckersmp-cli/truckersmp-cli.conf.Sections for game modesSupported sections are[ats],[atsmp],[ets2]and[ets2mp].
Settings in[DEFAULT]will be applied to all game modes if the game mode specific sections exist.Optional game mode settingsKey-Value-PairDescriptionwithout-rich-presence = [boolean]Disable Discord Rich Presence for the game mode - overriding what is set in third party sections.Default:nogame-directory = [path]Choose a different directory for the game filesDefault:$XDG_DATA_HOME/truckersmp-cli/(Game name)/dataprefix-directory = [path]Choose a different directory for the prefixDefault:$XDG_DATA_HOME/truckersmp-cli/(Game name)/prefixgame-options = [options]Specify ATS/ETS2 optionsDefault:-nointro -64bitrendering-backend = {auto,dx11,gl}Choose a rendering backendDefault:auto(OpenGL is used when this is not specified for the game in the configuration file)proton-directory = [path]Choose a different Proton directoryDefault:$XDG_DATA_HOME/truckersmp-cli/Protonsteamruntime-directory = [path]Choose a different Steam Runtime directory for Proton 5.13 or newerdisable-steamruntime = [boolean]Don't use Steam Runtime even when using Proton 5.13 or newerDefault:nodisable-proton-overlay = [boolean]Disable Steam Overlay when using ProtonDefault:nolog-file = [path]Write log into the specified file,-vvoption is recommendedDefault: Empty string (only stderr)Note: Messages from Steam/SteamCMD won't be written, only from this script (Game logs are written intoMy Documents/{ETS2,ATS}MP/logs/client_*.log)truckersmp-directory = [path]Choose a different directory for the mod filesDefault:$XDG_DATA_HOME/truckersmp-cli/TruckersMPSections for third party programsThird party programs in the configuration file will get started together with the game.
Sections should follow the format[thirdparty.gamemode.programname](one game mode) or[thirdparty.programname](all game modes).Required third party settingsKey-Value-PairDescriptionexecutable = /path/to/my.exePath to the executable where the path is either an absolute unix path (/path/to/my.exe), a relative unix path (program/my.exe) to$XDG_DATA_HOME/truckersmp-cli/or an absolute windows path (C:\Program Files (x86)\program\my.exe) within the prefix.Optional third party settingsKey-Value-PairDescriptionwait = [seconds]Set a minimal waiting time before the game will be started so third party programs have enough time to fully start up and log in.wants-rich-presence = [boolean]Set that a program supports Discord Rich Presence.Example configuration file# Common settings# Game mode specific sections are needed too to apply these settings[DEFAULT]# D3D11 will be enabled in all gamesrendering-backend=dx11# Use unofficial version of Proton in all gamesproton-directory=/path/to/proton-tkg-6.8# Disable Steam Runtime as a workarounddisable-steamruntime=true# Forbid Discord Rich Presence in multiplayer of ETS2[ets2mp]without-rich-presence=true# Even if there are no game specific settings for ATSMP,# the empty section is needed if the user wants to apply the settings# in the "[DEFAULT]" section[atsmp]# Game mode specific settings for ETS2 singleplayer[ets2]# Use custom game options only when starting singleplayer of ATS[ats]game-options=-mm_pool_size 600 -nointro -64bit# Start Trucky together with all game modes (ats, atsmp, ets2, ets2mp)# and wait at least 45 seconds before starting the game[thirdparty.trucky]executable=/home/user/Downloads/trucky/trucky.exewait=45# Start TrucksBook together with ets2mp while waiting at least 30 seconds# before starting the game[thirdparty.ets2mp.trucksbook]executable=C:\Program Files (x86)\TrucksBook Client\TB Client.exewait=30# Start a program from "$XDG_DATA_HOME/truckersmp-cli/my program/" and# set that Discord Rich Presence is supported for this program[thirdparty.ets2.program]executable=my program/executable.exewants-rich-presence=trueDefault files/directoriestruckersmp-cli configuration file$XDG_CONFIG_HOME/truckersmp-cli/truckersmp-cli.confGame dataGamePathATS$XDG_DATA_HOME/truckersmp-cli/American Truck Simulator/ETS2$XDG_DATA_HOME/truckersmp-cli/Euro Truck Simulator 2/WineprefixGamePathATS$XDG_DATA_HOME/truckersmp-cli/American Truck Simulator/prefix/pfx/ETS2$XDG_DATA_HOME/truckersmp-cli/Euro Truck Simulator 2/prefix/pfx/Profile / SavegameGameProtonWineATS$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 logsGameProtonWineATS$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.txtATSMP$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.txtETS2MP$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 ProModsGameProtonWineATS$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/ATSMPGameProtonWineATS$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/SeeTruckersMP Knowledge Base.CreditsI was greatly inspired by mewrev'sInjecttool
and TheUnknownNO's unofficialTruckersMP-Launcher.Amit Malik'sarticleon dll injection was also a great help.kakurasanandLuckifor the helper script.