S  W  A  T   3   M  O  D    H  Q    
DATA FILE INFORMATION - CLOSE WINDOW WHEN FINISHED

Effects.dat

Function

This file is a script for certain effects within the game; the script tells SWAT3 how to play complicated effects such as glass shattering on a bullet impact, flashbangs detonating, etc. This file is tied almost directly to sprites.dat, and indirectly to ammodefs.dat and guns.dat in the case of shell casings and magazine effects.

The entries within this file differ based on the type of effect they are creating. The types of effects are:

Effect Type Effect Achieved
DecalEffect  Pastes a 2d decal onto 3d geometry.
MultiEffects  Responsible for playing multiple effects of other types.
SpriteExp  Explodes sprites from a certain point using given parameters.
Sparks  Spawns spark sprites.
ShellCasing  Spawns a shell casing of given type.
MagazineEffect  Spawns a magazine of given type.
LightEffect Creates an omnidirectional light.
LightFlash  Creates an animated flash of light.
LightFlicker Creates an animated flash of light with an additional flickering effect.
SoundEffect  Plays a sound effect.
SmokeEffect  Spawns smoke puffs.
RainEffect  Spawns rain drops.
MissileEffect  Spawns a missile that travels to a certain point.
TracerEffect Creates a directional moving sprite, used primarily for bullet tracer effects.
LaserEffect  Fires a laser beam from a point to the player. Used by zappers only.

Format

Generally, an effect is created in this file using the following format:

Name of Effect   

Type of Effect   

Effect Parameters

Based on the type of effect, the parameters of the effect may be different. Below is a chart explaining each of the parameter groups by effect type.

DecalEffect

Example parameters: (dir=0 -1 0, life=240, up=1 0 0, sprite=blood_drop_sm1)

dir

 This is a matrix (X, Y, Z) explaining the placement of the sprite in terms of the object it is spawning from. In the case of 0 -1 0, this places the decal on the floor.

life

 This is how long the effect will last in seconds.

up

 This is a rotation matrix (X,Y,Z) relative to the direction matrix. Cannot be the same as the direction matrix.

sprite

 This refers to a sprite reference name within sprites.dat.

 

MultiEffects

Example parameters: (0=bullet_plaster_sm,1=bullet_plaster_lg,2=bullet_smoke)

0

 The name of the first effect to play.

1

 The name of the second effect to play.

2

 The name of the third effect to play.

Etc, etc....

You may use as many as you wish, but note that the more you use, the slower the game can get.

 

SpriteExp

Example parameters: (sprite=bullet_glass_sm,count=15,minrange=20,maxrange=240,minlife=0.1,maxlife=0.75,factor=0.75,
drift=0 -10 0,spread=45)

sprite

 This is a sprite reference name in sprites.dat that refers to the sprite to be displayed.

count

 This is the number of sprites to spawn.

minrange

 This is the minimum distance the sprite will travel in it's lifetime.

maxrange

 This is the maximum distance the sprite will travel in it's lifetime.

minlife

 This is the minimum amount of lifetime the sprite will have.

maxlife

 This is the maximum amount of lifetime the sprite will have.

factor

 This is an acceleration scalar that determines how fast the sprites move. If the factor is between 0 and 1, the speed of the sprites will start fast and slow down over time. If the factor is greater than 1, the sprites will start out slowly and accelerate. If the factor is 1, then the sprites will move at a constant rate.

drift

 This is a matrix (X, Y, Z) that dictates the amount of extra vector motion that the sprite will have as it is traveling. 0 -10 0 means that it will drift towards the floor.

spread

 This is the amount that the individually spawned sprites will spread out from one another upon the effect playing.

 

Sparks

Example parameters: (count=20, size=0, dir=0 -1 0)

count

 The number of sparks to spawn.

size

 This is the size of the spark sprites. There are three sizes. 0, 1, and 2.

dir

 This is a matrix (X, Y, Z) that dictates the direction that the sparks will travel.

 

ShellCasing

Example parameters: (skin=9mm_brass,Elasticity=0.5,BoundRadius=1.0,LifeTime=60,BounceSound=shell_bounce*)

skin

 This is a reference to a model that represents the shell casing. Shell casings are models, and not sprites.

Elasticity

 This is a physical property that determines how the shell casing will bounce when hitting the ground.

BoundRadius

 This is a physical property that determines how large the shell casing is.

LifeTime

 This determines how long the shell casing will stay in the game, in seconds.

BounceSound

 This is a reference to a sound played when the casing hits the ground. The "*" in the example denotes that it will pick a random sound out of a list of those sounds starting with "shell_bounce". 

1.7 Update - Shell Casings With Throwable Ammunition

Should you be using throwable ammunition, such as grenades, dart guns, rubber pellets, etc, named using the "_throw_" naming convention, note that your ShellCasing effect must start out as "shell__throw_<your ammo name>". Notice that there are two underscores after "shell".

 

MagazineEffect

Example parameters: (skin=mp5_mag,Elasticity=0.3,BoundRadius=1.0,LifeTime=60,BounceSound=mag_bounce)

skin

 This is a reference to a model that represents the magazine. Magazines are models, and not sprites.

Elasticity

 This is a physical property that determines how the magazine will bounce when hitting the ground.

BoundRadius

 This is a physical property that determines how large the magazine is.

LifeTime

 This determines how long the magazine will stay in the game, in seconds.

BounceSound

 This is a reference to a sound played when the magazine hits the ground. 

 

LightEffect

Example parameters: (color=0.5 0.2 0.1, range=10)

color

This is a three-field entry (Red, Green, Blue) that defines the color of the light.

range

This number defines the range of the light in inches from the origin.

 

LightFlash

Example parameters: (flashcolor=1 1 1,flashrange=120.0,holdcolor=0.75 0.75 0,holdrange=120.0,attack=0.05,decay=0.5,sustain=0,release=0.75)

flashcolor

 This is a three-field entry (Red, Green, Blue) that spans from 0 to 1, and determines how intense the color is. 1 1 1 is bright white. 

flashrange

 This is the range that the flash will extend to.

holdcolor

 This is a secondary color that shows itself after the first color has flashed. The same RGB pattern applies. 0.75 0.75 0 is near-bright yellow.

holdrange

 This is the range that the secondary color will extend to.

attack

 This is the time in seconds that it takes to expand the flash and secondary to their maximum size.

decay

 This is the time in seconds that it takes for the flash and secondary to fade away.

sustain

 This is the time in seconds that the secondary effect will stay at maximum before decaying.

release

 This is the time in seconds that it takes for the secondary to fade away.

 

LightFlicker

Example parameters: (flashcolor=1 1 1,flashrange=120.0,holdcolor=0.75 0.75 0,holdrange=120.0, holdcolor2= 0 0.50 0.50, holdrange2 =50,flicker1=0.7,flicker2=0.9,attack=0.05,decay=0.5,sustain=0,release=0.75)

flashcolor

 This is a three-field entry (Red, Green, Blue) that spans from 0 to 1, and determines how intense the color is. 1 1 1 is bright white. 

flashrange

 This is the range that the flash will extend to.

holdcolor

 This is a secondary color that shows itself after the first color has flashed. The same RGB pattern applies. 0.75 0.75 0 is near-bright yellow.

holdrange

 This is the range that the secondary color will extend to.

holdcolor2  The color that will be alternated with "holdcolor" during the "sustain" phase to produce the flickering effect.
holdrange2  The range of the light that will be alternated with "holdrange" during the "sustain" phase to produce the flickering effect.
flicker1  Time in seconds to smoothly alternate from holdcolor/holdrange to holdcolor2/holdrange2.
flicker2  Time in seconds to smoothly alternate back from holdcolor2/holdrange2 to holdcolor/holdrange.

attack

 This is the time in seconds that it takes to expand the flash and secondary to their maximum size.

decay

 This is the time in seconds that it takes for the flash and secondary to fade away.

sustain

 This is the time in seconds that the secondary effect will stay at maximum before decaying.

release

 This is the time in seconds that it takes for the secondary to fade away.

 

SoundEffect

Example parameters: (sound=gunshot_cs,duration=25)

sound

 This is a reference to a sound name in sounds.dat. This is the sound to be played.

duration

 This is the number of seconds that the sound plays for, if the sound is shorter than this duration, it will be looped.

 

SmokeEffect

Example parameters: (sprite=steam,range=1,speed=1,factor=1,rate=.25,duration=999999,rise=10)

sprite

 This is a reference to a sprite name in sprites.dat. This is is the sprite to be displayed.

range

 This is how far the spawned sprites will travel.

speed

 This is how fast the spawned sprites move.

factor

 This is an acceleration scalar that determines how fast the sprites move. If the factor is between 0 and 1, the speed of the sprites will start fast and slow down over time. If the factor is greater than 1, the sprites will start out slowly and accelerate. If the factor is 1, then the sprites will move at a constant rate.

rate

 This is the delay in between generation of new sprites.

duration

 This is how long to keep up the effect of smoke being generated, in seconds.

rise

 This is an additional acceleration that you can give to the smoke effect.

 

RainEffect

Example parameters: (color=0.5 0.5 0.55,count=200)

color

 The color of the rain droplets, using three fields ranging from 0 to 1 to represent Red, Green, and Blue. 0.5 0.5 0.55 is grayish with a hint of extra blue.

count

 The count of droplets rendered at any given time. 200 is fairly heavy rain.

 

MissileEffect

Example parameters: (skin=missile,sound=Gunshot_Rocketlaunch,corona=missile_corona,flameA=missile_flameA, flameB=missile_flameB, target=5000 10000 -10000,hit_target=1,sound_delay=1,travel_time=6,hit_effect=plane_explosion,
hit_sound=impact_planeblewup)

skin

This is a reference to the model of the missile to be launched. Missiles are models and not sprites.

sound

This is a reference in sounds.dat to the sound of the missile launching.

corona

This is a reference in sprites.dat to the corona displayed around the missile while in flight.

flameA

This is a reference in sprites.dat to the first type of flame displayed in flight.

flameB

This is a reference in sprites.dat to the second type of flame displayed in flight.

target

This is a matrix (X, Y, Z) that represents the missiles' target.

hit_target

If hit target is 0, it will miss the target. If hit target is 1, it then destroys the plane it is aiming at and sends a mission failed message.

sound_delay

This is a time amount that delays the sound between the visual effect of the plane being hit and the time the sound reaches the player.

travel_time

This is the amount of time that the missile is in the air before impact or loss.

hit_effect

This is a reference in effects.dat to the effect played if the missile hits its target.

hit_sound

This is a reference in effects.dat to the sound effect played if the missile hits its target.

 

TracerEffect

Example parameters: (sprite = TracerGreen, duration = 0.4, speed = 100)

sprite

This is a reference to a sprite (in sprites.dat) that will graphically represent this effect.

duration

This is the length, in seconds, that the effect will be active.

speed

This is the length, in inches, that the tracer effect will travel in one second.

 

Advanced Topic: Internal FX, Special Identifiers