= Particle file format = Particle effects are specified with an XML file, stored in `binaries/data/mods/public/art/particles/`. A typical particle effect file looks like: {{{ art/textures/particles/flame.png }}} All effect files must specify a texture and '''blend mode'''. The blend mode controls how each particle is drawn on top of the background, and is one of the following: '''`add`''':: The RGB colour of the texture is added to the background. Useful for bright effects e.g. flames. '''`subtract`''':: The RGB colour of the texture is subtracted from the background. '''`multiply`''':: The RGB colour of the texture is multiplied from the background. (Colours are interpreted as fractions in the range 0 to 1, so this will always make things darker). '''`over`''':: The RGB colour of the texture is drawn over the background, with transparency determined by the alpha channel. This is useful for more solid-looking particles, but may introduce visible glitches when particles are drawn over nearer particles, so it should be tested carefully from all angles. The main part of the effect file is specifying '''initial particle parameters'''. Every time a new particle is created by the particle emitter, its state is determined by these parameters. The available parameters are: * '''`emissionrate`''' - number of particles per second that will be emitted. * '''`lifetime`''' - number of seconds before the particle disappears. * '''`position.x`''' - initial position of particle relative to the emitter point. * '''`position.y`''' - initial position (Y axis is vertical). * '''`position.z`''' - initial position. * '''`angle`''' - initial rotation of sprite (they always face the camera but can rotate around one axis), in radians (6.28 radians = 360 degrees). * '''`velocity.x`''' - initial speed in metres per second. * '''`velocity.y`''' * '''`velocity.z`''' * '''`velocity.angle`''' - rotation speed in radians per second. * '''`size`''' - size in metres. * '''`color.r`''' - colour, which will be multiplied by the RGB of the texture. * '''`color.g`''' * '''`color.b`'''