Age of Empires 2 on Linux - updated
Check out the [2019
version](/posts/2019/03/10/age-of-empires-2-on-linux-2019-edition/)
Get the instructions in odt format here: Installing-AoFE-on- Linux.odt
Playing AoFE on Linux
Overview
last updated 2017-01-15 This document shows how to install Age of Empires II: The Forgotten Empires in Linux. The version of Linux used in the example is Korora 25 with Cinnamon (https://kororaproject.org/), which is a Fedora-based distro. This means that dnf/yum will be used instead of the probably more-familiar apt-get.
Requirements
Age of Empires II: The Age of Kings CD or ISO Age of Empires II: The Conquerors Expansion CD or ISO
Installing AoFE on Linux
Install PlayOnLinux
Visit the PlayOnLinux download page at https://www.playonlinux.com/en/download.html. Technically that page will install the repository for your distribution. Once that is done, use your package manager to install PlayOnLinux. For Fedora, that's yum or dnf or yum-extended in the gui. For ubuntu cli, that would be apt-get.
Install AoK
Mount the AoK CD or ISO. In Korora that's as easy as double-clicking the ISO to have the iso mount tool auto-mount it for you. In PlayOnLinux, click the Install button. Select the games tab and "Age of Empires II: The Age of Kings." In the series of prompts, select "use the CD-ROM." Install the game like normal. Decline installing the 2.0 patch.
Adding the correct version of Wine
Select "The Age of Kings" on the main PlayOnLinux screen and select the "Configure" button. PlayOnLinux uses wine to provide a windows-like environment to games, and the default current version of wine is not the best for Age of Empires 2. Each time we install an expansion to the game, PlayOnLinux will copy the entire game "hard disk" directory (drive_c) and all the wine settings, so it is best to fix the issue at the start. On the General tab, beside the Wine version select the "+" button. Select the latest Wine staging version. Staging is very important. Then select the ">" right arrow button. Allow the wine version to install. Close out of the dialog. In the "PlayOnLinux Configuration" window, select that wine staging version: 1.9.23.
Configuring wine
Select the "Install components" tab. Select "Directplay" and select the Install button. It will run through a process without needing any input. Close out of the PlayOnLinux Configuration window.
Installing AoC
Insert the AoK:TC disc or iso. In PlayOnLinux, select the Install button. Install the game like normal. Select yes to install the Patch C. If the patch installation fails or you skip it, it can be corrected later so do not worry about it. Use a setup file and use the Patch C file available on your local disk. Microsoft no longer hosts the Patch, but you can find it at the Age of Kings Heaven at http://aok.heavengames.com/patches/.
Installing AoFE
On the main PlayOnLinux screen, select the Install button. Select "The Forgotten Empires." Go through the dialogs and let the application copy the files. When it asks to retry because the files mismatch, just select "No." On the error message, select "Next." The application should run. Select any options that apply to you. Accept and close and finish up the process. Age of Forgotten Empires should now run properly! If it still fails, do not worry. Installing the Voobly client will help fix problems.
Installing Voobly
Voobly is a match-making service that some Age of Empires players use online. Other options include GameRanger and Steam (but that's not the CD version).
Installing voobly client
Download the voobly client from http://www.voobly.com/ to a local disk. In PlayOnLinux, select "Age of Forgotten Empires" and select the "configure" button --> "Miscellaneous" tab. Select "Run a .exe file in this virtual drive" and select the voobly installer. Install voobly client like normal.
Adding an icon for Voobly
Configure "Forgotten Empires" in PlayOnLinux. General tab --> "Make a new shortcut for this drive." Select the voobly.exe option or navigate and find where you installed it.
Fixing Voobly web browser
If the voobly web browser part malfunctions, you might be able to solve the problem with instructions from http://www.voobly.com/forum/thread/217821:
Here is just my own experience of the last time I got it working (was on staging 1.9.12 in arch linux): First tried to install ie6 (with $ winetricks ie6) - that didn't help, than I did $ winetricks ie7 and it worked. After installing ie7 with winetricks the web browser within voobly was working fine and i could install mods from both the build in voobly web browser and from ie7 running in wine... But, of course, that didn't stop me from digging more into it (ie7 is old af and sux), so I installed Firefox next, but strangely Firefox didn't recognize the voobly links, so i couldnt install mods from Firefox, only from IE... After that i did $ winetricks ie8, which broke things again. In a desperate attempt to get it working again i removed all of the web browsers with $ wine uninstaller, deleted all remaining web browser files in Program Files dir, and than i even removed all IE and mozilla registry entries in HKEY_CURRENT_USER/Software and HKEY_LOCAL_MACHINE/Software with $ wine regedit. After doing this purge, the build in web browser in voolby worked fine again, and i had no problems installing mods from it - even when I didn't actually have any web browser in wine installed (and the traces of the removed browsers were pretty well purged...).
Adjusting Voobly to run AoC/AoFE properly
Be sure you are using a staging version of wine (1.9.23-staging for example).
On the miscellaneous tab, add this string to the "Command to exec" box:
export STAGING_WRITECOPY=1
Adding the Voobly icon to PlayOnLinux
You can set an icon for the Voobly shortcut. Extract the image from the voobly.exe file. Irfanview is a good tool for that.
Running Voobly/AoC/AoFE on Linux
The voobly updater tool will only run if Wine is configured to act like Windows XP or newer. This used to be an issue, but as of Fedora 25, should no longer be a concern as regular voobly and AoC run fine in Wine as XP or newer with these later versions of Wine. Adjust in-game graphics settings to low to improve the smoothness of the game.
Closing a multiplayer game
When leaving a multiplayer game, you might need to kill the process because it
hangs in the "Disconnecting from game..." screen. Use a command similar to the
following. ps -ef | grep -iE "age2_x1\.exe" | awk '{print $2}' | xargs kill
You could make a bash script to do this for you, so you just run the script.
cat <~/kill-age2.sh #!/bin/sh ps -ef | grep -iE "age2_x1\.exe" | awk '{print
$2}' | xargs kill EOF chmod 755 ~/kill-age2.sh
That way, you can just run
~/kill-age2.sh to clean up the dead game after a multiplayer game.
References
Weblinks
- http://www.voobly.com/forum/thread/144022 Configuring Linux+Wine to play AoK/AoC Working Model
- http://www.voobly.com/forum/thread/217821 AoC on voobly in linux (complete guide)
- Korora 22 https://kororaproject.org/
- http://support.voobly.com/display/vkb/Voobly+Knowledge+Base
- PlayOnLinux download page https://www.playonlinux.com/en/download.html
- Age of Kings Heaven patches page http://aok.heavengames.com/patches/
People
Cavin at voobly.
Comments