Difference between revisions of "AsBirthRule"
m (→Oops, forgot the table rows) |
(/* Added more info about particle effect images.) |
||
Line 65: | Line 65: | ||
|Gravity||float||Gravitational factor for particles, for Earth conditions enter -9.8 or thereabaouts | |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 | + | |TexFrameStart||int||Index of the first frame of particle animation in the image, see below |
|- | |- | ||
− | |TexFrameEnd||int||Index of the last frame of particle animation in the image | + | |TexFrameEnd||int||Index of the last frame of particle animation in the image , see below |
|- | |- | ||
|BirthFlags||int||Unknown | |BirthFlags||int||Unknown | ||
Line 78: | Line 78: | ||
|} | |} | ||
− | + | Some of 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". This image, and all particle texture images, are divided into rectangular frames used for animation. All frames are equal in size and they are numbered for easy access in the asBirthRule. Animation sequences must be made up of consequtive frames in the image, but the image may contain other frames for different particle effects. | |
+ | |||
+ | Oject collision particle effects may use other images, see ''TexNumber'' in [[dgBangerData]], but these are structured in the same way, with frames and indices to the frames. |
Revision as of 20:06, 6 August 2006
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, see below |
TexFrameEnd | int | Index of the last frame of particle animation in the image , see below |
BirthFlags | int | Unknown |
Height | float | Unknown |
Intensity | float | Unknown |
Color | int | Unknown |
Some of 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". This image, and all particle texture images, are divided into rectangular frames used for animation. All frames are equal in size and they are numbered for easy access in the asBirthRule. Animation sequences must be made up of consequtive frames in the image, but the image may contain other frames for different particle effects.
Oject collision particle effects may use other images, see TexNumber in dgBangerData, but these are structured in the same way, with frames and indices to the frames.