Misfit's guide to running Discovery Freelancer on GNU/Linux
A brief overview
So, you're an enlightened individual who is sick and tired of Windows being slow, spying on you, and being all round garbage so you've decided to embrace an open-source, UNIX-like system. You've got your favourite browser installed, you're listening to your music with Spotify, and you've discovered gaming on Linux with Steam's Proton giving you higher FPS than your Windows contemporaries. But you miss the good old days of trading, getting pirated and then ragequitting to write an angry forum post, so you try to run Discovery Freelancer using the traditional wisdom wine methods or even using @Corile's old guide to find it doesn't work. Well I'm here to tell you: it's possible.
It's a bit tricky and might be a bit confusing at first, but it can be done. The tl;dr version of this guide is basically install two different wine prefixes and download wine-staging 2.21, install some components with winetricks and run the game with that in one prefix and run the launcher to patch the game in the other prefix. Account switching will be done with a script I've created. Trust me, once you get it all done by following this nifty guide you'll understand how it works and how you might even be able to improve on my method. Linux is a community after all, and if you've found a better way to go about running the game (such as using a game manager like Lutris), please do share your method. There's probably many ways to go about installing disco on Linux, but this is the one we've tried and tested and we know works so far.
You might be wondering why two different versions. Wine-staging 2.21 is what we use to run the game, as we've observed best results with this specific version as the game doesn't work with the latest wine-staging (and it's not like you have to install it, we'll get to that later). Current Wine-staging is what we use to install the game and run the launcher, since 2.21 won't start the launcher.
For the account switcher:
- bash (sorry I used bashisms because my smooth brain doesn't know what real programming or POSIX compliance is)
- xmlstarlet
- A DSLauncher compatible launcheraccts.xml file (You can take this file from a previous installation or you can make one of these when we install the game and run the launcher but after that you'll want to copy it somewhere easier to access)
The following 32-bit libraries installed on your system:
- lib32-libpulse
- lib32-gst-plugins-base-libs
- lib32-mpg123
- lib32-nss-mdns (for Arch users this is an AUR package)
These packages may not be the actual package name for your distribution (for instance, lib32-libpulse in Fedora is actually called pulseaudio-libs.i686). Please search for the appropriate packages names for your distribution. These packages might even be installed as part of pulseaudio, gstreamer, and mpg123 respectively.
Additionally, there may also be more packages required for your specific system. Check the wine logs and make sure you don't see anything missing if something isn't working.
Installing the game
First we need to create a fresh 32-bit wine prefix. For example
Once these are installed you can install the game as you would on Windows. Please not that "wine" in these steps is not the wine-staging 2.21 version I told you to download earlier, this is whatever wine version is installed on your system. We use the downloaded version later to launch the game.
Note: It is important that you change the install path to something easier to access. I install mine to a Games directory in my home directory. This makes it easier to use different wineprefixes which may be necessary.
You should now have an unpatched install of the game, congratulations.
Running the launcher
In normal use, you won't actually need the Discovery launcher. However, for our first setup and for the purposes of patching, it is necessary to run the launcher.
Now, here's where things can get a bit messy. Running the launcher in the prefix we just created will crash, and you won't be able to use the launcher. To create a DSLauncher compatible prefix, we will simply do what we did in the previous step but without installing the Windows components necessary to run the game using winetricks. For example:
Patch the game until it says it's ready, but don't start it yet.
For fresh installs that do not have a launcheraccts.xml file:
Generate an account (or a few) using the launcher in the Accounts tab, and then export or all accounts. Take the XML file that is created and use that as your launcheraccts.xml file for the account switcher later, or just don't worry about it if you only plan on having one account (not advised).
Running the game
The important part. The part you've been waiting for. All these installed packages and set up prefix(es) lead to this.
But wait.
You can't run the game through the launcher. Wine-staging 2.21 won't start the launcher, and if you run the game from the launcher using the current wine-staging or whatever wine version you're running, the game might not work. By now you've probably got the wine-staging version I told you to download earlier, we can simply extract the contents of that tar file to a directory convenient for you. Maybe even put it in your Discovery Freelancer directory so you don't lose it.
So here is where your linux brain might have to do some work, as it's up to you how you want to start the game. You could use a desktop shortcut with options enabled (see list below), or you can use a script which you can call on with a keyboard shortcut like I do. Here's the script I run to launch the game:
From this example it should be clear to you what your game options are, and how you want to set up your resolution. The main things to note are:
-You need to set your PATH environment variable to the bin directory of wine-staging 2.21. This ensures we're using the correct wine version and we don't get version mismatches from anything wine calls on while we're running (Thanks @Ichiru)
-You need to be in the disco/EXE/ directory
-You need to specify the wine prefix that has dotnet40 installed
-You need to include the server address (and any other server addresses you wish to play on) as an -s argument.
From here, the game will launch and it will use the default created account in your wine prefix. That's where my custom account switcher script comes in.
Switching accounts
With your launcher and game in two different wine prefixes, you can't use your launcher to modify your game prefix's registry to change accounts. That's why I made a simple little script which handles that for you. It's terminal based, so don't expect any popup window with buttons or a sortable list you can sift through, just a big list of your accounts with a corresponding number which you use to select your account. It then edits the registry of the wine prefix you specify in the top of the script, thus changing the multiplayer account of the game. From there you can probably even go as far as setting up keyboard shortcuts in your desktop environment to switch accounts on the fly, or create a menu script with a utility like dmenu. The functions of the script are extensible so it's up to you.
Get the script here and please make sure you follow the instructions on the git page/in the readme as it does require some setup.
(Also I'm totally aware it's called "launcher" when it doesn't actually launch the game, it just switches accounts. I'll keep adding features to it and it will eventually become the proper Linux Launcher)
Patching the game
At the moment we don't have our own Linux-specific method of patching the game (I tried, it got me autobanned), so you'll have to use the other wine prefix to patch the game through the launcher. Remember when I told you to install the game to a non-default install path? Well that's important now. In order to start the launcher and update the game, simply do what you did earlier to start the launcher, but make sure you're using the launcher in the copy you use to play the game if you had multiple copies.
After that, start the game again through whichever method you chose (like my game launching script from earlier) and you should be up to date.
Conclusion
It takes a few more steps than it used to and we can't use the lazlauncher to start the game as we were previously able, but that doesn't stop us. Once you get everything installed and you know how to go about patching the game, your experience should be on par if not better than that of Windows users (Try changing your account with a hotkey, Winblows users). I'd like to thank the members of both the Discovery and Linux communities that have made this possible, notably @"Gaivs Trollivs" (he actually did most of the work to make this guide possible) and @Ichiru for testing to see if our methods worked.
We soon hope to have a specific patcher available and this guide will be amended in the future once it is tested and incorporated into the launcher script. If you have any questions or if anything here needs to be changed please do let me know on Discord, it's on my forum profile.
Pretty well put together thread. I don't have anything else to add here, but if anyone needs extra help in regard to this, they can either send a personal message to me, misfit, or simply make a post here.
Also, I'll post some videos of me playing the game on linux (mostly pvps at connecticut). Furthermore, you can also keep an eye on my channel, since I'll be uploading videos from the recent "pyres of remembrance" event, in which I took part in, and in which I was playing during the whole event through linux (the f.p.s. drops in-game on those videos are mostly related to so many players being at one spot and the general clusterfuck that was taking place, the game runs very well in general). Here are some general pvp videos as I said. You can see the game running at pretty much windows performance levels:
I have created a new Lutris installer that will install Freelancer (provided you have the ISO mounted), .NET, the DLLs needed by the mod, and the Discovery Mod itself. To try it out, make sure you have the following dependencies met:
Lutris is Installed
You have the dependent libraries from the OP's post installed. For Ubuntu (and derivatives) users these package names are: libpulse0:i386, gir1.2-gst-plugins-base-1.0:i386, libmpg123-0:i386, and libnss-mdns:i386
Click on "Show Unpublished Installers"
Click "Install" on the version named "Discovery version"
When I've seen the title I wanted to point out that new launcher is not working under wine for whatever reason. But then I saw that you've made an account switcher. Nice.
It's kind of very sad because the old launcher written by Alley was working perfectly with wine.
(05-16-2020, 10:29 PM)moduletux Wrote: I have created a new Lutris installer that will install Freelancer (provided you have the ISO mounted), .NET, the DLLs needed by the mod, and the Discovery Mod itself. To try it out, make sure you have the following dependencies met:
Lutris is Installed
You have the dependent libraries from the OP's post installed. For Ubuntu (and derivatives) users these package names are: libpulse0:i386, gir1.2-gst-plugins-base-1.0:i386, libmpg123-0:i386, and libnss-mdns:i386
Click on "Show Unpublished Installers"
Click "Install" on the version named "Discovery version"
After Installing the game runs at 1 fps. This happens after I connect to the server.
[System]
OS: Manjaro Linux 20.0.2 Lysia
Arch: x86_64
Kernel: 5.4.43-1-MANJARO
Desktop: XFCE
Display Server: x11
Reportedly a fix for this issue is to use d3d8to9 to convert the dx8 calls to dx9 ones, which allows you to run the game via vulkan. I haven't got this solution working on an install where I had this issue, but that's something you might look into.
If it helps, I had this issue on a Fedora install and managed to resolve it somehow. I just don't remember how.
(06-02-2020, 11:24 AM)wodalin Wrote: []
After Installing the game runs at 1 fps. This happens after I connect to the server.
[]
You have to use wine-staging and switch off the deprecated graphics acceleration
with winecfg.
Lutris has the WINE-Staging fixes built into all of their wine builds by default. They also have DXVK, vkd3d, esync, and proton baked in as well, though the former two don't matter for Freelancer really.
Quote:Also you might want to install msacm32 with winetricks to get rid of the stuttering
when NPCS get in sight.