Star Wars: Galactic Battlegrounds Tools

The Imperial Airbase from SWGB. Note the fine quality.

SWGB is a great game, even if it was published by Microsoft.
It is quite possible to play SWGB on Linux, with MOL, I can play the Mac version without rebooting into Mac OS.
At any rate, I wanted to mod SWGB, but alas, all the tools to make and unmake DRS files were for Windows (bletch).

DRS


Now, as a programmer in possesion of a spec for the DRS datafiles used by SWGB (And Age of Kings, I belive), I wrote a humble python script to extract the files from a drs. And here it is:
DRS Info

Usage is simple. It's a command-line program that should work on any UNIX-Like OS, such as Mac OS X or Linux. It probably works on Windows as well, but I don't have any perticular desire to test that. Note that, out of the box, it may only work with SWGB, as the length of the copyright string is diffrent between AOK and SWGB.
Anyway, to make it give you helpful info about a DRS file, use it thusly:
$ ./drs_info.py ADRSFILE.DRS
If you want it to do something really useful, such as expanding the DRS into it's component files, it works like this:
$ ./drs_info.py --dump /destination/directory/for/dumps/ /path/to/the/DRS.DRS NameOfDirectory
Where NameOfDirectory is a subdirectory that will be created in /destination/directory/for/dumps/ into which the files from the DRS will be placed.
In the above DRS spec, it mentions a 'mystery byte', this is in fact simply the final letter of the file type, unless it's a space, in which case it means 'no third character'.

Here is a program that will make DRS files: mkdrs
Usage is simple, of course: (assuming you've put it in your /usr/bin) You can use it like this: mkdrs Directory/ NewDrsFile.DRS
It will make a drs file from all the files in the directory. DRS files have no compression so it's not exactly sutible for a general-purpose archive, but you can put non-swgb files in there if you want.

SLP

With the invaluble assistance of Brad Oliver, mac-porter of SWGB, I was able to write a Python Library for using and rasterizing SLP files. I'll write about it sometime, although it probably needs a page of it's own. In the mean time, you can get the existing Python SLP tools and library here. They extracted that lovely imperial airbase illustrating this page. This library is in the final stages of construction, but it pretty much 'works' to read SLP files at this stage. It will take some time before it can write them as well, so stay tuned. A Spec for the SLP files is here - it is pretty good, and between it and the code I'll eventualy post, you should be able to understand the format.

Enjoy.
Home