Getting sound to work with the age of empires 2 no-cd patch
So I’ve been told by many of my readers that this guide is crazy.
Well yeah I sort of a agree but the solutions that they are suggesting are very manual, using a media player would require that you keep the AOE sound track in your playlist… computers are supposed to automate repetitive tasks to make our lives easier, yeah sure this method requires some up front effort but at least it doesn’t require additional effort each time you decide to play the game. with this method you just click the icon and away it goes.
I think that this method also gives you some idea of what is going on in your computer, yeah I could have provided you with an .exe but that could have contained anything the long and short of it is that you don’t or at least shouldn’t trust me as I’m just some guy with a website, so it would be inappropriate to provide an executable.
This article is about getting sound working with the no-cd patch for age of empires 2 – The Conquerors expansion pack. I like to play games on my PC but I don’t like having to keep changing cds so I use no cd patches to get the games to run without the cd. The problem with this is sometimes, the music for the games is stored on the cd, to solve this problem I will be using some popular comand line applications and a script
The first thing you need to do is get the mp3, you can get this here;
Then you have to get two command line utilities;
smplayer – get the “package with installer” version
This application will be used to play the mp3 file. Create the following folders;
c:\scripts and c:\scripts\command
we then need to add the c:\scripts\command directory to your users path so that the programs stored there can be used by our script. to do this;
Start > Settings > Control Panel > System > Advanced > Environment Variables
note that all we are doing here is adding “;C:\scripts\command” to the end.
Now that this step is done install smplayer as you would any other program. Then go to the directory you installed it in and copy the contents of the mplayer folder to your c:\scripts\command folder;
Now that mplayer is installed you can go to the next step. If you want to check that mplayer is installed correctly and that the path is set, open a dos prompt and type mplayer you should get this;
PSkill is a command line application that can be used to shutdown applications via the terminal, in this case we will be using it to stop mplayer at the end of the game, get it here;
To install it unzip the file and copy the contents of it’s folder to the c:\scripts\command folder. The first time you use it it will ask yo to accept a eula. execute the “pskill” command (in dos) to get this out of the way now.
Move the mp3
Now that’s done, you should create the following folder;
and move the mp3 to there and rename it to “aoe.mp3”
Create the script
To create the final script, open notepad and write the following;
start mplayer -loop 0 c:\scripts\data\aoe.mp3
cd "\Program Files\Microsoft Games\Age of Empires II\age2_x1\"
Then save the file as “c:\scripts\aoe.bat”, this saves the file as a windows batch script. It is possible that the game is under a different directory to this to find the directorty it’s under right click the games shortcut, select properties and click find target.
The script works like this; it starts playing the file with mplayer in a separate process (that’s why “start” is used), then it starts the game once the games window is closed it kills mplayer stopping the music.
Now remove the shortcut for the game from the desktop and replace it with a shortcut to the script, rename the shortcut to the script with the name of the original shortcut “The Conquerors” for example. Then right click the shortcut, select properties and select the change Icon option;
If an error comes up just click ok and when asked to select an icon, just go to the games directory and select the right icon (.ico file) and click apply/ok and you should end up with the game working with the background it’s not perfect but it beats playing in silence.
Install mplayer with you distros package manager or from source, download the mp3 file;
install the game with wine and use a script similar to this to play
Edit the script to suit your situation. You can probably setup the icon with your DE but I use a window manager so I’m not too concerned with icons.