Half-Life: Alyx

Half-Life: Alyx

Not enough ratings
Running Half-Life: Alyx Workshop Tools on Linux
By JJl77
This guide will explain how to run Half-Life: Alyx tools on Linux
   
Award
Favorite
Favorited
Unfavorite
Introduction & Disclaimers
Half-Life: Alyx now has a native Linux port, but this does NOT include the workshop tools, so you'll need to run the workshop tools through Wine.

Unfortunately the tools don't run with proton, and the addon configurator doesn't run at all, even with Wine, so we need to do some things manually. In addition, the tools are quite unstable, leading to MANY crashes, which makes them difficult to use to say the least.
Prerequisites
Before starting this guide, you should have the following:
1. A working brain & some experience with Linux
2. Wine installed (I'm running version 5.7)
3. A bit of internet bandwidth (We might need to reinstall some stuff)
Installing the Tools
The tools will only launch with wine, as said in the introduction, so you will need the windows binaries.

Steam doesn't like to maintain multiple platforms for a game at the same time, unfortunately, so if you opt to install the workshop tools, your linux binaries will be removed. If you don't care about your Linux binaries, feel free to skip to the next section.

I've written a couple of convenient scripts that will help you save and restore binaries before and after game updates.

The following script can be used to save your Linux binaries to the Half-Life: Alyx root directory. Save it as save-binaries.sh in your HLA game directory (steamapps/common/Half-Life Alyx/game/)
#!/bin/bash pushd `dirname $0` [ -z $1 ] && exit 1 echo "Creating versioned binaries for $1" # Go to the directory & create the binary archive tar -cvzf "$1.tgz" $(find bin/$1/) $(find hlvr/bin/$1/) # Move them to the game directory mv $1.tgz ../ popd

To run this, cd to Half-Life Alyx/game and run
./save-binaries linuxsteamrt64
You can substitute linuxsteamrt64 with any platform you want to save binaries for.
Now, you should have linuxsteamrt64.tgz in the root of your Half-Life: Alyx install.

At this point, we'll want to install the workshop tools from steam. To do this, head over to your steam library, right click on Half-Life: Alyx, click on properties -> run with compatibility tool -> Proton and save. Next, go to the DLC tab and tick the workshop tools box.

It should download about ~500mb of stuff.

Once it's installed, your previous linux binaries will be gone, so go ahead and cd to your HLA install directory again and run
tar -xf ../linuxsteamrt64.tgz ./

The only issue is that you won't be able to run the linux version of the game from steam, so you have to run hlvr.sh from the game directory of your HLA install.
Creating a Mod
Unfortunately the HLA mod configuration tool won't run on Wine, so you'll need to manually create your mod directory.

cd into your HLA install again (the root, so the directory about game/) and cd into content.

The content directory will contain all of your mod folders, so let's go ahead and create one now. For this example I'll be creating a mod called testmod.
cd content mkdir hlvr_addons && cd hlvr_addons mkdir -p testmod/maps mkdir -p testmod/materials mkdir -p testmod/materials mkdir -p testmod/panorama mkdir -p testmod/particles mkdir -p testmod/soundevents

That's all you need to do for this part!
Launching the Tools
Launching the tools is pretty straightforward luckily.

In the game directory of your HLA install, (Half-Life Alyx/game/) create a script called launch-tools.sh or something.
Put the following code in that script

#!/bin/bash pushd bin/win64 ARGS="-dev -console -vconport 29000 -nosteam +sv_cheats -720 -publiccontent content -addon testmod -tools" wine hlvr.exe $ARGS popd

This script just launches HLVR with Wine. Here's a description of the options:
Option
Function
-dev
Puts the game in developer mode, which enables some developer commands and script functions
-console
Enables the old VGUI2 console seen in HL2
-vconport 29000
Sets the vconsole port to 29000. You can launch vconsole.exe to have access to the console
-nosteam
Launches without steam
+sv_cheats
Enables sv_cheats
-publiccontent content
Sets the content directory to content
-addon testmod
Sets the addon to testmod
-720
Puts the game in 720p mode. You can omit this and replace it with -windowed -w <width> -h <height>
-tools
Launches the game in tools mode

That's all for launching the tools! Be aware of how buggy they are though; they will crash often.
Postmortem
Please let me know if there are any mistakes or other errors in this guide, it really helps! Improvements are also welcome!

As of right now, we still need to figure out these things:
  • Uploading mods to the steam workshop
  • Launching the mod configurator
  • Fix the tool crashing
  • Running the tools with proton
Known Issues
Some issues with the tools on linux:

  • Tilesets do not render
  • Randomly crashes from time to time
  • Performance is like 50-75% of what it is on Windows
10 Comments
lightwo Jun 12, 2023 @ 2:52am 
Rather than managing both Linux and Windows binaries in the same game directory, it is better to use steamcmd in a custom path using force_install_dir, and @sSteamCmdForcePlatformType set to "windows".
Lunar_Penguin Jul 19, 2022 @ 9:10pm 
I just did a bit of testing, and Hammer and the other workshop tools actually seem to run well out of the box in the current version of Proton Experimental, with the 3D viewport behaving as it should. However, you still need to have the Windows version of HL:A installed to download the tools and to use Proton, so a script to save the Linux binaries is useful to have.

I still wish they'd release Linux-native versions of the tools someday, though. :-/
JJl77  [author] Jul 19, 2022 @ 6:53pm 
Yeah I've noticed that it sorta broke in wine at some point. Considering these tools are written with Qt, it shouldn't be excessively difficult to get them ported to Linux.

I'll have to play around with this again at some point. Maybe dxvk or a specific version of proton/wine would help
Lunar_Penguin Jul 19, 2022 @ 1:35pm 
Thank you for the guide!

I do very much wish Valve would make these tools Linux-native at some point, though.

Hammer technically works in Wine (I tested in Wine Staging 7.12), but the 3D viewport's lighting seems to be messed up, and parts of meshes that are behind others render as if they were in front, so it's a real pain to actually use.
Mcafee Gaming May 20, 2022 @ 4:33am 
Nice!
875 Mar 4, 2021 @ 6:25pm 
How to package mods and upload?
HurricanePootis Nov 3, 2020 @ 7:25am 
Swag
JJl77  [author] May 28, 2020 @ 8:30am 
Oh sorry about that! I forgot to add the -tools launch option in there. It's been fixed now :)
Theg May 28, 2020 @ 5:04am 
update: -tools launch option is needed. sadly no 3D viewports render in the tools themselves like with my other attempts to run source 2's tools.
Theg May 28, 2020 @ 4:59am 
all this does for me is open the game onto a valve logo. is this related to me downloading the depots for windows binaries and the tools instead of through steam normally or am I missing something else?