S  W  A  T   3   M  O  D    H  Q    
INTRODUCTION COMMON TASKS CREATING CONTENT PROVIDED TOOLS
New Ammo
New Weapons
New Camos

Creating New Weapons

Adding weapons to SWAT3 is a 6-step process:

 

1 - Creating the Weapon Model and Texture

The weapon model is the definitive starting point for creating new weapons in SWAT3. To create a weapon model, you will need to use 3D Studio Max and the SWAT3 .gsm exporters. For information on how to model weapons so that they'll appear correctly in SWAT3, see the Creating Content - Characters / Models section.

Once you have the model and texture, you may name the model whatever you wish (though the textures must not be renamed, as they are linked directly in the .gsm file); the model will be linked manually in skins.dat. Necessary data file editing will be explained in detail at the final step.

 

CREATION CHECKLIST

File To Create What To Create File With More Info?
Magazine .gsm model 3D Studio Max / GSM Exporter Creating Content - Models
Magazine .bmp texture Graphics Editor Creating Content - Models
Weapon .gsm model 3D Studio Max / GSM Exporter Creating Content - Models
Weapon .bmp texture(s) Graphics Editor Creating Content - Models

 

2 - Creating the Preview Bitmap

This example is of the preview bitmap for the M4/ACOG variant. All preview bitmaps are to be 308 x 96 bitmaps, must be a .bmp file, and must follow a particular naming convention.

The naming convention is as follows:

wp_<internal name of weapon>_preview.bmp

The <internal name of weapon> will be the internal name of the weapon you add into guns.dat and will be referenced frequently, though never displayed to the player. Choose a non-spaced, small string. For this particular preview above, the name is wp_m4_a_preview.bmp, and the internal name is "m4_a".

Included below is an empty preview picture bitmap that you may add your new weapons to and save out to keep your weapon true to the SWAT3 interface style:

 

Empty Preview Picture : EmptyPreviewPic.bmp

 

CREATION CHECKLIST

File To Create What To Create File With More Info?
Weapon preview .bmp graphic Graphics Editor

-

 

3 - Creating the UI Bitmap

The UI Bitmap refers to the bitmap that is broken into three parts and displayed, in one form or another, when the player accesses their weapons status screen during the game. This is done by default by pressing the SPACE BAR.

This bitmap is a specially-formatted graphic that is split into three equal parts by SWAT3 upon loading. The graphics represent, from left to right, Weapon Not Selected, Weapon Selected, Weapon Disabled.

There are four considerations when creating this bitmap:

1. The total size of the bitmap is 234 x 31 pixels. It must be a .bmp file.

2. The transparencies in this image are marked by light magenta pixels (RGB 255,0,255), so make sure to mark any pixels that aren't actually part of your graphic with this exact color.

3. You have a limited amount of space for each piece of the graphic. You MUST include a vertical line of transparency on either side of each piece of the graphic, and you have 77 pixels across in which to fit each piece of the image.

4. The small gray boxes on the lower-left must be preserved, they are used to display the keyboard key associated with the weapon.

 

CREATION CHECKLIST

File To Create What To Create File With More Info?
Weapon UI Strip .bmp Graphic Graphics Editor

-

 

4 - Creating the Reticules

The reticules are the small icons that appear in the center of the screen that indicate where your player is aiming. For weapons, there are four possible types of reticules (examples shown are from the M4/ACOG variant):

 

Weapon Active

Weapon Disabled

Zoom Active

Zoom Disabled

 

There are three primary considerations:

1. The reticule bitmaps are 57 x 57 and the actual point of aim is at the very center of this image. It must be a .bmp file.

2. The reticules use the light magenta color (RGB 255,0,255) as transparency, so use that to insure that your reticule uses this color to mask any pixels that are not part of the actual reticule.

3. The standard color for disabled weapons is gray, around RGB 94,94,94. It would be best to stay consistent, so that it's clear when the weapon is active and when it is disabled.

If you are creating zoom reticules, they will only activate if the weapon's zoom feature is activated; this requires a zoom level of greater than 1.0 for the weapon in guns.dat Data file linkage will be explained later.

Once these images are created, you may name them whatever you wish; since they are linked in manually in the items.dat file. 

 

CREATION CHECKLIST

File To Create What To Create File With More Info?
Standard Reticule .bmp Graphic Graphics Editor

-

Disabled Reticule .bmp Graphic Graphics Editor

-

Zoom Reticule .bmp Graphic Graphics Editor

-

Disabled Zoom Reticule .bmp Graphic Graphics Editor

-

 

5 - Creating the Sounds

The guns packaged with SWAT3 are aurally complex. They have several sound events including:

Not all of these are necessarily applicable to a new weapon; for instance, you may find that you don't need a new out-of-ammo click sound for your rifle, since it's out-of-ammo click sounds just like the click of the SWAT 3 M4.You can re-use sounds by linking them through data files, explained later on. But, know that these are the sounds that are needed for each weapon; so use as many or as few new sounds as you like!

We would like to take this opportunity to remind you to make sure your .wav file is in the correct format.

SWAT3 .wav Format Is
16-bit, 22,050 kHz, Mono

This format must be preserved in your .wav files, even if you feed them through the CMP Sound Compressor! The Compressor will compress any .wav file you feed it, regardless of if it's in the correct format or not.

CREATION CHECKLIST

File To Create What To Create File With More Info?
Gunshot Sound Wave Editor / CMP Compressor CMP Compressor Tool
Reload Magazine In Sound Wave Editor / CMP Compressor CMP Compressor Tool
Reload Magazine Out Sound Wave Editor / CMP Compressor CMP Compressor Tool
Reload Rack Sound Wave Editor / CMP Compressor CMP Compressor Tool
Reload Tap Sound Wave Editor / CMP Compressor CMP Compressor Tool
Reload Topload Sound (For Non Magazine Weapons) Wave Editor / CMP Compressor CMP Compressor Tool
Reload Open Sound Wave Editor / CMP Compressor CMP Compressor Tool
Magazine Drop Sound Wave Editor / CMP Compressor CMP Compressor Tool
Out-Of-Ammo Click Sound Wave Editor / CMP Compressor CMP Compressor Tool

 

6 - Linking the Data / Creating the Weapon Specs

Time to get technical. This is the final step, but is composed of several sub-steps, since several data files are involved. All data files must be modified, or you will be missing some part of the weapon's functionality. The files that you must modify are:

Guns.dat or Modguns.dat

This file must be modified with an entry for your weapon that will provide actual weapon specifications such as recoil, the presence of a flashlight, rate of fire, etc. The name you enter for the first field is the internal weapon name referenced by the preview bitmap and specific sound files.

Guns.dat Data Sheet

 

Items.dat or Moditems.dat

This file must be modified with an entry for your weapon that will provide information on which reticules to use, and which UI bitmap to use. The first field is the internal weapon name that you entered into Guns.dat.

Items.dat Data Sheet

 

Effects.dat or Modeffects.dat

This file must be edited with entries for your weapon that  will provide information on which magazine drops out of the weapon (if applicable) when the weapon is speed-reloaded. These are MagazineEffects in the Effects.dat file, and it would be best to look at the Effects.dat in the .res files for examples on proper syntax.

Some possible parameters might be:
(skin=mp5_mag,Elasticity=0.3,BoundRadius=1.0,LifeTime=60,BounceSound=mag_bounce)

You must also create an Effects.dat entry for the smoke emitted from the weapon's muzzle. It's a SpriteExp effect with the naming convention "gunsmoke_<internal weapon name>". See the Effects.dat in the .res files for examples on proper syntax.

Some possible parameters might be:
(sprite=gunsmoke_lg,count=3,minrange=3,maxrange=6,minlife=0.5,maxlife=2.0,factor=0.5,drift=0 2 0,spread=45)

Effects.dat Data Sheet

 

Skins.dat or Modskins.dat

This file must be edited with entries for your weapon and it's magazine that will provide linking data between the weapon/magazine data and the actual weapon/magazine model .gsm file. This is a simple three-field string table. The first field is for the internal weapon name that was added to guns.dat if you're adding a weapon; or the internal name of the magazine that was added to effects.dat if you're adding a magazine. The second field is for the actual file name of the .gsm without the .gsm extension. The third field should be set to 0.

Skins.dat Data Sheet

 

Swt_data.dat or Modswt_data.dat

This file must be edited with entries for your weapon that will provide SWAT3 with a reference as to which animations can be used for various weapon functions. There are several fields to fill in, and several choices as to which animations can be used. The animations that are used help determine the sounds used in the game, and consequently determine the entries you must add in sounds.dat

Click on the link below to find out what types of animations you may use for your weapons; they may be mixed and matched at will, but some combinations may not look correct; experiment to find the best combination for your weapon.

Data Sheet: SWT_DATA.DAT ANIMATIONS TABLE

Swt_data.dat Data Sheet

 

Sounds.dat or Modsounds.dat

This file must be edited with entries for your weapon's reload sounds, and, if you've added new gunshot sounds, this must be entered as well.

First, to enter in any gunshot sounds, you must know the name of the gunshot sound that you entered in guns.dat, and you must know the actual file name of the gunshot sound. This forms the first two fields for an entry in sounds.dat. For instance, if you entered in guns.dat that it's Primary Fire sound was biggunshot_A, and your sound file was m249.wav, then this weapons' entry in sounds.dat would start out like this:

biggunshot_A        m249   

After these fields comes a variety of numerical sound adjustments; for gunshots, we suggest the following format.

<gunshot string>

<gunshot file>

100

500

6000

0

0

0

The reload sounds are a bit more complex; based on the type of animation you specified for reloading in swt_data.dat, you will have to create certain sound references in sounds.dat. The breakdown follows:

If you used these tactical reload / fast reload animations....

You need to define these sounds

SWT_Rifle_Reld_Tac / SWT_MP5_Reld_Fast 

MagIn_<internal weapon name>
MagOut_<internal weapon name>
Open_<internal weapon name>
Rack_<internal weapon name>

SWT_Rifle_Reld_Tac / SWT_M4_Reld_Fast 

MagIn_<internal weapon name>
MagOut__<internal weapon name>
Tap_<internal weapon name>
Rack_<internal weapon name>

SWT_Handgun_Reload 

MagIn_<internal weapon name>
MagOut__<internal weapon name>
Tap_<internal weapon name>
Rack_<internal weapon name>

SWT_Ben_Reld_Tac / SWT_Ben_Reld_Fast 

Magin_<internal weapon name>
Rack_<internal weapon name>
Topload_<internal weapon name>

For reloading sounds, we recommend the following format:

<reload name>

<reload sound>

100

50

300

0

0

0

0

Sounds.dat Data Sheet

 

Strings.dat or Modstrings.dat

There are two strings that must be added to this file per weapon. The strings.dat file is a simple string table consisting of two fields. The first field is the name of the string, the second is the string contents.

The two string names that need to be added are:

  • The string name given to the "Friendlyname" parameter for your weapon in guns.dat. The contents of this string should be your weapon's full name.

  • A string name called "<internal weapon name>_desc" where internal weapon name is the first field in guns.dat that you added for your weapon. The contents of this string should be the description of your weapon.

Strings.dat Data Sheet

Upon completion of these steps, activate your mod and enter SWAT3. Start a custom game and check the Operations, Weapons section. Your weapon should appear in the list! Select it and enjoy!

 

<< Previous: New Ammo
>> Next: New Camos