The effects file (Page 1 of 1)

Written by Roguey,

The effects file, written by Roguey


What is the effect file?


The effect file is a file found inside types folder that deals with visual effects such as explosions, light effects, impacts etc.
The file is a text file separated into blocks (150 in X3).

The layout


The first line is important, as it tells the game how many entries follow after. This is the first line, of the first effect in X3:

0;1;0;0;1.0; // Effect 0

So, what does that mean?


The first number (0;1;0;0;1.0;) is the id number. Each effect will have a unique id, that is referenced from other type files.
The id is always a number that starts from 0 and increases.

The second number (0;1;0;0;1.0;) tells you how many individual effects make up this effect, which is 1.

The other numbers I dont think you need to worry about. So I recommend you leave them alone.

Individual effects


Now we know how many individual effects make up effect number 0, we need to look at one. However effect 0 is bad example, so lets take effect number 16 - which is marked with a comment (// Effect 16 impact effect PR ). Effect 16 is made up from 3 Individual effects (16;3;0;0;1.0;). Each individual effect is made up of two lines: one to setup the effect, the second for scale, rotation and size.

So lets look at the first Individual effect of 16:

EEDF_TIMEOUT|EEDF_GROWANDSHRINK|EEDF_FADEOUT|EEDF_RANDOMROT; 0;
  564; 0.0; 0.1; 400; 0.100; 0; 0; 0; -1; 30; 0.250; 0;

The first line sets behaviour via. EEDF_TIMEOUT, EEDF_GROW, EEDF_FADEOUT, whilst the second value determines how the effect will be displayed.

Now the most important line (564; 0.0; 0.1; 400;....) setups scale, rotation etc. Here's what they mean from left to right:

pos. value Description
1 564 Which 3d object to use, can be either in objects/v/ or objects/cut depending if the EEDF_CUT was set on the prevoius line.
2 0.000 When this effect is created, how big it is.
3 0.1 When the effect is over, how big is it.
4 400 How long does this effect last in milliseconds, 500 equals half a second.
5 0.100 This one is called rndsize, although im guessing it varies the size.
6, 7, 8 0;0;0 x, y and z offset. You can use these to move individual effects around.
9 -1 Possibly to do with lensflare's.
10 30 Attenuation, or strength. Used by few flags.
11 0.250 Not too sure - should define how fast the animation plays but probably best to leave alone.
12 0 How much of a delay (in milliseconds) before this individual effect starts. 0 is when the effect is just started.

Next: End of guide