Jorgen Cani

posts - works - about- git


Modding Skyrim on Linux

Here starts my long, long journey of trying to make modding work!

Step One

Download this godsent wrapper named steamtinkerlaunch.

Follow the install instructions. However, here are some bullets/quick notes

  • Install on the system or on the user only. If you need user only installation you have to fiddle a little with the path. If not, just run sudo make install in the package you downloaded from the link
  • It is quite important after the installation to run steamtinkerlaunch compat add to add the application as a compatibility layer for Steam. This will come in handly later.

Step Two

(More like step 0) Download the game you are willing to mod. I have only tried this on Skyrim.

Now, you could start fiddling with the application a little bit. You will notice that it displays some Steam game data of a game that does not really exist. That's because the first time you run steamtinkerlaunch it starts with a "sample" configuration to show you what the application is capable of.

That windows and all of its options are going to be the same for every game, the only difference is going to be the Steam ID.

To "pass" a game through steamtinkerlaunch you have to set the compatibility layer from the game's Steam Options to Steam Tinker Launch. When you start the game, you are going to be greeted with all the options you had from the cold launch. Now you can set environment variable, scripts and any other configuration the tool lets us change.

I assume that before this you were either playing the game you wanted to mod with some Proton-GE version, or a Proton-X version from Steam, or a Proton Experimental. Since now you "lost" that option, you can set your actual running compatibility layer from the application's options.

To put it simply:

  • Go to the properties of the game you are trying to mod on Steam
  • Click Compatibility
  • Check Force the use ... (if you do not have it already)
  • Find Steam Tinker Launch and this step is done.

Step Three

You will need a mod launcher. I am using Vortex, you could use Mod Organizer 2, but I do not know anything about it and you are going to be on your own.

To install Vortex you need to open Steam Tinker Launch. You have two options:

  • Open the Desktop Entry or
  • run steamtinkerlaunch settings they both do the same thing! (you can check the Desktop Entry at /usr/share/applications, there is an Exec entry which is the command the Desktop entry runs)

From the main menu of the wrapper you will find a button that says vortex. You will have to download it for the Proton version you want to use. It is important to stick with that one and just wait for the installation to finish. It's going to take some time, so sit back and relax for a bit. Do not worry if it takes several minutes.

Now, you can setup Vortex as you would in a Windows environment. If you haven't done this before, here are some steps you could follow to familiarize yourself with the application:

  • Create a profile on their website
  • Find the game you want to mod and sort the results from Endorsements and sort the timeframe to All Time
    • You are going to find the most popular mods people install/endorse for this game. You will most likely install several of these.
  • Log in with your new account from Vortex to Nexusmods. It will open a verification page and then prompt you to open Vortex through XDG. Click that and you're logged in.
  • Open a link of a mod. You will find various tabs, the one that interests us now is the Downloads one. Click it and find the "Vortex Installation" one. Now Vortex is going to start downloading that.

Some tutorials say that you should not/you cannot login to the application. I did not have that problem. If you cannot login however, what you can do is manually download the mods and drag and drop them to the mods tab of Vortex. It will just copy the files to the folder it manages.

Step Four

Remember that we set the game we want to mod to run from the Steam Tinker Launch compatibility layer? When we click Play the app will roughly follow these steps:

  • Open "main menu" of the wrapper or skip it entirely
  • Open "Vortex"
  • When "Vortex" is terminated/closed, the app will either run the default executable or a specific one based on the Game's configuration

In this step, I will tell you where the configurations are stored, how you can modify them by hand and what each change does. You can do this using the menu, however I find the UI confusing for what it is trying to do.

Go to ~/.config/steamtinkerlaunch

# tree -CdL 3
.
...
├── gamecfgs
│   ├── customvars
│   ├── id
│   └── title
...

Here we have many directories, cached files, configuration files, whole bunch of stuff. We only care about the gamecfgs directory.

# tree
.
├── customvars
│   ├── 31337.conf
│   ├── 489830.conf
│   └── global-custom-vars.conf
├── id
│   ├── 413150.conf
│   └── 489830.conf
└── title
    └── Skyrim Special Edition.conf -> /home/jorgen/.config/steamtinkerlaunch/gamecfgs/id/489830.conf

You can kind of guess what is happening here. We could start messing around with customvars or id, but the named files are a lot more human-readable (and they are linked to the actual files of the game's steam id)

Now, you can open the file with your favourite editor. Find the line that has the following

## Start the game with this Proton version
USEPROTON="GE-Proton7-54"

Here you can set the Proton version of your choosing. Again, you can do this from the UI for convenience.

Next, we have the custom command I talked about earlier:

## Start this custom command
CUSTOMCMD="/home/<here_lies_your_user_name>/.local/share/Steam/steamapps/common/Skyrim Special Edition/skse64_loader.exe"

Pay attention to the skse64_loader.exe. This is a very imporant line. This is the executable that actually loads the mods with the game. Remember what I said eariler? This is not the default command (which would be .../SkyrimSELauncher.exe).

Extra Step

Here are some configurations I find very useful

## Enable MangoHud for this game
MANGOHUD="1"

## and

## Enable FidelityFX Super Resolution (FSR) - a compatible Proton version needs to be selected separately
WINE_FULLSCREEN_FSR="1"
## FSR sharpening strength
WINE_FULLSCREEN_FSR_STRENGTH="4" # 1-5

The first one is for benchmarking. The second is one of the best things Linux AMD Drivers offer us: FSR. This amazing functionality runs on top of Vulkan and provides new resolutions to the game, which are some percentage lower from the Native Resolution and by using some sharpening techniques the final looks only a bit worse than the Native Resolution, however we gain a lot of performance in return (especially on lower end systems). Check those two out, and maybe start looking at other options too. Tinker with it!

Step Five

Now we have guaranteed that the Pipeline will work: Run -> Vortex -> Game opens. We have guaranteed that the game will run using the special executable and load all of your mods.

I suggest clicking Play on the game you want to mod (from Steam), waiting for Vortex to open and then start downloading mods. You can either click on the Vortex automatic downlaod or manually download the mods and drag them to Vortex.

SkyUI Bug

This is a very important mod for me and for many Skyrim mod users. If you followed my steps correctly, when you open the game with the mods downloaded and deployed you will see all of them loaded and working, except for SkyUI.

I researched this weird behavior and landed on this comment on a Proton GitHub issue. Something about a Plugins.txt file is for some reason broken. I assume that this is a file Vortex manages and it does not tell the mod to load when running the game. This is why we need to add the *SkyUI_SE.esp line to Plugins.txt. I am afraid that there could be a chance that this has to be done every time the deployment of mods changes. I am not sure of this and I really hope that this is not the case.

Step Seven

Have fun!