Community Forums > Technical Support > Game Support: all game related problems > AoC on voobly in linux (complete guide)

AoC on voobly in linux (complete guide)

 [LyF]karyk


Group: Standard Membership
Join Date: 4 June 2013
Posts:33
Edited 30 June 2016 - 1:52 am by [LyF]karyk
This guide is for ubuntu (and, of course, all the other *buntus), but there is no problem to make it work on other distributions with pretty much the same steps, so if you use a different distro just follow the links in each step and figure things out...
Keep in mind that wine-staging is experimental, some staging versions may not work properly and there is no guarantee that things won't break in the future - so if you just use staging for AoC and want to be save, you may consider preventing wine-staging from updating once you have everything set up properly. However the only not working staging versions i know of are versions 1.7.40 through 1.7.45, all other versions i used were working fine (and i did use quite a few of them, as I am writing this I use staging 1.9.12 on arch linux), so you will probably be fine if you just use the latest version availabe for your distro...

If you don't use windows as your primary OS, you can still play on voobly using experimental wine versions called wine-staging (i.e. play without having to dual-boot with windows or without using some virtualization software like VirtualBox). If you tried to play aoc on voobly in regular wine versions ([You must login to view link]), you probably found out that while the game itself works perfectly, it fails to launch when trying to play through voobly (the voobly client works fine otherwise, you just can't launch the actual game).

Don't read if you don't care about the details and just want to make it work...
Technically you do not need to install regular wine at all (skip step 1) - you could just install wine-staging (step 5) and install the game and voobly using wine-staging. However, when i was first trying to make this work i had some trouble installing the game in staging, also I don't think you get winetricks with wine-staging - so you'll either have to install winetricks separately, or you'll have to install all the directplay libraries (step 3) manually - which may be a pain... So if you don't mind the ~300 MB of additional space for regular wine version and/or you wish to use regular wine versions for other windows software - just follow this guide precisely.
In arch linux by default wine-staging replaces regular wine version instead of installing alongside it, so just keep that in mind if you use arch.
If you need to use multiple wine versions on the same machine and/or you prefer to have a GUI on top of wine, look up the PlayOnLinux software ([You must login to view link]) - it has a huge amount of wine versions precompiled, and you can easily use different wine versions for different windows software...


1. Get wine (if you don't already have it)
Code:
$ sudo apt-get update $ sudo apt-get install wine
It should be in you sources by default.

2. Install AoC through wine
Just install it from the original CD's or CD images (first AoK than AoC - right click on the setup.exe and select "run in wine"...). I installed it from iso images which i mounted through CDEMU ([You must login to view link]).
Alternatively you can try to just copy over your whole AoC folder you are using in windows and once you are finished with step 6 run the game diagnostic tool on voobly and point it to the age2_x1.exe...

3. Install DirectPlay (AoC requires it for multiplayer game)
You can either do it manually or through winetricks ([You must login to view link]), I recommend the latter. More details here: [You must login to view link]
Winetricks should install alongside with wine - so you should already have it... just run:
Code:
$ winetricks directplay

4. Install Voobly
No problems here, just get the installation package on http://www.voobly.com/ and run it in wine...

5. Get wine-staging (more info: [You must login to view link])
Code:
$ sudo add-apt-repository ppa:pipelight/stable $ sudo apt-get update $ sudo apt-get install --install-recommends wine-staging

6. Set STAGING_WRITECOPY variable and run voobly through wine-staging
You need to run voobly in wine-staging (not in normal wine) every time! I just made a simple bash script so I just double click and launch Voobly:
Code:
#!/bin/bash export STAGING_WRITECOPY=1 && cd /home/kary/.wine/dosdevices/c:/Program\ Files/Voobly/ && /opt/wine-staging/bin/wine voobly.exe
Just change the path to the voobly folder - if you just have default paths (like me), than changing "kary" to your username should be enough... Now just save the script as [You must login to view link] and make it executable, double click it to launch voobly.
Source - the last few posts here: [You must login to view link]

You should also configure wine to emulate virtual desktop - to prevent some funny business with the resolution when you close the game (run the "configure wine" tool, go to graphics and tick "emulate virtual desktop" and then set the desktop size - ideally to a maximum resolution of your monitor...)

When running Voobly there is no difference compared to running it natively on windows - just connect to a lobby, run game diagnostics, let it fix whatever and play.


BUGS and ISSUES (which i encountered during ~2 years of playing like this...)

1. The 1.4RC version may crash when you launch with a custom resolution for the first time
So you got to the AoC game lobby, but when the actual game launches it crashes.
The solution to this is really simple, so don't panic... Before you start playing on Voobly, just run AoC (the age2_x1.exe - in clasic wine or staging - it shouldnt matter), select the 1.4 patch, than in options in the main game menu change the resolution to 800*600, than launch any game (or rec) and change to whatever resolution you want to use directly in the game. You only need to do this once, after that it will work fine and will always launch with that resolution (on voobly or offline, it doesn't matter).

2. Can't launch the in game chat while specting a game
When you launch as a spectator you can't launch the in game chat and shortcuts to the buildings of the player you are specting don't work either.
Idk why this happens, it may be related to the linux desktop environment you are using. The solution is (again) very simple. Just switch (alt+tab or whatever shortcut you use...) to something else you have open within your desktop environment and than switch back to aoc, after that it will work fine.

3. When you render the game in 32-bit color it slows down considerably
When, in a game room, I select "game->Directx->Render in 32-bit color", the game runs very slow and becomes unplayable (especially if it is a 4v4). I tried to install directX 9 (with $ winetricks d3dx9) - it doesn't help. When you use 16-bit mode you can't launch the game in a window (you can only do that if you use 32-bit and thats slow...) - so you can't go to the game room when you are already in the AoC game lobby.
When you emulate virtual desktop (which you should), you can of course run the game windowed within your linux gui (so you can do something else while you are waiting in the AoC game lobby), however you can't go back to the game room to check if someone has left. This is a bit annoying, but not such a big deal for me...
All of the PCs I use are pretty crap though and that may also be a big factor in this... So just try the 32bit mod anyway and see how its running for you.

4.Sometimes voobly fails to launch properly.
You cant click on anything, its frozen, you can't even quit it... run:
Code:
$ wineserver -k
and then start it again (double click the [You must login to view link])
Apparently this happens when you do some other stuff while voobly is starting up. So if you want to avoid it do not touch your mouse and keyboard (and whatever other input devices you might have...) until voobly is fully loaded.

5. Troubles with the web browsers.
You may have noticed, that the build-in web browser in voobly game browser isn't working (voobly freezes when you click a link or try to enter an adress). This is an annoyance mainly if you want to install a mod and can't do it simply buy clicking the download button in voobly mod central. However when you enter a game room with a game mod set, it will install fine and you can still install mods manually by copying them from another computer, they are located in the "voobly mods" directory located in the main AoE2 directory (where AoE2.exe - AoK is located).
This can generally be fixed by installing a web browser within wine, however simply installing IE or Firefox within wine doesn't work every time, there appears to be a lot of stuff happening in the background (which I don't understand) and the outcome may depend on the particular browser (and its version) as well on what other software you have installed and set up in wine. Though if you are persistent and just stick to the mighty trial and error method, you should be able to eventually get it working properly....

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...).

6. Problems with spectator mods
This is related to problem 3. as when i use 16bit color in game both spectator dashboard and spectator overlay don't work for me, they only work in 32bit (and thats slow...). Trying to use the dashboard makes the screen all black and trying to use the overlay just crashes the game. Strangely though the spec. overlay works fine on my laptop even with 16 bit colors, it only crashes the game on my desktop PC (which is set up the same way as the laptop, has a different hardware though - ofc).

7. Network communication sometimes fails
This one is the most annoying and I don't think it can be fixed (without finding out why exactly this happens and making changes in wine-staging to fix this...)
Sometimes, after running voobly for a while the network communication suddenly fails (it says it can't communicate through port 16000 ... try port forwarding ... blablabla...) and you are FP to everyone, even though everything was fine before. It seems to happen when you leave voobly running in background and don't play anything for a while. It never happens when you are already playing or when you are already in a game room.
When this happens you can't connect to any more games (you will always be fp). You have to restart wineserver and start voobly again (same as bug 4).
Link | Reply | Quote
 +[email protected]


Group: Server Administrator
Join Date: 3 October 2007
Posts:6411
Posted 31 March 2015 - 5:25 pm
Thanks for the howto, I am gonna test this on my Debian machine later. :)
Link | Reply | Quote
 ramesh_


Group: Standard Membership
Join Date: 19 December 2014
Posts:1
Posted 21 April 2015 - 3:52 pm
First off, thanks for posting this. I didn't realize there was a way to use Voobly on Linux using wine (or wine-staging). This method works well (of course, as the OP states, there is a slight problem with current wine-staging versions).

This works with any Linux distribution if you use PlayOnLinux (I am using ArchLinux 64bit right now). Here are a few notes:
  • It may not be obvious, but before trying this, make sure all wine dependencies are installed. For example, there are a number of wine depends for both 64bit and 32bit (lib32) on Arch. Make sure you install them.
  • In PlayonLinux, when creating a container, be sure to select the 32bit 1.7.38-staging version of wine. I don't think it works on any other newer version, but since you can download the version, select this one.
  • Install AOE2, the Conqeurors, Voobly, and directplay as the OP says using PlayonLinux into the container you use,
  • Make a shortcut for Voobly using the "Make Shortcut" tool for the container configuration. Once you have made the shortcut, place this line under the Voobly shortcut's "Miscelleneous" tab "Command to exec before running the program": export STAGING_WRITECOPY=1
  • I've had a few issues using Gnome Shell with Voobly (sometimes when a game starts the cursor will get stuck, and you will need to kill wine). I have had better success on lightweight desktops.

I think this method still works if you use 1.7.38 of the staging version of wine. I do believe the PPA mentioned above updates to the latest wine version. I suppose one day we should let the wine developers know about the bug in staging, but for now, this will work.

Let me know if you need any clarification on this.
Link | Reply | Quote
 +kitt


Group: Systems Operations
Join Date: 13 January 2008
Posts:14015
Posted 21 April 2015 - 11:48 pm
hi
thanks for that.
Link | Reply | Quote
 LOD_mantis


Group: Standard Membership
Join Date: 3 April 2010
Posts:112
Posted 30 May 2015 - 10:12 am
With bug #1 I find that if I dont move the mouse at all until Voobly has fully loaded it will not freeze. So the solution is to start Voobly, keep your hand off the mouse and let it do its thing. When it's finished and you can see Error 1010: access denied, you can start using normally.
Link | Reply | Quote
 M1sterNinja


Group: Standard Membership
Join Date: 31 March 2015
Posts:2
Edited 18 October 2015 - 12:26 am by M1sterNinja
Hi I'm in Ubuntu and I got to step 6. For me the voobly folder was in Program Files (x86) so I changed that, but I still get this message. Also there is no wine voobly.exe in the wine-staging bin. Thanks in advance, for anyone who helps. : )
Code:
[email protected]:/opt/wine-staging/bin$ /home/steven/Desktop/voobly.sh /bin/bash: export STAGING_WRITECOPY=1 && cd /home/steven/.wine/dosdevices/c:/Program\ Files\ \(x86\)/Voobly/ && /opt/wine-stag: No such file or directory
Link | Reply | Quote
 [LyF]karyk


Group: Standard Membership
Join Date: 4 June 2013
Posts:33
Edited 18 October 2015 - 10:36 pm by [LyF]karyk
Hi I'm in Ubuntu and I got to step 6. For me the voobly folder was in Program Files (x86) so I changed that, but I still get this message. Also there is no wine voobly.exe in the wine-staging bin. Thanks in advance, for anyone who helps. : )
Code:
[email protected]:/opt/wine-staging/bin$ /home/steven/Desktop/voobly.sh /bin/bash: export STAGING_WRITECOPY=1 && cd /home/steven/.wine/dosdevices/c:/Program\ Files\ \(x86\)/Voobly/ && /opt/wine-stag: No such file or directory

Provided you have voobly installed in "~/.wine/dosdevices/c:/Program Files (x86)/Voobly" and wine-stagging installed "/opt/wine-staging/bin" (default) the .sh File should look EXACTLY like this:
Code:
#!/bin/bash export STAGING_WRITECOPY=1 && cd /home/steven/.wine/dosdevices/c:/Program\ Files\ \(x86\)/Voobly/ && /opt/wine-staging/bin/wine voobly.exe
And ofc remeber to make the file executable...
I have 32bit system so i have 32bit wine also, I´m not sure if it will work in 64bit version, so if it doesn´t just use 32bit wine prefix (google how to set the prefix if you don´t know...). I can also confirm that the current latest wine-staging version is working fine as i am using it right now. Some other tutorials are doing the same thing as this one, but they are using the PlayOnLinux GUI, so you can also try that...
Link | Reply | Quote
 M1sterNinja


Group: Standard Membership
Join Date: 31 March 2015
Posts:2
Posted 26 October 2015 - 9:56 am
Thank you for your help. My file did not have the line breaks, and the problem seemed to have cleared up after inserting them.

The game would launch, and have the in-game lobby, but would always crash from there. The game would always crash with the 1.4rc patch, but not with the earlier versions. Reinstalls did not seem to fix it. ¯\_(ツ)_/¯
Link | Reply | Quote
 [LyF]karyk


Group: Standard Membership
Join Date: 4 June 2013
Posts:33
Posted 27 October 2015 - 4:43 am
Thank you for your help. My file did not have the line breaks, and the problem seemed to have cleared up after inserting them.

The game would launch, and have the in-game lobby, but would always crash from there. The game would always crash with the 1.4rc patch, but not with the earlier versions. Reinstalls did not seem to fix it. ¯\_(ツ)_/¯

Yes i forgot about that, that actually happened to me as well. It has to the with the resolution.
Solution is simple, start AoC (the age2_x1.exe - in clasic wine or staging - it shouldnt matter), select the 1.4 patch, than in options in the game menu change the resolution to 800*600, than launch any game (or rec) and change to whatever resolution you want to use directly in the game. U only need to do this once, after that it will work fine and will launch with that resolution (on voobly or offline, it doesnt matter).
Link | Reply | Quote
 L0rn


Group: Standard Membership
Join Date: 14 November 2015
Posts:3
Posted 15 November 2015 - 12:40 am
Hello,
I did everything as you wrote but when i doubleklick voobly, it opens PyPar2. I don't know how to open it correctly to execute it.
Link | Reply | Quote
 +[email protected]


Group: Server Administrator
Join Date: 3 October 2007
Posts:6411
Posted 15 November 2015 - 2:51 pm
Provide a screenshot please? Along with the usual technical information... which distro... and what exactly you were doing, when it failed.
Link | Reply | Quote
 L0rn


Group: Standard Membership
Join Date: 14 November 2015
Posts:3
Posted 15 November 2015 - 4:19 pm
I use Ubuntu 15.04.
the path of your bash script says "/opt/wine-staging/bin/wine voobly.exe" but in my bin directory is no voobly.exe. Do I have to take the exe in the directory first?
If you right-click on [You must login to view link], there is the "open with" option - what should I choose to open with?
Sorry for bad english
Attachments:

Link | Reply | Quote
 +[email protected]


Group: Server Administrator
Join Date: 3 October 2007
Posts:6411
Posted 15 November 2015 - 4:29 pm
Use the PlayOnLinux Framework mate and then use the pre-defined paths. This will work 100%.
Link | Reply | Quote
 L0rn


Group: Standard Membership
Join Date: 14 November 2015
Posts:3
Posted 15 November 2015 - 6:49 pm
Ok, thanks, I will try later
Link | Reply | Quote
 [LyF]karyk


Group: Standard Membership
Join Date: 4 June 2013
Posts:33
Edited 16 November 2015 - 12:09 pm by [LyF]karyk
L0rn wrote:
I use Ubuntu 15.04.
the path of your bash script says "/opt/wine-staging/bin/wine voobly.exe" but in my bin directory is no voobly.exe. Do I have to take the exe in the directory first?
If you right-click on [You must login to view link], there is the "open with" option - what should I choose to open with?
Sorry for bad english

Are you sure the paths are correct? - Do you have 32 or 64 bit system? If you have 64 bit you will automatically get 64 bit wine as well so the path will be a bit different (with Program Files x86, see previous posts...). Check if all the files are actually where there are supposed to be (and change the path in the .sh accordingly if they are somewhere else - i never used ubuntu 15, its possible that wine-staging will install somewhere else than on 14 by default...).
Also have you made the .sh executable? - I think in unity you can do it by right clicking the file, go to properties->permissions and select "alow this file to run as a program" or sth similar as that...
You can also forget the .sh file and just enter the commands one by one into the terminal, see what that will tell you.
Also, as mentioned before, you can use the playonlinux gui. To be honest I´m not a big fan of it, and I don´t think it´s useful at all (maybe aside from having all kinds of different wine versions easily accessible, but i never needed more than two wine versions installed anyway...). Anyway, playonlinux seems to work out for some ppl, so it might work for you as well.


Link | Reply | Quote
[1]23
Displaying 1 - 15 out of 35 posts
Forum Jump:
1 User(s) are reading this topic (in the past 30 minutes)
0 members, 1 guests

Most active threads in past week: