Making the [furryclan] uniform

Hacking the .gsm files

Obsolescence alert!

This entire section is now redundant. Use [furrycat]'s gsmhacking tool to alter texture names without the hassle of hexediting! This is also discussed in the uniform HOWTO. Nevertheless, hardcore techies might like to continue reading in order to get a feel for working with "raw" .gsm files.

This section will probably be a bit confusing at first. Please read it through all the way and then start again at the beginning. It should all make sense the second time through...

Each [furryclan] member's uniform is associated with a .gsm file. .gsm files are generated by 3D Studio Max. They contain data about the structure of the 3D model used for the skin and the textures that are mapped on to the model.

We don't have 3D Max so we have to hack the .gsm files in a hex editor.

We took the swt_elem_high.gsm file from the swatdata1.res archive in the game directory. The .res files are nothing other than standard zip files with a different extension. You can load them into Winzip and play around with the files in the archive. Here's a screenshot of the XVI32 hex editor looking at swt_elem_high.gsm. You can get this cool editor at for free...

xvi32 - before

If you look at the .gsm file you will see it contains a whole load of binary data with some plain text thrown in. Looking at the picture above you can see that much of the plain text forms filenames. It isn't hard to guess that these are the filenames of the texture files that are mapped on to the 3D model.

Without knowing about the internal structure of .gsm files it is difficult to know what these filenames refer to exactly but it isn't hard to guess. In the screenshot above we see the name SWT_PARTS.bmp occurring several times. A bit of experimentation reveals that the SWT_PARTS.bmp file contains several textures in one file. No doubt the various occurrences in the .gsm file are also linked to co-ordinates in the bitmap where the textures are found. We don't know this but we don't need to. We will just replace ALL occurrences of SWT_PARTS.bmp with another filename and add a file with that new name to our mod!

The convention we used for the [furryclan] uniform is the following. We replace all occurrences of SWT_PARTS with SWT_fcpXX, where XX is the unique per-member number referred to in part one of this guide. So [furrycat]'s SWT_PARTS becomes SWT_fcp01, [Longbow]'s becomes SWT_fcp02 and so on. Incidentally, the p in fcp refers to PARTS.

xvi32 - after

As you can see from this screenshot, we also changed SWT_VEST2 to SWT_fcvXX (v for vest), SWT_LEGS2 to SWT_fclXX, SWAT_NAME to SWT_fc_N (OK you can't see that in the screenshot) and SWT_HELMET to SWT_fcheXX. The name and helmet are special cases. Since, in general, binary files are expected to be of a certain form and deviation from that expected form will confuse the program reading them (in this case, the game) we cannot add or remove characters from the filenames in the .gsm file. This means that instead of using SWT_fchXX we need to use SWT_fcheXX, as fcheXX has 6 letters, like HELMET.

With all these changes, we sometimes use an XX value of 00. This serves two purposes. Firstly it is used as a "general" value for all members. For example, all members wear the same helmet so it's pointless adding one helmet file to the mod for every member if they're all going to be identical. We use helmet 00 for everyone here. 00 also refers to files related to the [furryclan] guest skin.

Once we've edited the .gsm files (making the same changes to the _low version too...) we need to add the files we've referenced to our mod. This means, for instance, that we need to make a bitmap file with the textures for each member's trouser legs and call it SWT_fclXX.bmp.

Part three explains how we did this.


Bear in mind when you're hacking around with .gsm files that these filenames tend to occur right at the end of the file. Use your hex editor's search features...

Of course you don't have to change all these if you don't want to. We wanted individal uniforms (if that isn't a contradiction in terms) for each member so we need a whole bunch of different files. If you're making your first mod and all you want to do is make your officers wear yellow trousers then you need only change the legs definitions and keep everything else the same.

On to part three: creating the bitmaps.

Jump to a section

intro | part 1: Editing the .dat files | part 2: Hacking the .gsm files | part 3: Creating the bitmaps | part 4: The DEBRIEF_UI and DEF_UI pictures | part 5: The [furryclan] female guest skin | part 6: Download and quiz