Saturday, January 22, 2011

Modding Gratuitous Space Battles

I am a gamer, a tinkerer and a programmer. This led me to dabble in game development (I started my own game development company, but that hasn't gone anywhere... where does the time go?) and to try my hand at modding videogames. While some major videogame companies will create a game and then make editing tools available so players can make their own maps, scenarios or what-not, my favorite games to mod are often games by indie developers which don't have game editing tools, but do little to nothing to obscure their art assets and other interesting files. I enjoy spelunking through the files to find out what makes a game tick and then changing those files to customize the game.

I recently reviewed Gratuitous Space Battles: Collector's Edition, and enjoyed it quite a bit. In fact, I asked Psibabe to request it for me after seeing an banner ad for it and checking the game out. The idea of creating my own space ships and then pitting fleets of them against a rival fleet seemed like it would be fun, and the fact that you have to predetermine your tactics before the battle begins, by giving your units "Orders" only sweetened the deal, in my eyes. However, I was a little bit disappointed to find that I was only able to outfit my own ships from the included hulls; I couldn't design ships that looked like whatever I wanted.

This was quickly alleviated, however, when I poked around the files. I was quickly able to locate where backgrounds were kept, and just as quickly able to use Google to locate some amazing deep space photography I could use as backgrounds. I was able to find where the name randomizers were located and very quickly able to follow the format of the name choice list to make my own, adding in one for Star Wars names, Klingon Names, the elements, and US Battleships. The existing randomizers could be modified just as easily.

I also located the images for the ships. These came in three flavors: the ship itself, the ship with battle damage, and a burnt-out hull. A few minutes on Google and I had found a good top-down image of the Millennium Falcon. I cropped, rotated, cleaned up and scaled the image to match that of an existing Crusier (the Rebels' Minotaur) and created my own damaged and burnt-out hull versions. I then replaced the files for one of the ships with my own versions (and moved the original copies into a different folder structure for safe keeping) and voila! The Minotaur hull now looked uncannily like a Corellian freighter that any scruffy-lookin' nerf herder might own.

This was all well and good, but this ship simply putted around the battlefield. I expected a bit more speed from the Falcon, so I copied and edited one of the Cruiser engines. I started with the top notch engine and from there, added a zero to the end of the speed value, bumping it up a level of magnitude. I saved that with a new name (I christened it the "Infinity Drive") and loaded the game up to give it a test. It was there, it looked just like the engine I'd copied it from (I didn't change the icon), and... it was locked. Nice. The game keeps track of what you've gotten access to and if anything new shows up, it's locked until you buy it with "Honor" (a "currency" gained by winning battles decidedly). This wasn't a problem, as I had already cloned and modified a level, upping my budget but not modifying the enemy forces, resulting in a major victory and enough spending cash to finish unlocking whatever I had left to unlock at the time. So, after buying my engine, I swap it into my Millennium Falcon and give it a spin. It's faster. (Duh - about 10 times faster) But, somehow... it's still not quite got the "oomph" I wanted. No problem; I exit the game, add another zero at the end, save my engine and return for another shot. This time, the Falcons (betcha can't deploy just one) are out-pacing the fighters. I gave a few of them orders to "Keep Moving" and let them loose on a much larger opposing force and watched gleefully as everything that shot at them missed woefully. My fleet of Falcons were pretty much spinning like tops, but they were making swiss cheese (you know, the kind with holes) out of the enemy.

That's where I stopped. For now. I had finished my review, and as a game reviewer, I rarely get to revisit even my old favorites. However, I think I might look into creating an expansion pack for Gratuitous Space Battles... or, perhaps, an editor of some sort. It would be a nice game dev-ish programming project. Oh, and, no... don't expect to see me come out with a Star Wars expansion pack... I believe in licenses. What you roll up and mod for your own enjoyment is one thing, but selling - or even giving away - someone else's intellectual property is just wrong. I am sure that (if they decided to) Lucas Arts could make a much better Star Wars expansion pack for Gratuitous Space Battles than I could.

At any rate, it was really interesting to see how dynamically coded Gratuitous Space Battles is. Getting a level to show up in the level list is a matter of making a level configuration file and putting it in the correct folder. Adding a random name generator is as simple as duplicating the format with your own list and saving it in the right place - the name that shows in the game is the filename of the random name file. Simplicity itself. The backgrounds are easy to simply drop in. The ships images are easy to add, and, once in place, some animations (such as the particle effects on the damaged ships and the parts of the broken hull rotating aimlessly - and separately) are simply taken care of behind the scenes. The engine I made showing up to be bought is another example... this game has a lot of automation in putting gaming assets in to play. This makes it really easy to mod - for the player community or, for that matter, for the developers.

For the joy of playing and ease of modding Gratuitous Space Battles, I say "Kudos" to Positech Games!