AsBirthRule
The asBirthRule files define a particle effect. A particle effect is an effect where many, small objects are spewed out from a point at certain occasions. For weather effects, the particles can be rain drops, for colliding with a parking meter, the particles may be coins.
The format is ASCII-based and consist of a block enclosed by { and }.
The files start with a definition of the type of banger data given. None of the MM2 files use anything but type a, like this:
type: a
Next comes the main asBirthRule block:
asBirthRule {
...
}
This block can contain several tag-value parameters:
| tag | format | Description |
|---|---|---|
| Position | float float float | Position where particles originate |
| PositionVar | float float float | -
is randomly modified within this range |
| Velocity | float float float | Velocity and direction of the particles when created |
| VelocityVar | float float float | Variance in velocity, the velocity is randomly modified within this range |
| Life | float | Life-time of the particles |
| LifeVar | float | Variance in life-time |
| Mass | float | Mass of a particle |
| MassVar | float | Variance in particle mass |
| Radius | float | Size of a particle |
| RadiusVar | float | Variance in particle size |
| Drag | float | Unknown |
| DragVar | float | Variance in drag |
| Damp | float | Unknown |
| DampVar | float | Variance in damp |
| DRadius | float | Unknown |
| DRadiusVar | float | Variance in dradius |
| DAlpha | float | Unknown |
| DAlphaVar | float | Variance in dalpha |
| DRotation | float | Unknown |
| DRotationVar | float | Variance in drotation |
| InitialBlast | int | Unkown, maybe number of particles created immediately on activation |
| SpewRate | float | rate of new particles per second? |
| SpewTimeLimit | float | Maximum time, in seconds, for particle creation |
| Gravity | float | Gravitational factor for particles, for Earth conditions enter -9.8 or thereabaouts |
| TexFrameStart | int | Index of the first frame of particle animation in the image |
| TexFrameEnd | int | Index of the last frame of particle animation in the image |
| BirthFlags | int | Unknown |
| Height | float | Unknown |
| Intensity | float | Unknown |
| Color | int | Unknown |
The global particle effects use the texture image named "TODO: I could have sworn that I saw an image where the indices matched all of the default vehicular particle effect, now I can't find it", but object collision particle effects may use other images, see dgBangerData.