This article's documentation is for anything that uses the Source engine. Click here for more information.

Hammer++ for Linux

From Valve Developer Community
Jump to navigation Jump to search

English (en)Translate (Translate)
← Hammer++

Hammer, and by extension Hammer++, are native Windows applications, therefore compatibility tools like Wine or Proton are required for them to run on Linux. This guide will explain how to setup an environment for them to run on your Linux system.

Linux Hammer Launcher

Hammer++ and Linux Hammer Launcher running on CachyOS
Hammer++ and Linux Hammer Launcher running on CachyOS

Linux Hammer Launcher is a program made by EnderCatCore and Tamasina to provide Linux compatibility for Hammer++ with a select list of Source 1 games. It automatically configures and updates Hammer++, Wine and Tools++ to work together on your system.

Requirements

To install Linux Hammer Launcher, you will need to install these on your computer system wide before continuing:

  • Wine (Linux Hammer Launcher will use your system installation of Wine, for the purposes of this guide wine-cachyos will be used)
  • Winetricks
  • ZSTD
  • Python 3

Installation

  1. Download the latest release of Linux Hammer Launcher from the project's Github page.
  2. Extract the latest zip and run chmod +x to give the binary file executable permissions.
  3. Run Linux Hammer Launcher.
  4. Press the Setup Hammer button in the Utilities section.
  5. Choose a game directory to install Hammer++ to (eg. /home/user/.steam/steam/steamapps/common/Team Fortress 2). Linux Hammer Launcher will automatically detect which game you want to install it to and configure Hammer accordingly.
  6. Once you've booted into Hammer++, make sure all the build tools are selected correctly (all directories must be absolute, this means that they should start from your drive's root directory, not your home directory!), and select the 32-bit version of studiomdl to setup proper Propper++ support. It should be located in bin/studiomdl.exe.
  7. (Optional) Move all the Linux Hammer Launcher files to a directory like ~/.lhl/ and setup a desktop entry for easier access.
Warning.pngWarning: If you're installing Hammer++ for a game not listed as supported by the Linux Hammer Launcher Github page, make sure to disable the Use Vanilla Hamer in Setup option before installation. You will need to configure the game configuration and build tools yourself.
Note.pngNote: Some games may not support the installation of Tools++. Make sure to check the Github page for supported games.
Note.pngNote: If a game that supports launching on compile doesn't launch, it may be due to your Steam client being installed using Flatpak or that Linux Hammer Launcher couldn't find Steam.

Configuration

After installing Hammer++, you may notice that the interface does not adapt to the system theme. To fix this, run the command WINEPREFIX="/home/$USER/.config/linuxhammerlauncher/prefix/" winecfg. From here, go into the Desktop Integration tab and configure all the settings to your liking. If you want a preset to use for dark mode, wine-breeze is a good option.

Known Issues

  • The camera snaps to a different position every time it's used.
  • A few icons may appear completely transparent.

Legacy Methods of Installation

Hammer for CS:GO

Hammer++ running on Manjaro

Requirements

  • The winetricks package installed on your computer

Installation

  1. Install CS:GO for Linux as normal.
  2. Proceed to install the CS:GO SDK with the latest Proton, preferably ProtonGE enabled under compatibility settings.
  3. In the launch options, for NVIDIA graphics card users, paste in the following: PROTON_ENABLE_NVAPI=1 PROTON_USE_WINED3D=1 %command%
  4. In the launch options, for AMD graphics card users, you should be good with just: PROTON_USE_WINED3D=1 %command%.
  5. From this point, you should be able to launch the SDK and launch Hammer without error.
  6. Install Hammer++ as normal.
  7. Replace hammer.exe with hammerplusplus.exe.

Troubleshooting

Steam may not have downloaded some of the Windows files necessary for Hammer.

  1. Open Steam with a console: steam -console or steam://open/console
  2. In the Steam console, run download_depot 4465480 732 and download_depot 4465480 731
  3. The game files get downloaded to $HOME/.local/share/Steam/ubuntu12_32/steamapps/content/app_<AppID>/depot_<DepotID>/
  4. Copy the content of these two folders into the install folder of the CS:GO SDK

Known issues

Note.pngNote: Not all problems appear on all versions of Wine/Proton, your mileage may vary.
  • Using expert compile options will not successfully run and compile a map. You will need to append .vmf to the end of each instance of $file in the command parameters.
  • Opening the Options menu under Tools > Options will cause an access violation. A fix is not known at the moment. Most settings are available under bin/hammerplusplus/hammerplusplus_settings.ini
  • Closing the Keybind editor or the Model or Particle browser will cause a crash. Running Hammer++ in Wayland mode instead of X11 will prevent this, however it introduces other problems.
  • The 2D and the 3D Viewports to appear too dark.
  • The 2D Viewports are sluggish.
  • Under NVIDIA and Proton 10 (not GE) UI elements like buttons randomly disappear and only re-appear when hovered over.

Hammer for CS:S through Wine + Winetricks

Installation

  1. Install CS:S on Steam.
  2. Enable any Steam Play compatibility tool of your choosing.
  3. Update the game to download the Windows version of CS:S.
  4. Copy the entire game directory to a new location.
  5. Uncheck Force the use of a specific Steam Play compatibility tool to reinstall the Linux version of CS:S.
  6. Download Hammer++ and extract it.
  7. Copy the contents of the Hammer++ 'bin' directory into the Windows CS:S 'bin' directory.
  8. Run winetricks --gui.
  9. Create a new Wine prefix.
  10. Install dxvk to the Wine prefix.
  11. Enable the following Wine prefix settings Prevent the window manager from decorating windows and Prevent the window manager from controlling windows.
  12. Run hammerplusplus.exe using the new Wine prefix..
Note.pngNote: Maps will compile to the Windows version of CS:S by default, requiring being moved to play them.
Warning.pngWarning: It's required to have the 'Don't run the game after compiling' option on if installing through this process or else the game will run through Wine.

(Optional) Create a shortcut or alias to open HammerPlusPlus using the Wine prefix. Example:

#!/bin/sh
WINEPREFIX="$HOME/.local/share/wineprefixes/HammerPlusPlus" wine "/opt/css-sdk/Counter-Strike Source/bin/hammerplusplus.exe"