XML/Projectile particle

Back to XML Overview

The Projection Particle XML defines the visual effects as well as part of the mechanics used to for attacks between units.

color and color-no-energy
If luminance is off, the colors of the texture will be used to color the particles. If luminance is on, the colors defined in the XML are used, though the intensity and shape will be defined by the texture. There are two colors values, the first which is the color at the start of the particle's life, and the second which defines the color when the particle is dead. Thus, the particles can transition in color. Colors are rendered by mixing red, green, and blue, as well as you can set the alpha channel. Each parameter is from 0 - 1, where 1 means there is 100% of that color. With the alpha, 1 would mean the color is almost completely transparent while 0 would be completely opaque.

gravity
Glest has a simple gravity system which can also cause particles to sink downwards - or float upwards - over their life. The value is the degree of sink - or in the case of a negative number, the degree of rise.

mode
Particles have two modes of rendering, either normal which uses colors, or as black which allows the usage of black particles. If not specified, it defaults to normal.

model
If true, the path to the model which will be used as the attack projectile. Animated models will only show the last frame.

offset
The offset from the center of the unit to where the center of the particle system will be, in Glest units. Since MegaGlest 3.1.10 you can give positions based on the ground ( which is highly recommanded ) and not the units center.

primitive
Particles have two methods of creation: either quad (renders a set of four particles in a dot style) or line (creates solid lines). Quad is the most commonly used, as it creates the fuzzy style of particles that would be used for flames, explosions, smoke, etc, while lines are generally only used for projectiles such as an arrow. Note that you cannot have more than one particle effect linked to a projectile or splash (though you can for unit particle effects) yet, so it is not possible to mix particles (such as a line and flaming particles for a flaming arrow).

size and size-no-energy
While the shape - and thus some degree of the size - is defined by the texture, the size is also affected by the size parameter passed into the XML, which will define the size in game units. Like the color, there are two size values that define the starting and ending sizes. As a result, the particles can seem to shrink or grow over their life.

texture
Particles can use textures to shape how the particles should look. If luminance is turned on, the image file used as a texture will simply work to define the intensity of the colors. If luminance is turned off, the colors in the image file will be used in the particle. The path is the path to the image.

trajectory
There are four types of trajectories, linear (straight line), parabolic (arc), spiral (spinning spiral), and random (projectile arcs from multiple points in random directions, eg: lightning).

Table of trajectory values by type
{| class="wikitable" ! Type of trajectory ! Element ! Description
 * linear
 * speed
 * How fast the particle moves. Note that speed values over 25 without a splash will nearly always miss due to a bug.
 * rowspan="2" | parabolic
 * speed
 * How fast the particle moves. Note that speed values over 25 without a splash will nearly always miss due to a bug.
 * scale
 * The angle of the parabola. Higher numbers means it will arc more. For example, with 90, it would shoot almost straight up.
 * rowspan="3" | spiral
 * speed
 * How fast the particle moves. Note that speed values over 25 without a splash will nearly always miss due to a bug.
 * scale
 * The angle of the parabola. Higher numbers means it will arc more. For example, with 90, it would shoot almost straight up.
 * frequency
 * How many times the spiral will spiral around.
 * rowspan="3" | random
 * speed
 * How fast the particle moves.
 * scale
 * The degree of angle (in decimal form) that must be changed at each "joint".
 * frequency
 * How many "joints" the projectile will have. At each "joint", it will change direction in a random way.
 * rowspan="3" | random
 * speed
 * How fast the particle moves.
 * scale
 * The degree of angle (in decimal form) that must be changed at each "joint".
 * frequency
 * How many "joints" the projectile will have. At each "joint", it will change direction in a random way.
 * frequency
 * How many "joints" the projectile will have. At each "joint", it will change direction in a random way.

The destination cannot be set to 'src_alpha_saturate'. If none is selected, the default is equal to the source being 'src_alpha' and the destination being 'one'.