Skip to content

Instantly share code, notes, and snippets.

@mcu8
Last active June 2, 2024 21:38
Show Gist options
  • Save mcu8/dc62137ceaa4ccf1c37772caec028866 to your computer and use it in GitHub Desktop.
Save mcu8/dc62137ceaa4ccf1c37772caec028866 to your computer and use it in GitHub Desktop.
Running A Hat in Time Editor on Linux

Running A Hat in Time Modding Tools on Linux

Tested on Proton-GE 25 and Manjaro Linux

(WIP, may include more details for beginners later)

You need to install protontricks first! (I used yay -s protontricks since I'm using ArchLinux-based distro)

Then, you need to find your Steam library folder, where the compatdata is stored (use google if you don't know how)

Usually it is in $HOME/.steam/root - you can assing it into the $steamdir variable in your terminal: steamdir="$HOME/.steam/root"

1. Clean old compat data first... MAKE SURE TWICE THAT THIS IS THE VALID PATH!

rm -rf "$steamdir/steamapps/compatdata/734880/"

then, launch the editor from Steam, wait 5s and force stop it!

2. Try to install .NET 4.0 (it will fail but it's necessary to run, don't think much about it!)

Run this command and proceed through the installation:

protontricks 734880 dotnet40

3. Uninstall some garbage dlls (thanks for this tutorial: https://steamcommunity.com/sharedfiles/filedetails/?id=2386287653):

Run these commands:

rm -r "$steamdir/steamapps/compatdata/734880/pfx/drive_c/windows/Microsoft.NET"
rm "$steamdir/steamapps/compatdata/734880/pfx/drive_c/windows/system32/mscoree.dll"
rm "$steamdir/steamapps/compatdata/734880/pfx/drive_c/windows/syswow64/mscoree.dll"
rm "$steamdir/steamapps/compatdata/734880/pfx/drive_c/windows/system32/openal32.dll"
rm "$steamdir/steamapps/compatdata/734880/pfx/drive_c/windows/syswow64/openal32.dll"
rm "$steamdir/steamapps/compatdata/734880/pfx/drive_c/windows/system32/dxva2.dll"
rm "$steamdir/steamapps/compatdata/734880/pfx/drive_c/windows/syswow64/dxva2.dll"
rm "$steamdir/steamapps/compatdata/734880/pfx/drive_c/windows/system32/evr.dll"
rm "$steamdir/steamapps/compatdata/734880/pfx/drive_c/windows/syswow64/evr.dll"
rm "$steamdir/steamapps/compatdata/734880/pfx/drive_c/windows/system32/uiautomationcore.dll"
rm "$steamdir/steamapps/compatdata/734880/pfx/drive_c/windows/syswow64/uiautomationcore.dll"
mkdir -p "$steamdir/steamapps/compatdata/734880/pfx/drive_c/windows/assembly"

4. Try to install .NET again (now it should succeed!) and other dependencies

Run this command:

protontricks 734880 win10 dotnet48 d3dcompiler_42 d3dcompiler_43 d3dcompiler_46 d3dcompiler_47 msxml3 msxml6 vcrun2015 d3dx9_43 gdiplus d3dx9

5. Disable theming, since it's broken in Hat editor

Run command

protontricks 734880 winecfg

Go to "Desktop integration" tab and change "Theme" to "(No theme)". Click OK.

6. In Steam, paste this into launch options to disable DXVK, since Hat editor doesn't like it!

PROTON_NO_D3D11=1 PROTON_USE_WINED3D11=1 %command%

and launch editor from Steam! (it may take a few seconds at first time, since Steam will still try to install redistributables)

BTW, if you want to use OpenModMnager, create a folder named OMM in steamapps/common/HatinTime/Binaries, put unzipped OMM files into it and put this into launch options:

PROTON_NO_D3D11=1 PROTON_USE_WINED3D11=1 $(echo %command% | sed -r "s/proton waitforexitandrun .*/proton waitforexitandrun/") "$STEAM_COMPAT_INSTALL_PATH/Binaries/OMM/ModdingTools.exe"

Known issues:

  • Editor is very unstable on Wayland, use it on X11 as it is much more stable there
  • Drag'n'drop from content browser crashes the editor on my system (idk I made that work before... still looking for fix!)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment