I’ve been a gamer for all my life, and I’ve been using Linux as my main OS since I started studying computer science and thought to myself “every self-respecting CS student should run Linux”. (I was young and deeply into CS nerd culture okay? It was a different time! 😉) For a long time, those two things, Linux and gaming, didn’t really go together, at least as long as you were a mainstream gamer. So on every machine I used, I always had a Windows partition that was nothing more than a game console. It had Steam, and not much else.

That era ended in September 2021 for me. It was a Sunday afternoon, and I felt like continuing my Stellaris game earlier than my typical gaming time past 10 pm. That would mean I would need to reboot from Linux to Windows, and also switch back to listen to some podcasts while preparing and eating dinner. And I thought: Nope, this rebooting has to stop. Let’s see what the “Gaming on Linux” story looks like these days. I had read a lot about Steam’s Proton, but never took the time to look at it.

An additional problem for me was that I was using Gentoo Linux, meaning everything is compiled locally, (almost) no binary packages. Which is fine for me, I like the system overall, and it provides me with an excuse to always buy the top end for the current CPU offerings. But from a previous experiment, I knew that installing native Steam worked - but would mean that I needed to run a multilib system, with 32 bit and 64 bit versions of a lot of libs.

I had read on the Gentoo forums that there was a viable alternative with much less pain in the form of Flatpak. I had never used that either, but it worked on first try, and suddenly I had a working Steam on my Linux system.

And then I installed Stellaris. And it just worked. I needed to do absolutely nothing weird, no additional command line parameters, absolutely nothing. Just hit install, and then hit play. And bam. Only slightly annoying thing was actually finding the right directories to copy my saves from Windows over.

I was honestly flabbergasted. Could it really be that easy? And it seems it can be. There were a couple of graphical glitches very sporadically, but moving the camera just a smidgen in any direction fixed them. Everything else worked.

I played Stellaris for months (as I’m wont to do with any damned game Paradox releases. 😔) without issues.

And next came Factorio. Exactly the same story. Hit install, hit play, enjoy.

Then I became nervous, because my next game after that was X4: Foundations. And I thought: Okay, that’s pretty demanding. How well would it really run? And the answer was, yet again: Without any issue whatsoever. That was pretty much the end of it: I was a Linux gamer now. 7 Months later (X is another one of those game series which will occupy me for a long long time) I ran Shadowrun: Hong Kong. I would not mind a new entry in that series of games. Also worked perfectly. Then came Battletech, also worked without any issue.

And then came another which I was dreading, Anno 1800. Relatively demanding and modern game. AAA title. Finally came out on Steam, so I could finally buy it. And here, for the first and up to now only time, I had to do some fiddling, as Anno did not launch right away. In the end, I only needed to change the launch command to PROTON_ENABLE_NVAPI=1 %command%. And then it also ran without any issues at all.

Next came Kindgom Come: Deliverance and Disco Elysium, both games I could not really get into, but which both worked absolutely fine under Linux as well.

My current game is Divinity 2: Original Sin. Like all the others above, again no issues. Also a great RPG. I’m now looking forward even more to the new Baldur’s Gate from the same studio.

Overall, this was a really great experience. I’m quite happy that I don’t need to maintain a separate Windows partition anymore, just for gaming.

A couple of things to note though: As you can see from the list above, I’m pretty far behind on my Steam list of shame. Most of these games are older titles. I don’t know what it would look like if I were to play more recent titles, e.g. Baldur’s Gate or Starfield from this year.

But I’ve found being behind on my gaming also has some good sides. I get to immediately play the “Complete” or “Definitive” editions with all the DLCs and without all the day 1 bugs. I don’t really like returning to games I’ve already played, with some Paradox titles as the exceptions to prove that rule.

Another potentially important note: I’m using an AMD GPU, an RX580 from 2017. And because AMD is not quite as arrogant as Nvidia, they maintain their Linux drivers right in the kernel, so they have always gotten my money in the past, and will always get my money in the future.

The trigger for this post

And finally, onto the trigger for this post, the Europa Barbarorum 2 mod for Medieval II: Total War. For some reason, I’m currently on an “Ancient Rome” trip, since I started listening to the excellent History of Rome podcast. I’ve also been reading the Cicero Trilogy and I’m currently reading the equally good Masters of Rome series.

That made me think back to my days at University. Money was a bit tight, so I was in the “a lot of time to game, very little money to buy games” situation. I mitigated that problem by really getting into game mods. One of them was the first Europa Barbarorum, for Rome: Total War. I played that game a lot, and I have fond memories of it. The modders introduced a lot of interesting things via scripting, and build a gigantic world map to conquer. It was amazing.

So it was only natural that I felt like I needed to command Rome’s Legions myself, instead of just hearing and reading about other people doing so.

My initial misgivings about whether Medieval II would even run under Linux, being a game from 2006, were put to rest rather quickly by the mod authors having explicit instructions for Linux in their installation docs.

And that’s really the first amusing thing: Suddenly being back in the days where mods needed actual install instructions, instead of just using the game’s or Steam’s mod framework. So some file copying was in order. Which will prove more problematic than you might think.

But first, let me state: The Steam version of Medieval II runs under Linux without any issue at all. Just download and hit play.

But then comes the mod install. The instructions can be found here. Rather amusingly, I first had to figure out where the hell Flatpak put the Steam files! Hint: It’s under ~/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps.

Sadly, the install instructions for the mod also contain this line:

  1. Delete your settlements folder in share/data/mods/ebii/data. You play with vanilla settlements.

This seems to be current information, as without doing this, the game crashes. But ah well, you can’t have everything. 😉

The final hurdle came with installing patches. Initially, I just installed the main 2.35 version and launched a campaign, forgetting about the two patches. And everything seemed to be working, at least in the first couple of turns.

Then I happened to look at the forum again and realized that there were two patches for that release also waiting to be applied. And that’s where the problems began. I ran the rsync command to install/override some new files:

rsync -aPv ./data/ /home/michael/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/Medieval\ II\ Total\ War/share/data/mods/ebii/data/

And suddenly the game crashed for every battle. It took me quite a while to realize that this was due to one of Windows’ quirks: The filesystem in Windows does not care about the case of filenames. HELLO is the same as heLLo. Now, in the main 2.35 install, all files and directories, without exception, were lower case. But in the two additional patches, some files and directories were upper case. And so when I ran the above command, some new files were added, but some old files were not overwritten as intended, leading to the crashes.

And now I come to a confession: I had to google how to recursively change all filenames to lower case in a directory. 🙈

After I had finally done that, Europa Barbarorum 2 runs fine on Linux, besides the aforementioned vanilla settlement maps. Slightly weird to breach the walls of an Aztec looking city with a Roman Legion, but ah well.

So the full guide to installing Europa Barbarorum for the Steam version of Medieval II: Total War under Linux.

First, install Medieval II with the Kindgom expansion via Steam. Then launch the game and a grant campaign. I’m also not sure why that’s necessary, but the EBII install instructions mention it, and it’s also a good way to test whether campaigns and battles work properly.

Then, download the non-installer version of EBII v2.35 from one of the links mentioned in this announcement. I decided for the non-installer version because I figured I would need Wine for the installer to work properly. As we’re installing under Linux, you can also ignore all the instructions about installing in a short path outside the Program Files directory.

Unpack the 7z package with 7z e EBII_noninstaller.7z. This will create a directory called mods/ in the current dir, with a single dir called ebii inside it. Copy that dir to:

~/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/Medieval\ II\ Total\ War/share/data/mods/

Then copy the file Medieval\ II\ Total\ War/share/data/mods/ebii/data/banners/no_banner.mesh to Medieval\ II\ Total\ War/share/data/data/banners/no_banner.mesh, outside the mod dir. Then delete the dir Medieval\ II\ Total\ War/share/data/mods/ebii/data/settlements.

Next, have a look at the instructions here to install two patches for the mod. These are problematic, because they contain some directories with upper case letters, which means that rsync will add those directories and files to your mod, instead of replacing the existing files, leading (in my case) to crashes whenever I start a battle. First, unpack the EBII 2.35A Patch FINAL R1.rar file with unrar. This will create a directory called 2.35\ patch. If you run a find command on that one, you will see the problem:

find 2.35\ patch/ -regextype posix-extended -regex '.*[[:upper:]].*'

This produces a lot of files. Now run the same command on the original mod folder:

find  ~/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/Medieval\ II\ Total\ War/share/data/mods/ebii/ -regextype posix-extended -regex '.*[[:upper:]].*'

There will be no hits - all files are lower case. To lower case all of the files in the patch, you can use the following command:

find 2.35\ patch/ -depth -exec perl-rename 's/(.*)\/([^\/]*)/$1\/\L$2/' {} \;

Note specifically the perl-rename. I also have a different rename command on my machine, that’s not the right one for this snippet.

After all files have been made lower case, you can now install the patch:

rsync -aPv ./2.35\ patch/data/ ~/.var/app/com.valvesoftware.Steam/.local/share/Steam/steamapps/common/Medieval\ II\ Total\ War/share/data/mods/ebii/data/

This patch also has some additional instructions in the 2.35\ patch/readme.txt file. Namely, removing all *.idx and *.dat files in the modes/ebii/data/sound dir.

And finally, unpack the last EBII v2.35A R3.5.zip patch. This one also needs the lower case treatment as described above and then should also be copied with rsync to the mods/ebii/data folder.

And that’s it. Happy conquering the ancient world. 🙂