furrycat's SWAT3 uniform HOWTO
Here I'm going to show you how to "reskin" a SWAT3 model. That means changing the textures on the model without using 3D Studio. You won't be able to alter the physical shape of the model but you can change its "clothes."
The difference between this HOWTO and the [furryclan] uniform guide is that this is a self-contained tutorial whereas the former is more of a reference. This guide gives step-by-step instructions that you can follow and end up with a working mod.
On the other hand, the [furryclan] document goes into much more detail as to what the various parts of the modding process do. Here I say "Make a vest texture" whereas there I show you how to do it.
Update: 2002-10-17
You may find GSkinViewer more convenient to use for reskinning than gsmhacking.
Before we begin
I'm going to make a few assumptions when I write this guide. First of all I'll assume that you installed SWAT3 into C:\games\SWAT3. If you have it in C:\SIERRA\SWAT3 or G:\SWAT3 or whatever, change all references to suit your copy of the game. I will refer to this directory as your SWAT directory.
Secondly I'll assume you know how to extract files from swatdata1.res as described in the customchat HOWTO. (If you have TGOTYE then the file you need is in fact swatdata.res)
Thirdly, I'll assume you know how to create and edit text files. If not, go and learn.
Fourthly, I'll assume you have got and know how to use
gsmhacking. Therefore I'm implicitly assuming
you know at least the very basics of using DOS. If not, go and learn. I won't
be covering hexediting .gsm files here. gsmhacking was written for this
purpose and is more convenient. Please note that you
will need gsmhacking 2.0 or later to follow this tutorial. To check what
version you have, type gsmhacking -V
. Download the
latest version if yours is less than 2.0. Earlier versions may not work and
can even destroy your .gsm file!
Finally I'll assume you're going to use Adobe Photoshop to edit your texture files. Replace the word Photoshop with the name of your favourite image editing software if this is not the case.
Where I refer to gsmhacking and DOS commands, I will write the commands you type
like this
and the output from the program
like this
You should enter the text written like this
exactly
as it appears here.
If you have any problems with gsmhacking, check out the troubleshooting section of the documentation.
Now let's move out!
Making the mod
Step 1: prepare your SWAT3 directory
The first thing you need to do is create a subdirectory of your mods directory to hold your mod. To do this, browse to C:\games\SWAT3\Mods and create a directory named furrytutorial.
Next you need to activate the mod (yes, I know we haven't started to make it yet). Edit swat.ini in your SWAT directory and add the line
Mods=furrytutorial
If there is already a Mods line, tack furrytutorial on to the end, like this:
Mods=Commander Pack,furrytutorial
Aside: isn't this an easier way to choose mods than using Sierra's slow mod manager?
Step 2: write the .dat files
Inside the furrytutorial directory, create a file called modmpmodels.dat and enter the following into it:
MPModels { SWT_tutorial_officer 1 $char_name_tutorial_officer }
Now create modskins.dat and enter
Skins { SWT_tutorial_officer swt_tutorial_high swt_tutorial_low sneaker 1 0 0 0 0 0 0 0 0 128 128 }
Finally create modstrings.dat and enter
Strings { char_name_tutorial_officer SWAT Officer }
If you want more information about what this stuff means, consult the [furryclan] uniform guide.
Step 3: Copy an existing model
Open swatdata1.res and find the files SWT_ELEM_HIGH.GSM and SWT_ELEM_LOW.GSM. Extract these files into the furrytutorial directory then rename them to swt_tutorial_high.gsm and swt_tutorial_low.gsm respectively.
These are the models we will be reskinning.
Step 4: list the textures used in the original models
Open a DOS box and change into the furrytutorial directory by typing this command:
cd \games\swat3\mods\furrytutorial
Your DOS window should show
C:\games\SWAT3\Mods\furrytutorial>
To get a list of all the texture files used by the model, enter the command
gsmhacking -l swt_tutorial_high.gsm
00 SWT_HELMET.bmp
01 SWT_PARTS.bmp
02 SWT_ELEM_VISOR.bmp
03 SWT_HISP_FACE.bmp
04 SWT_VEST2.bmp
05 SWT_PARTS.bmp
06 SWT_PARTS.bmp
07 SWT_PARTS.bmp
08 SWT_PARTS.bmp
09 SWT_PARTS.bmp
10 SWT_PARTS.bmp
11 SWT_LEGS2.bmp
12 SWT_PARTS.bmp
13 SWT_PARTS.bmp
14 SWT_LEGS2.bmp
15 SWT_PARTS.bmp
16 SWT_PARTS.bmp
17 SWT_PARTS.bmp
18 SWAT_Name.bmp
Step 5: create your textures
Find each of the files listed above in swatdata1.res and extract them to the furrytutorial directory.
Now edit some or all of them in Photoshop. The ones you'll almost certainly want to edit are SWT_VEST2.bmp, SWT_LEGS2.bmp, SWT_PARTS.bmp and SWAT_Name.bmp. These are the officer's vest, trousers, kit (including gloves, boots and sleeves) and logo respectively.
Do whatever kind of editing you want. Maybe change the colour or draw in some funky patterns. For the SWAT_Name.bmp logo, add your clan insignia on the bottom half, leaving room for the officer's name at the top.
Refer to the [furryclan] uniform guide for more detailed information on editing the various bitmaps.
Step 6: rename your new textures
For each of the files you edited in step four, you need to create a new file for your mod. You can name these new files anything you want but in keeping with the spirit of things thus far, let's name them tutorial_vest.bmp, tutorial_legs.bmp, tutorial_parts.bmp and tutorial_name.bmp.
Step 7: edit the .gsm files
Now you need to change the texture names referenced in the swt_tutorial_high.gsm file. To do this, type:
gsmhacking -r SWT_VEST2.bmp tutorial_vest.bmp -o swt_tutorial_high.gsm SWT_ELEM_HIGH.GSM
replaced 1 occurrence of SWT_VEST2.bmp
gsmhacking -r SWT_LEGS2.bmp tutorial_legs.bmp swt_tutorial_high.gsm
replaced 2 occurrences of SWT_LEGS2.bmp
gsmhacking -r SWT_PARTS.bmp tutorial_parts.bmp swt_tutorial_high.gsm
replaced 12 occurrences of SWT_PARTS.bmp
gsmhacking -r SWAT_Name.bmp tutorial_name.bmp swt_tutorial_high.gsm
replaced 1 occurrence of SWAT_Name.bmp
Repeat the procedure for the low polycount model by substituting low for high in the commands above.
Of course, if you didn't edit a file there's no need to change it in the .gsm if you don't want to. It is a good idea to simply rename the file and make the edit anyway, otherwise people who make badly-behaved mods may mess up your own.
Step 8: create Ops and Debrief images
Make a 48x48 bitmap called SWT_tutorial_officer_DEBRIEF_UI.bmp. This is the image that will be shown next to your character on the debrief screen.
Make a 124x198 "action shot" bitmap called SWT_tutorial_officer_DEF_UI.bmp. This is the image that will be shown on the gear selection screen in Ops.
Refer to the
[furryclan] uniform guide
for more information on the DEBRIEF_UI and DEF_UI pictures. The essential
thing to note is that you called them
SWT_tutorial_officer_DEBRIEF_UI.bmp and
SWT_tutorial_officer_DEF_UI.bmp because the name of the skin
in modskins.dat
was SWT_tutorial_officer.
Step 9: test
Delete any of the files from swatdata1.res you didn't modify and start SWAT. In Ops, you should be able to choose your new SWAT officer in addition to the usual skins.
Step 10: make your mod into a zip file
Zip up your furrytutorial directory. Do not call
the zip file furrytutorial.zip
. Choose a different name from the
directory you had. Now edit swat.ini again. Change
furrytutorial
to whatever you named your zip.
Step 11: test again
Shut down SWAT and start it again. The mod should work exactly as it did before. The difference is you're using the zipped mod (which you can distribute) instead of the directory version.
If you don't like the uniform
You can skip back to step five if you aren't happy with the way your skin looks. There's no need to restart SWAT unless you edit the .gsm files again. In that case, you MUST shut the game down and restart it.
If you do like the uniform
If you're happy enough with your new mod that you want to release it to the SWAT3 community at large, that's great! But before you do, take the time to rename all the files. If everyone released their mod with the same filenames (swt_tutorial_high.gsm etc) then there would be a lot of conflicting mods out there...
Recommended reading
The [furryclan] uniform guide has lots more information on making skins. There's also the tips and tricks section of this site. My gsmhacking tool has its own reference page which details all of the options you can pass to it.
This HOWTO was intended as a quick guide to getting some sort of skin up and working with the minimum of fuss. Read the documentation above to get a better understanding of what you're actually doing.
Feedback
As usual, you can send feedback to swat3@furrycat.net. If you need extra help, feel free to ask but remember to tell me what you've read and exactly what it is you didn't understand. That way I can make the guide better. Mails asking "Can you tell me how to make mods?" will be ignored with extreme prejudice.