Introduction Edit

The effects.bin file stores particle effects. Each particle you add here appears at the specified coordinates on the map.
A few examples of particles shown in-game

The great advantage, instead of creating particles by script, is that these particles can be seen also by players who join a mission later, when it has already been started.
However it is not possible to control these particles, meaning turning them on or off, not by script and not in the file itself.
Therefore it's only useful for static particles like smoke from a destroyed vehicle or a campfire.

If you don't have this file in your missions folder, simply create it. Effects.bin will load automatically. No further linking elsewhere necessary.

Structure Edit

32-bit INT block length
Particle 1
Particle 2
Particle N

Header Edit

Each effects.bin begins with C900 followed by the block length value. In the following N particle effect(s) are listed.

Particle N Edit

Particle N meaning example
16x32-Bit FLOAT entries of a 4x4 transformation matrix
32-Bit INT Particle ID 5F00 0000 (95)

4x4 transformation matrix
In HD2 left-handed matrices are used. Therefore we have to swap column 2 with column 3 of a right-handed matrix.




Changing only the position of the particle is very simple, just edit the x, y, z values as shown in the table above. If you need to rotate your particle effect (which would affect position entries of the matrix) it's recommended to use following 3ds Max/GMAX script by hdmaster

function GetTM =
	print ( "TMatrix: "+$.Name )
	a = $.Transform.Row1
	b = $.Transform.Row2
	c = $.Transform.Row3
	d = $.Transform.Row4
	format "[%, %, %, 0]\n" (a.X as String) (a.Z as String) (a.Y as String)
	format "[%, %, %, 0]\n" (b.X as String) (b.Z as String) (b.Y as String)
	format "[%, %, %, 0]\n" (c.X as String) (c.Z as String) (c.Y as String)
	format "[%, %, %, 1]\n" (d.X as String) (d.Z as String) (d.Y as String)

Sample Output

TMatrix: Dummy001"
[1.0, 0.0, 0.0, 0]
[0.0, 0.0, 1.0, 0]
[0.0, 1.0, 0.0, 0]
[3.0, 0.0, 5.0, 1]