Discovery Gaming Community
Discovery on Linux: A guide - Printable Version

+- Discovery Gaming Community (https://discoverygc.com/forums)
+-- Forum: Welcome (https://discoverygc.com/forums/forumdisplay.php?fid=399)
+--- Forum: Help & Support (https://discoverygc.com/forums/forumdisplay.php?fid=26)
+---- Forum: Tutorials & Tools (https://discoverygc.com/forums/forumdisplay.php?fid=178)
+---- Thread: Discovery on Linux: A guide (/showthread.php?tid=173057)

Pages: 1 2 3


Discovery on Linux: A guide - Misfit - 08-26-2019

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.

Requirements

Wine:
- wine-staging 2.21
- wine-staging latest
- winetricks

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

Code Wrote:mkdir .winedisco
WINEPREFIX=~/.winedisco WINEARCH=win32 wineboot

After setting up this prefix as 32 bit, it's not longer necessary to explicitly specify "winearch=win32".

The following Windows components are necessary. We can install these with winetricks.

directplay
mfc42
dotnet40

Code Wrote:WINEPREFIX=~/.winedisco winetricks directplay mfc42 dotnet40

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.

Code Wrote:WINEPREFIX=~/.winedisco wine <discovery installer>

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:

Code Wrote:mkdir .winedslauncher
WINEPREFIX=~/.winedslauncher WINEARCH=win32 wineboot

To run the launcher with this new prefix:

Code Wrote:cd ~/path/to/Discovery\ Freelancer \ 4.91.0/
WINEPREFIX=~/.winedslauncher wine DSLauncher.exe

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:


Misfit Wrote:#!/bin/sh
export PATH="~/mount/staging-2.21-x86_64/bin/:$PATH"
cd ~/mount/Discovery\ Freelancer\ 4.91.0/EXE/
WINEPREFIX=~/mount/.winedisco32dotnet40 wine Freelancer.exe -s163.172.117.137:2302 -logchat -logappend -logtime -noflighttext -dptplayer -newplayer -lag -numdmg -dx -d 1366 -x 768

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.


RE: Discovery on Linux: A guide - Dank Vader - 08-27-2019

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 ***** 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:

https://youtu.be/Q33wyfT3btw

https://youtu.be/qJW_sASkTio

https://youtu.be/c6nxnh9Cu70


RE: Discovery on Linux: A guide - moduletux - 05-16-2020

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:

  1. Lutris is Installed
  2. 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
  3. Click on "Show Unpublished Installers"
  4. Click "Install" on the version named "Discovery version"



RE: Discovery on Linux: A guide - Maltz - 05-16-2020

Sounds good.


RE: Discovery on Linux: A guide - Maltz - 05-24-2020

Lutris crashed before the installation. Probably KDE related stuff.


RE: Discovery on Linux: A guide - Shiki - 05-24-2020

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.


RE: Discovery on Linux: A guide - _IOnut - 06-01-2020

(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:

  1. Lutris is Installed
  2. 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
  3. Click on "Show Unpublished Installers"
  4. 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

[CPU]
Vendor: AuthenticAMD
Model: AMD FX™-8350 Eight-Core Processor
Physical cores: 4
Logical cores: 8

[Memory]
RAM: 15.4 GB
Swap: 17.0 GB

[Graphics]
Vendor: NVIDIA Corporation
OpenGL Renderer: GeForce GTX 1080/PCIe/SSE2
OpenGL Version: 4.6.0 NVIDIA 430.64
OpenGL Core: 4.6.0 NVIDIA 430.64
OpenGL ES: OpenGL ES 3.2 NVIDIA 430.64
Vulkan: Supported

The vanilla install runs very smooth.
I tried different options in lutris and also the launcher with same result.


RE: Discovery on Linux: A guide - Misfit - 06-01-2020

(06-01-2020, 12:00 AM)_IOnut Wrote:
(05-16-2020, 10:29 PM)moduletux Wrote: <some things>

<some other things about the 1fps issue>

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.


RE: Discovery on Linux: A guide - wodalin - 06-02-2020

[]
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.

Also you might want to install msacm32 with winetricks to get rid of the stuttering
when NPCS get in sight.

hope that helps

BTW: Ichiru has a command line tool for updating.


RE: Discovery on Linux: A guide - moduletux - 06-22-2020

(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.
My lutris installer includes msacm32 as well.

Link to installer on Lutris website: https://lutris.net/games/install/20544/view