It all began in 1999…well kind of

A while back I happened across a website that detailed instructions on how to install an old PC game called Darkstone on Windows 7 64bit. Apparently, although the game ran fine on that operating system, the games “installer” didn’t and thus you couldn’t get to the “game running fine” part.  Now I’ll admit I get a tad nostalgic towards Darkstone. I’m not even sure why, since I didn’t really play it that much. Regardless, I was driven to reinstall it and give it a whirl just for giggles.  When I did, I found that despite the very old graphics (I think it ran at 640X480 which is very low resolution by todays standards.)

I did enjoy the 1/2 hr that I played with it. But I didn’t enjoy the color scheme. It was generic and ….well.. too yellow. This got me imaging what the game would be like with a darker and more unique style to give it some character. So on a lark, I did a quick internet search to see if anyone had ever “modded” the graphics (in-game artwork). They hadn’t which was unsurprising for that era of games not named Quake or Half-life.

Here it gets a little technical so bear with me. Most games stored their art “assets” in an archive or container file. Usually just a big file containing all the individual game art files inside. I figured out that in Darkstone’s case, this file was DATA.MTF.  Many developers would use a unique file type for their “container” files, often something made up in-house. (Sometimes they even use simple encryption to make “extracting” the files with in difficult).  Another characteristic they tend to share is having a directory within the “container file” that pointed to the exact spot in said file that individual files are starts.

So if one was looking to alter the artwork of a game, they would need to “extract” the artwork either using an existing program (if there is one) or by making a program that would do that.  Many popular games have their own utilities made by the enthusiastic community but as you can imagine many older games do not (as was the case of Darkstone).

Now for whatever reason, I saw this as a challenge. I was determined to find a way to “extract” the artwork out of the MTF file that they were stored in. The problem was that I don’t know how to write a computer program. Fortunately, after more research, I found that there are some “universal” extractors that support many popular file formats targeting game archives for the purpose of modding a game.  I ended up going with Game Extractor by Watto Studios, it has not been  updated since 2009 but the game I needed it to work on was from 1999. (I have fiddled with two others that would probably do the trick too…. Dragon Unpacker and Xentax’s MultiEx Commander..more on Xentax in a bit).

The problem was that Game Extractor didn’t support Darkstone’s special MTF file format. But I saw that it supported custom script files (BMS) for unknown “archives”. A little search took me to www.xentax.com , a website with a healthy forum dedicated to the very exact problem that I was trying to solve (albeit for other games). They are also home to MultiEx Commander which apparently once include the guy who later created Game Extractor. After searching the forum, I found a message thread on how to analyze an archive and make a custom BMS script. Using a “hex editor” (if you don’t know…you don’t want to know) you can decipher pieces of the container file and figure out how it is layed out. Based on that info , you can then make a script. So I followed the detailed (and deceptively simple instructions) and was able to create my first (and only…so far) BMS script to extract files from the MTF file. AND IT WORKED! I felt very accomplished that day…and quite nerdrific. Challenge completed!Now what?

Well, I got them all out but hadn’t planned past that. I hadn’t yet quite caught the “digital art” bug yet, but it did occur to me that it’s not such a big deal if you can’t edit the files and see it in-game. I got lucky (kindof)  on this one. As a way to make “patching” a game easy, developers will usually make files “outside” the container file (usually in a specific subdirectory) override the original artwork in the container file. So you could change an “extracted” file see it in-game. But if you didn’t want it, you could just delete it and the game would default back to the “container” file.

A key factor for artwork is determining the format that the game will accept. There are many formats of image files and with each format many options to choose from (size, number of colors, color depth, compression, etc). File type is usually easy. Most games stick to common filetypes. This is determined by the image files “extenstion”. The “extension” is the three letters at the end of a filename right after the period. In the case of Word documents the “extension” is “.doc”. Occasionally (particularly with really old games), the developers will use a custom image format only the game can understand. Fortunately Darkstone use the very common TARGA (.TGA) image type….. (to be continued)

Advertisements

2 thoughts on “It all began in 1999…well kind of

  1. Would it be possible for you to share the script you made, or a link to the BMS script creation info? I’m impressed you managed to extract them! You make it sound so easy, though…

    The contents of Darkstone’s mtf files interest me, but nothing I’ve found seems to extract them (except for music and voices1).

    • Actually, I tried to replicate it and ended up finding that I used another program…Dragon Unpacker. I have to correct my post (althought the post is new, this all took place about 2 yrs ago). It works great. All files including sounds. I even have a texture mod that I’m making for it (on and off) that I’m posting my progress so far in my next entry. I’m in mid move that’s why I haven’t posted much yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s