Notes on Custom Effects Files

There are currently 3 types of files used to customize WarbirdsIII effects.

TGA Files

The TGA files are images in the Targa format, most with an alpha channel. Alpha channels tell the code how transparent to make effects. You will need a pretty good graphics editor to play around with these. For most effects you will not need to dabble in these and it is advised to try to use the stock ones when you can. However, the only way to change tracers and muzzle flashes is by changing their TGA textures.

Tracers use a single file, tracer2.tga. This texture is wrapped around a cylindrical object to produce the tracer. The alpha channel is not used.

Muzzle flashes use muzzel1.tga and muzzel2.tga. Muzzel1.tga is the length of the flame and muzzel2.tga is used for the cross section of it.

If you need to create your own TGA files, know that their dimension must be a square with the sides a length of a factor of 2 (2, 4, 8, 16, 32, 64, ...).

EFFECTS.EF3 code

This file merely handles events from the game and tells the game what routines to run in the ef3.wwm file for each event and how to run them. This allows multiple effects to share the same effects routines. Some of the keywords you may see, and what they mean:
    ONESHOT, run the routine once
    LOOP, repeat the routine until it's not needed anymore
    DURATION, like a loop, but dictates time duration of effect (seconds?)
When trying to figure out what code and TGA is being used for a certain effect, you need to start here. The game recognizes the group names in this file, so do not change them. Note the comments describing each group. Each PSYS line points to code in the ef3.wwm file.

Ordinance Specific Effects
In this file you can also split off effects from their default. For example, all flak burst in the air the same. But, I want a different effect for 88mm. I can add these lines to the file to do that:
    GROUP wp149air {
    PSYS largeflak {
    ONESHOT
    }
    }
The 'wp' just means that it is a weapons specific effect. '149' is the weapon code for 88mm. These codes can be found here and must be 3 digits long, zero filled. Finally, the 'air' means airburst (optionally obj=object, grn=ground, wtr=water).


EF3.WWM code

This file holds the heart of custom effects and has 3 sections:

TGA loading:
    TEXTURE smoke {
    TYPE RGBA
    FILE textures\smoke.tga
    }
Pretty straight forward, you have to load a tga before you can reference it.

Palettes:
    PALETTE smoke {
    TYPE RGBATEST
    INDEX 0 (0,0,0,0)
    ...
    INDEX 255 (255,255,255,0)
Palettes are used along side tga files to make the a single tga file change. For example, when you turn on smoke (.smoke) you see an array of colors. The smoke uses a single tga, but the palette gives it its changing colors. Palettes are also used to change the blackness of smoke randomly giving smoke more volume.

Particle Systems:

OK, here we go with the meat. Here is a line by line discription of parameters you can use:

parametervalid settingsdescription
ON optionally OFFturns off/on the effect
TYPE BURST, STREAM, CYCLE, CONSTANT tells what kind of an effect
EMITSHAPE POINT, LINE, PLANE, SPHERE, TUBE, SPINNER the volume/area the effect is produced within (randomly)
PARAMS (x,y,z) in feet? this is the size of the EMITSHAPE in length, width, height (as applies)
POSITION (x,y,z) in feet? relative to the emit point, forward/back, right/left, up/down
VELOCITY (x,y,z) in feet? velocity vector from emit point in 3 dimensional space
ANGVELOCITY (x,y,z) effects the 3 planes of rotation, x, y, and z
VARIANCE 0 - 1 effects the velocity vector giving randomness
ANGVARIANCE 0 - 1 effects the rotation giving randomness
DAMPEN 0 - 1 I believe it works with VARIANCE as a degree of randomness
ANGDAMPEN 0 - 1 I believe it works with ANGVARIANCE as a degree of randomness
PARTICLES For smooth fadeouts, the number of particles should be slightly higher than the LIFE divided by the RATEmax number of particles allowed for this effect at any one time
RATE in seconds? the time delay between emitting the next particle
LIFE in seconds? how long the particle lasts before disappearing
DECAY controls rate of particle fading out
SIZE size of particle
GROWTH how fast the particle grows (or shrinks)
ATTACHEDPARTICLES optionalkeeps the particle attached to the emit point
RANDLIFE optionalrandomizes the LIFE parameter
RANDDECAY optionalrandomizes the DECAY parameter
AUTOSIZE optionalwithout this the effect is the same size, no matter what the distance
PALMODE OFF, LINEAR, RANDOM, GENCYCLE, CYCLE, INVCYCLE, INVLINEARhow to index through the palette (if at all)
PALETTE which palette to use
PALSTART 0 - 255 starting index of palette to use
PALEND 0 - 255 ending index of palette to use
PALRATE how fast to move through palette indexes
COLOR (red,green,blue,alpha)used to apply a color filter to a tga
FADE optionalcauses effect to fade with decay
SELFILLUMSCALE 0 - 1 how visible in the dark, from 0/not to 1/self-lit
ALPHA TEXTURE, ADD, DIFFUSE, MODULATEhow the alpha channel of the tga is used
BLEND BLEND, ALPHAADD, ADD, DECAL, MODULATEhow the tga is displayed
SHAPE PANEL, ORIENTEDPANEL, STREAMER, ORIENTEDSTREAMER, ZALIGNEDPANEL, POINT, LINE, MESHhow to utilize the tga
PANEL optional (2x2,4x4,8x8,etc.)tells how many panels/sections within the tga
MOVIE optionaltells effect to index through panels like a movie
TEXTURE which tga file defined above to use
IMAGE which panel section to start with or use
RANDIMAGE optionaltells the effect to randomly pick panels from tga
FRAMERATE how fast to index through panels.
MATRIX 0 (a,b,c)has to do with the rotation of the emit point
MATRIX 1 (d,e,f)"
MATRIX 2 (g,h,i)"


Then there are optional attractors. They put a force on the effect and move it thusly. In most cases they are used to simulate gravity like on particles that shoot into the air and then fall back down from an explosion:

ON optionally OFFturns off/on the attractor
TYPE PLANE, FORCE, SPHERE, BOUNCER, KILLERshape of the object exerting force
PARAMS (x,y,z) in feet? this is the size of the TYPE in length, width, height (as applies)
POSITION (x,y,z) in feet? relative to the emit point, forward/back, right/left, up/down
DIRECTION (x,y,z)vector of its force
STRENGTH how strong it is
RANGE feet?its effective range


EXAMPLES

  EMITTER puffysmoke {
    ON
    TYPE STREAM
    EMITSHAPE SPHERE
    PARAMS (10.000000,10.000000,5.000000)
    POSITION (0.000000,0.000000,0.000000)
    VELOCITY (0.000000,0.000000,20.000000)
    ANGVELOCITY (0.000000,0.000000,0.000000)
    VARIANCE 0.200000
    ANGVARIANCE 0.000000
    DAMPEN 1.000000
    ANGDAMPEN 1.000000
    PARTICLES 25
    RATE 0.444000
    LIFE 10.000000
    DECAY 1.000000
    SIZE 9.000000
    GROWTH 6.000000
    AUTOSIZE
    PALMODE LINEAR
    PALETTE smoke
    PALSTART 80
    PALEND 255
    PALRATE 256.000000
    COLOR (0.600000,0.600000,0.600000,1.000000)
    FADE
    SELFILLUMSCALE 0.000000
    ALPHA MODULATE
    BLEND BLEND
    SHAPE PANEL
    PANEL 4x4
    TEXTURE darksmoke
    RANDIMAGE
    FRAMERATE 0.000000
    MATRIX 0 (1.000000,0.000000,0.000000)
    MATRIX 1 (0.000000,0.707107,-0.707107)
    MATRIX 2 (0.000000,0.707107,0.707107)
  }
name of emitter
it's turned on
it's a streamer effected by the RATE command
particles appear randomly within a spherical shape
the shape is kind of a squashed sphere
centered on the emit point
being shot upwards
no rotation
velocity is somewhat random



maximum 25 targets shown at any one time
every .444 seconds a new particle is created
every particle lasts 10 seconds

initial size of particle
the particle is growing
has perspective
goes through palette incrementally
uses the smoke palette
starts at palette index 80
stops at palette index 255
goes through palette pretty fast
the TGA file is slightly darkened
particle fades out before dieing
it emits no light of it's own
effect of it's transparency
blends in with what it covers
it's a square shape
has 16 sections in the TGA
uses darksmoke.tga
randomly displays one of the 16 sections
not used since not a movie







  EMITTER flecks {
    ON
    TYPE BURST
    EMITSHAPE POINT
    PARAMS (0.000000,0.000000,0.000000)
    POSITION (0.000000,0.000000,-1.000000)
    VELOCITY (0.000000,0.000000,150.000000)
    ANGVELOCITY (0.000000,0.000000,0.500000)
    VARIANCE 0.200000
    ANGVARIANCE 0.900000
    DAMPEN 1.000000
    ANGDAMPEN 1.000000
    PARTICLES 11
    RATE 1.000000
    LIFE 4.000000
    DECAY 1.000000
    SIZE 2.000000
    GROWTH 20.000000
    AUTOSIZE
    PALMODE OFF
    PALSTART 0
    PALEND 255
    PALRATE 256.000000
    COLOR (1.000000,1.000000,1.000000,1.000000)
    FADE
    SELFILLUMSCALE 0.300000
    ALPHA MODULATE
    BLEND BLEND
    SHAPE PANEL
    TEXTURE seaspray
    IMAGE 0
    FRAMERATE 0.000000
    MATRIX 0 (1.000000,0.000000,0.000000)
    MATRIX 1 (0.000000,1.000000,0.000000)
    MATRIX 2 (0.000000,0.000000,1.000000)
  }
  ATTRACTOR attractor0 {
    ON
    TYPE PLANE
    PARAMS (20.000000,20.000000,20.000000)
    POSITION (0.000000,0.000000,0.000000)
    DIRECTION (0.000000,0.000000,1.000000)
    STRENGTH 200.000000
    RANGE 2000.000000
  }
emitter name
it's turned on
it's a burst of particles
emits from a single point
not applicable
1 foot below emit point
has quite a hefty upwards velocity
has a some rotation in the Z-plane
velocity is slightly random
rotation speeds are quite random


will burst with 11 particles
if not a ONESHOT, will burst every second
particles will live for 4 seconds

initial size, smaller
grows quickly
has perspective
doesn't use a palette



basically no color filtering
particles will fade
has a slight visibility at night
effect of its alpha channel
blends in with background
shape is a square panel
uses seaspray.tga
not applicable since not multi-panel
not applicable since not movie




name of attractor
it's turned on
it's force is distributed across a plane
the plane is a square, 20 feet each side
centered on the emit point
it's force in this case is pulling down
quite a lot of strength
a very large range of influence.