<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>JpegServ Weblog&#187; Games</title>
	<atom:link href="http://jpegserv.com/?feed=rss2&#038;cat=59" rel="self" type="application/rss+xml" />
	<link>http://jpegserv.com</link>
	<description>GPL Images and Code</description>
	<lastBuildDate>Sat, 18 Jul 2009 21:19:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Getting sound to work with the age of empires 2 no-cd patch</title>
		<link>http://jpegserv.com/?p=189</link>
		<comments>http://jpegserv.com/?p=189#comments</comments>
		<pubDate>Sat, 07 Mar 2009 21:30:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[age of empires 2 the conquerors]]></category>
		<category><![CDATA[age of empires 2 the conquerors expansion]]></category>
		<category><![CDATA[aoe2]]></category>
		<category><![CDATA[comand line]]></category>
		<category><![CDATA[command line utilities]]></category>
		<category><![CDATA[environment variables]]></category>
		<category><![CDATA[es]]></category>
		<category><![CDATA[game music]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mplayer]]></category>
		<category><![CDATA[system32]]></category>
		<category><![CDATA[windows xp]]></category>
		<category><![CDATA[wine]]></category>

		<guid isPermaLink="false">http://jpegserv.com/?p=189</guid>
		<description><![CDATA[j++; if(j == 1 &#124;&#124; j == 2 &#124;&#124; j ==3) document.write(' '); This article is about getting sound working with the no-cd patch for age of empires 2 &#8211; The Conquerors expansion pack. I like to play games on my PC but I don&#8217;t like having to keep changing cds so I use no [...]]]></description>
			<content:encoded><![CDATA[<p>
<!-- Begin Google Adsense code -->
<div style="float: right; width:300px; height:250px; margin:5px 5px 5px 5px; ">
<script type="text/javascript"><!--
	google_ad_client = "pub-4362190332215502";
	/* 300x250, created 11/29/08 */
	google_ad_slot = "2817087570";
	google_ad_width = 300;
	google_ad_height = 250;
	//-->
</script>
<script language="JavaScript">
	j++;
	if(j == 1 || j == 2 || j ==3)
 document.write('<div class="advert"><scr' + 'ipt type="text/javascript" ' + 
 'src="http://pagead2.googlesyndication.com/pagead/show_ads.js"' +'>  </scr' +'ipt></div>');
</script>
</div>
<!-- End Google Adsense code -->
</p>
<p>This article is about getting sound working with the no-cd patch for age of empires 2 &#8211; The Conquerors expansion pack. I like to play games on my PC but I don&#8217;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</p>
<p><strong>Under Windows</strong></p>
<p>The first thing you need to do is get the mp3, you can get this here;</p>
<p><a href="http://thepiratebay.org/torrent/4445158/Age_of_Empires_II_-_The_Age_of_Kings_-_Soundtrack" target="_blank">TPB &#8211; age of empires 2 music</a></p>
<p>Then you have to get two command line utilities;<br />
<em><strong></strong></em></p>
<p><em><strong>SMplayer</strong></em><br />
<a href="http://smplayer.sourceforge.net/downloads.php" target="_blank"></a></p>
<p><a href="http://smplayer.sourceforge.net/downloads.php" target="_blank">smplayer</a> &#8211; get the &#8220;package with installer&#8221; version</p>
<p>This application will be used to play the mp3 file. Create the following folders;</p>
<p>c:\scripts and c:\scripts\command</p>
<p>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;</p>
<p>Start &gt;  Settings &gt; Control Panel &gt; System &gt; Advanced &gt; Environment Variables</p>
<p>change from</p>
<p><code>%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;</code></p>
<p>to;</p>
<p><code>%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\scripts\command</code></p>
<p>note that all we are doing here is adding &#8220;;C:\scripts\command&#8221; to the end.</p>
<p><center><br />
<div id="attachment_194" class="wp-caption alignnone" style="width: 310px"><a href="http://jpegserv.com/wp-content/uploads/2009/03/aoe.jpeg"><img class="size-medium wp-image-194" title="aoe" src="http://jpegserv.com/wp-content/uploads/2009/03/aoe-300x197.jpg" alt="Getting to the section where you set the environment path" width="300" height="197" /></a><p class="wp-caption-text">Getting to the section where you set the environment path</p></div></p>
<p><div id="attachment_195" class="wp-caption alignnone" style="width: 260px"><a href="http://jpegserv.com/wp-content/uploads/2009/03/aoe2.jpeg"><img class="size-medium wp-image-195" title="aoe2" src="http://jpegserv.com/wp-content/uploads/2009/03/aoe2-250x300.jpg" alt="setting windows XP the environment path" width="250" height="300" /></a><p class="wp-caption-text">Setting the windows XP environment path</p></div><br />
</center></p>
<p>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;</p>
<p><center><br />
<div id="attachment_198" class="wp-caption alignnone" style="width: 310px"><a href="http://jpegserv.com/wp-content/uploads/2009/03/mplayer.jpeg"><img src="http://jpegserv.com/wp-content/uploads/2009/03/mplayer-300x209.jpg" alt="copy the mplayer executable and deps" title="mplayer" width="300" height="209" class="size-medium wp-image-198" /></a><p class="wp-caption-text">copy the mplayer executable and deps</p></div><br />
</center></p>
<p>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;</p>
<p><center><br />
<div id="attachment_200" class="wp-caption alignnone" style="width: 310px"><a href="http://jpegserv.com/wp-content/uploads/2009/03/mplayer-command.jpeg"><img src="http://jpegserv.com/wp-content/uploads/2009/03/mplayer-command-300x153.jpg" alt="Mplayer command in windows" title="mplayer-command" width="300" height="153" class="size-medium wp-image-200" /></a><p class="wp-caption-text">Mplayer command in windows</p></div><br />
</center></p>
<p><em><strong>pskill</strong></em></p>
<p>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;</p>
<p><a href="http://technet.microsoft.com/en-gb/sysinternals/bb896683.aspx" target="_blank">pskill</a></p>
<p>To install it unzip the file and copy the contents of it&#8217;s folder to the c:\scripts\command folder. The first time you use it it will ask yo to accept a eula. execute the &#8220;pskill&#8221; command (in dos) to get this out of the way now.</p>
<p><em><strong>Move the mp3</strong></em></p>
<p>Now that&#8217;s done, you should create the following folder;</p>
<p>c:\scripts\data</p>
<p>and move the mp3 to there and rename it to &#8220;aoe.mp3&#8243;</p>
<p><em><strong>Create the script</strong></em></p>
<p>To create the final script, open notepad and write the following;</p>
<p><code>start mplayer -loop 0 c:\scripts\data\aoe.mp3<br />
cd "\Program Files\Microsoft Games\Age of Empires II\age2_x1\"<br />
age2_x1.exe -nostartup<br />
pskill mplayer<br />
</code></p>
<p>Then save the file as &#8220;c:\scripts\aoe.bat&#8221;, 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&#8217;s under right click the games shortcut, select properties and click find target.</p>
<p>The script works like this; it starts playing the file with mplayer in a separate process (that&#8217;s why &#8220;start&#8221; is used), then it starts the game once the games window is closed it kills mplayer stopping the music.</p>
<p>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 &#8220;The Conquerors&#8221; for example. Then right click the shortcut, select properties and select the change Icon option;</p>
<p><center><br />
<div id="attachment_208" class="wp-caption alignnone" style="width: 310px"><a href="http://jpegserv.com/wp-content/uploads/2009/03/shortcut.jpeg"><img src="http://jpegserv.com/wp-content/uploads/2009/03/shortcut-300x225.jpg" alt="Change shortcut Icon" title="shortcut" width="300" height="225" class="size-medium wp-image-208" /></a><p class="wp-caption-text">Change shortcut Icon</p></div><br />
</center></p>
<p>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&#8217;s not perfect but it beats playing in silence.</p>
<p><strong>Under Linux</strong></p>
<p>Install mplayer with you distros package manager or from source, download the mp3 file;</p>
<p><a href="http://thepiratebay.org/torrent/4445158/Age_of_Empires_II_-_The_Age_of_Kings_-_Soundtrack" target="_blank">TPB &#8211; age of empires 2 music</a></p>
<p>install the game with wine and use a script similar to this to play</p>
<p><a href="http://jpegserv.com/linux/aoe" target="_blank">LINK</a></p>
<p>Edit the script to suit your situation. You can probably setup the icon with your DE but I use a window manager so I&#8217;m not too concerned with icons.</p>
]]></content:encoded>
			<wfw:commentRss>http://jpegserv.com/?feed=rss2&amp;p=189</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
