Pinco's UI with the Enhanced Client on Linux with wine

The Ultima Online Enhanced Client will run with Pinco's UI on Linux using wine, and run just as well as it does on Windows with one notable exception. If you are going to use a 3rd party mapping application you will want to run the Enhanced Client in fullscreen windowed mode, which unfortunately will affect performance. Both natively on Windows, and on Linux/wine, the Enhanced Client runs much more smoothly fullscreen.

The instructions I will give here are for Debian, but likely can be modified to work with any distro. I'm not going to go into extreme detail, if you have any questions most of the answers should be pretty easy to find on a search engine.

First Steps
The first thing you will want to do if you are planning on doing any gaming at all on your Linux system is to install multiarch, so that you have access to all the i386 versions of packages that you require. You will also need to install both the 64 and 32 bit versions of all your applicable drivers.

Figuring out what drivers you need can be a challenge on Linux, I wish you luck and happy googling. That is beyond the scope of this article. Once you've done that you will need to install wine, both 64 and 32 bit versions. You should be able to do that through your distro's regular package management. You will also want to install "winetricks", which you should also be able to do through your distro's regular package management.

The next step is to install Lutris. For a number of reasons I recommend Lutris over PlayOnLinux or something like Steam. I find it easier to use and just generally have had more success with Lutris on Linux than I have with any other game configuration assistant application.

You can find the instructions for installing Lutris on your system at the following link:

https://lutris.net/downloads/

Note that even though I am on vanilla Debian (now bullseye, but the same instructions work for buster) I use the Ubuntu ppa. I find it has less issues than the openSUSE repository. I would also strongly recommend if you are going to use the Ubuntu ppa on Debian that you set the Ubuntu version to "cosmic". You can do this by navigating to /etc/apt/sources.list.d, after you have installed the ppa, and editing the "lutris-team-ubuntu-*.list" file in the following way: deb http://ppa.launchpad.net/lutris-team/lutris/ubuntu cosmic main
 * 1) deb-src http://ppa.launchpad.net/lutris-team/lutris/ubuntu cosmic main Once you've done that you will want to open Lutris.  On the left hand side of the main Lutris window you will see a list with the heading "Runners", click the little options gear at the top, navigate down to "Wine", click the leftmost icon to manage wine versions and click on the box beside the top "lutris-*" version to install it.  You want the latest numbered version, not the special versions labelled "nofshack" etc.

Finally you will want to create a wine prefix using that version of the lutris wine runner that you just created. I find it best to create a directory for your wine prefixes in your home directory that isn't a hidden directory, if you do any amount of gaming on Linux you will be using that directory a lot and it is simpler if it isn't a hidden directory. You can create that prefix using a console command as follows. Note that this will create a 64 bit prefix, but the old advice to create 32 bit prefixes for 32 bit apps really wasn't the best advice and I new create 64 bit prefixes for all my games, regardless of their architecture.

WINEPREFIX="$HOME/WINEPrefixes/wine_d3d9" /home/[username]/.local/share/lutris/runners/wine/lutris-4.16-x86_64/bin/wine wineboot

It's time to take a breath and remind yourself that getting games working on Windows can also be a major pita, especially when 3rd party apps are involved...

Downloading the Enhanced Client Installer and Setting Up Lutris
The first thing you will need to do is download the Enhanced Client installer from the official Broadsword site. You can find it at the following link:

https://uo.com/Client-Download/

At this point I would suggest you create a "Games" folder in your home directory, and inside that folder you can create a folder for the enhanced client, I imaginatively called mine "Ultima Online Enhanced". You can put the installer in that for now.

Open Lutris again and in the main window up in the top left hit the "+" sign. For now we just want to create a Lutris game menu item for the Enhanced Client, and you can do that using the installer executable. You will want to use the wine runner and that Lutris version of wine that you installed for the wine version. Do not enable any of the DXVK or D9VK options, or Esync. I typically choose to disable the Lutris Runime and "Prefer system libraries". Make sure you enter the location of that wine prefix you created.

Once you've configured that you can save it. You will need to set a few things up before you run the installer.

Right click on the new Lutris menu item you created and click on "winetricks", most of the steps I am going to list here are absolutely necessary, or the Enhanced Client won't run at all, or won't run with Pinco's UI. I'll make a note of the steps that may not be necessary. For the best results you should perform each of these steps one at a time and allow winetricks to do it's thing before moving on to the next step. You should also confirm that the steps have completed successfully by checking the appropriate menu to see if the option is checked.

If this is the first time you have ever used winetricks you should be aware that winetricks is not one of the great joys of using Linux. It can take a very long to complete certain steps, and sometimes they have to be run multiple times before they "take". Unfortunately there are no other options that I am aware of, although you might have more success running the winetricks commands from the command line, but that is beyond the scope of this article.

Once you have winetricks open select the default prefix and click on "Install a font". I would suggest you install "corefonts" and "tahoma". This step may or may not be necessary, but I do this for any prefix I create.

Once you've done that in the main menu select "Change settings" and select "fontsmooth=rgb" and "videomememorysize=2048" or whatever the video memory size for your card is if it is less. These steps may also not be absolutely necessary, but the font smoothing is something I enable for all prefixes and the video memory size is something I enable for all d3d9 games. You can check the minimum requirements for the Enhanced Client if you are concerned about not having enough video memory.

Back in the main winetricks menu choose "Install a Windows DLL or component". The following steps are absolutely necessary. I will make a list of the components you need to install, with any applicable notes.

d3dx9

dotnet462 - This step can take a very long time to complete and may need to be run more than once to complete successfully. This version of .NET will allow you to run certain 3rd party apps in addition to Pinco's UI. When it is finished if you check the list of components you should see dotnet462, dotnet461, dotnet46, dotnet45 and dotnet40 all checked off

dotnet20 - Again, this step can take some time to complete and you may need to run it more than once for it to complete successfully.

Once you have done this hit cancel as many times as you need to exit winetricks. Right click on the Lutris menu item and choose "Wine configuration", change your Windows version to Windows 7. Hit OK, right click on your Lutris menu item and choose "Configure". Click on the "Runner options" tab and change the "Wine version" from the "lutris-*" to "System*", which is the default wine version your distro provides.

This is a very important step, and I only know for certain that this works with Debian. It is important that you first set up your wine prefix with the Lutris wine runner, then switch to the vanilla system wine provided by your distro. I don't know why this works, but it does, and it is the only way I've been able to get the UO Enhanced Client working with Pinco's UI.

Once you have done that, right click on your Lutris menu item, click on "Play" and if all goes well the Ultima Online Enhanced Client should successfully install wherever you choose to install it.

Installing Pinco's UI
We're almost there. It's time to install Pinco's UI. You can download it at the link below, I would suggest downloading it from Google Drive or Dropbox.

https://drive.google.com/file/d/0B1u5W2SxRp59VTNyRTlFTnk5MjA/view

Extract that to whatever folder you installed your Enhanced Client in. You will probably want to set up a separate Lutris menu item for the PInco's UI patcher. Set it up using the same options and wine prefix as you did for the Enhanced Client installer, and make sure you choose the System version for your wine version. Choose "UI Patcher.exe" as your executable.

Right click on the Lutris menu item and choose "Play" to run the installer. Again, with any luck, it should run. You probably don't want to start the client yet using the launcher. It will take some time to update.

Setting Up and Running the Game with Pinco's UI
Now we are down to last steps. You will want to create a batch script to launch your game. There is an issue with EC Playsound not detecting your game executable if you run it normally, so you will need to first launch the Enhanced Client, then EC Playsound, in that order, to get it to run properly.

I would suggest you create the batch script file in your Enhanced Client directory, you will need to give it a "bat" extension. I named mine "UO_EC_Launch.bat" with the following contents. Note the delay, that may or may not be necessary, and/or you may need to choose another method for the delay, but this worked for me. @echo off
 * *** The configuration section of the script starts here. ***


 * Replace with the SA/Enhanced Client executable.

set EC_EXECUTABLE=UOSA.exe
 * Replace with the secondary application you want to launch.

set EC_PLAYSOUND=EC PlaySound.exe
 * *** The configuration section of the script ends here. ***

echo * Configuration complete. echo. echo.
 * Launch the SA/Enhanced Client executable.

@start "" "%EC_EXECUTABLE%" echo * Starting SA/Enhanced client executable. echo. echo.
 * Launch EC Playsound.

timeout 5 >NUL 2>&1 @start "" "%EC_PLAYSOUND%" If you don't like that, the contents of the script can be as simple as: @echo off @start "" "UOSA.exe" timeout 5 >NUL 2>&1 @start "" "EC PlaySound.exe" Now right click on your original Enhanced Client menu item, choose "Configure", click on the "Game options" tab and point the "Executable" line to that batch script. I would also suggest that under "Runner options" you turn on the "Windowed (virtual desktop)" option and choose your main screen's resolution. Once you are in the game, under Graphics options enable fullscreen, the Enhanced Client performs much better with fullscreen.

However, if you choose the virtual desktop with full screen, it may present issues with running any third party apps, such as a mapping app. Addressing those issues is beyond the scope of this article. Once you start the game this way using the Lutris menu item, you will be presented with the EC patch window that you can safely cancel, and click the Enhanced Client item in the virtual desktop bar at the bottom to access the client.

To update Pinco's UI and/or the client, you can simply run the Pinco's UI patcher Lutris menu item that you created at any time, but don't use the Pinco's UI patcher to start the game, or EC Playsound won't successfully detect the game executable and it will shut down, which will fuxxor your Pinco's UI in game...