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 Ammunition

Adding ammo types to SWAT3 is a five-step process:



1 - Create the Ammo Shell Casing

With the exception of caseless ammunition and perhaps more eccentric weapons, such as dart guns, firearms eject some sort of casing used to hold the actual bullet. This is one of the first things you should probably create when making a new ammo type. It is a .gsm model file, with one or more .bmp files that define the texture the bullet should have.

The shell casing .gsm file must be created using 3D Studio Max 2.5 and the GSM Exporter. The texture .bmp files can be created using a standard graphics editor.

CREATION CHECKLIST

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

No 3DSMax? Not a problem; there are several different shell casing types available to you, from .45 caliber pistol rounds to shotgun shells, you'll find them in the .res archives. Even without 3DSMax, you can use a graphics editor to paint a different texture on existing shell casings; just find the .bmp texture associated with the shell casing, and create a copy of it in your mods directory. Give it the same name as the texture in the .res file if you wish to replace it.

2 - Linking to Ammodefs.dat
Once the shell casing model and texture are complete, you'll need to add the actual ammunition velocity, damage, and penetration data to ammodefs.dat. This is the part where you give your ammunition type unique physical characteristics. Here you can decide how lethal your bullet is, how well it cuts through different materials, and what sort of wound channels the bullet leaves. There's a lot of information to add; but if you're not sure, take a few values from the original SWAT3 data files (we don't mind), and you can always come back and tweak it later...just don't leave anything blank.

This is also where you'll decide the internal name to give to the ammunition type. This is important, as guns that use this ammunition must reference the ammunition by this name. Make sure to keep the name short, as there are space limitations, and keep it free of punctuation and spaces. 

For instance, if you are creating a .50 caliber AE round, you might want to use the name 50ae for your ammo type.

Ammodefs.dat is made up of three sections, and you need to use the same name in each section when referring to your ammunition type.

Since it's always preferable to create an additive "mod" file rather than editing the standard file, you'll probably want to create a file in your mod folder or zip file called "modammodefs.dat". Right away, this marks the file to SWAT3 as an additive mod file, and any new ammo types you put in this file will be added to the regular list of ammo in ammodefs.dat. This way you can distribute your ammo types without worrying about corrupting anyone else's regular ammo list.

When creating a modammodefs.dat, you need only include information on your ammo type, but all three sections must exist in the file, complete with the " { " and " } " markers and section headings ("AmmoDefs", "AmmovsBody", "AmmovsMaterials").

CREATION CHECKLIST

File To Create What To Create File With More Info?
Modammodefs.dat Text Editor Creating Content - Data Files - Ammodefs.dat



3 - Linking to Skins.dat

The next step is to tell SWAT3 what .gsm model represents your ammo type. It can be a model that you created in Step 1, or it can be one of the existing SWAT3 ammunition models.

Skins.dat is fairly straightforward. For your new ammunition type, you need only add data to one section, called Skins. You must create a skin name for your ammunition type as well as specify what model to use. This is done in three strings of text, all on one line.

The easiest way to determine a skin name is just to add the suffix _brass to your internal name for the ammo (which you created in Step 2) and use that as your skin name. You'll need this skin name later in effects.dat! 

As an example, if you were creating a .50 AE round and were calling it 50ae in ammodefs.dat, a good skin name might be 50ae_brass. That's the first string of text. The second string of text is the actual model name. This is the name of the .gsm model that you want to represent your shell casing graphically. If the name of the .gsm model was 50brass.gsm, this string of text would read 50brass. Finally, there's a third string of text that should simply be set to 0 (that's zero).

Again, this is a perfect place to use a mod file, so make one in your mod folder or zip file called modskins.dat. Place in it one section marked Skins (include the " { " and " } "), and put in just the data for your new ammo type. Using our 50 AE example, the modskins.dat may look like this:

Skins
{
    50ae_brass    50brass    0
}

That's IT. Simple!

CREATION CHECKLIST

File To Create What To Create File With More Info?
Modskins.dat Text Editor Creating Content - Data Files - Skins.dat

 

4 - Add Shell Casing Bounce Sounds
Most shell casings aren't silent; when they hit the deck they make a pretty defined impact sound. If your weapon has a shell casing ejection, and you wish your shell casing to emit a sound when bouncing off of an object, you must create the sound files that represent this effect. You may use any of the standard SWAT3 shell casing bounce sounds that you wish, but to truly define your ammunition, you might want to try making your own (No, I'm not kidding).

If you have a .wav file that you'd like to use, don't forget that it's beneficial to pass it through the SWAT CMP Sound Compressor utility to keep the file size down; after all, people will most likely be downloading your mod off the Internet, and the smaller the file is, the faster the avid gamers can get in on all that mod goodness you have to offer.

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.

One last thing about sounds. You cannot simply give a raw sound name to effects.dat (which you'll link your bounce sounds to). Your sounds must have an entry in sounds.dat. Having a sounds.dat entry links the sound up with special data like volume, distance, fading, and memory precache. Once you have entered it in sounds.dat and have a unique name for it, you're ready to move on.

If you went wild and have several bounce sounds and want SWAT3 to pick from them randomly every time your ammo bounces, simply add numbers to the each of your new sound file entries in sounds.dat: i.e. Bounce1, Bounce2, Bounce3. This does NOT refer to the actual file names; they can be whatever you wish. But if you wish the sounds to be part of a randomization group, the reference names in sounds.dat must have sequential numbering starting with 0 (zero). Later on, you will link this data into effects.dat in a special way.

One last thing. You can have a modsounds.dat file that just contains the sounds that you have created for your modification. We highly recommend that you do this. As always, make sure the heading names, including the "{" and "}" brackets are preserved, and add your data in the same format as the original sounds.dat.

CREATION CHECKLIST

File To Create What To Create File With More Info?
Bounce Sound(s) Wave Recorder, CMP Compressor Creating Content - Sounds
Modskins.dat Text Editor Creating Content - Data Files - Skins.dat

 


5 - Linking to Effects.dat
Well, we've reached the final step. This is the final file that you must link into, and it links the sound and the model for your shell casing together with physical effects to tell SWAT3 exactly how your shell casing behaves from the very moment it's ejected from the gun that fires your ammo type. 

As the title suggests, this entry will be in effects.dat, or more appropriately, modeffects.dat (we really do recommend it!)


Effects.dat requires that your entry follow a certain format:

shell_<internal ammo name> ShellCasing (skin=<skin name>,Elasticity=<number>,BoundRadius=<number>,LifeTime=<number>,BounceSound=<sound name>)


The very first field is where you'll link in your internal ammo name. You must add the prefix "shell_" to the ammo name. Using our example of the .50 AE ammo type, if the internal ammo name was "50ae", you'd need to use the name "shell_50ae" here. This lets SWAT3 tie the effect in with a gunshot.


The second field is always "ShellCasing" (it doesn't have to be; in the case of a belt-fed machine gun, you might use a MultiEffects that calls a ShellCasing effect for the brass, and one for the little metal links that are thrown out that make up the belt). This tells SWAT3 that you're setting up a shell casing effect to play.

The third field is a parenthesized set of parameters:

skin  this is the name of the skin of your brass that you defined in skins.dat, way back in Step 3. Put that name here on the right of the "=".
Elasticity  this is how "bouncy" the shell casing will be. metallic shell casings are about 0.5.
BoundRadius  keep this at 1.0; it's SWAT3's way of determining the bounding geometry around the shell casing.
LifeTime  how long the shell casing will stick around after it's spawned.
BounceSound  this is the name of a sounds.dat entry, not a file name. If you want SWAT3 to pick from random sounds numbered sequentially (shown in Step 4), type in the common name of the entry (for a name like "shell_brass2", this would be "shell_brass"), followed by a "*".

Should you be saying to yourself, "My gun uses caseless ammunition, this doesn't apply to me," au contraire! If you do not put in this effect, you will be supplied with a default effect (which looks like sparks are flying out of your weapon). How to get around this? Put the strings shown above into effects.dat, but take the extra step of changing the "LifeTime" parameter to 0 (zero)! This will prevent the shell casing from displaying.

Did we mention how important it is to use modeffects.dat, instead of modifying effects.dat directly? Thanks, we won't bother you anymore.

CREATION CHECKLIST

File To Create What To Create File With More Info?
Modeffects.dat Text Editor Creating Content - Data Files - Effects.dat



If all of these steps have been completed, you need only specify the name of the ammunition that you've added when you create a weapon in guns.dat. Congratulations!

Advanced Topic: Creating Throwable Ammo Types

>> Next: Creating New Weapons