BehavesLike
The behavior a particle or a particle system follows, such as smoke, gas or sparks.
Particle behavior
- Applies to
- ParticleType
- File
rules.ini- Section
[<ObjectType ID>]- Value
- string
- When omitted
noneA later file that contains the section without this key resets the type to no behavior, even when an earlier file named one.
Seven names are recognized, in any mix of upper and lower case. The name decides how a particle of the type moves, how it is drawn and what it does to objects in its cell.
| Value | What a particle of the type does |
|---|---|
Gas | Sinks toward the ground and settles just above it, wandering sideways and sliding off sloped ground. Every MaxDC frames it applies its Damage through its warhead to every object in its cell. An object it kills leaves a small visceroid when TiberiumDeathToVisceroid allows it. |
WeakGas | Moves and animates as Gas does, but never applies damage. |
Smoke | Rises at about its Velocity, and slows by Deacc each frame while it rises faster than 3 leptons a frame. It wanders a little to either side, and dies when it rises close under a bridge deck. |
Fire | Travels along the line it was fired on, slowing by Deacc each frame. It fades at Translucent25State and Translucent50State, and dies when it stops or when the ground ahead of it rises. Every MaxDC frames it applies its Damage through its warhead to the objects in its cell. It never damages the object its particle system is attached to, and stops damaging once its state passes FinalDamageState. |
Spark | Falls under gravity and dies where it strikes the ground, a bridge deck, a wall or a structure. It is drawn as a single pixel colored from its ColorList, not from artwork. |
Railgun | Travels along its firing direction at a speed that varies slightly from frame to frame. It is drawn as a single pixel colored from its ColorList, not from artwork. |
Web | Stays where it was created and applies its warhead, at zero damage, to every object in its cell every frame. |
At the lowest detail setting, Smoke and Spark particles are not drawn, but they still move and expire.
A name outside the seven, or no name, leaves the type with no behavior. Its particles stay where they were created, show frame 0 of their artwork, and are removed when their MaxEC lifetime runs out.
The particle’s behavior is separate from its holding system’s. The system’s BehavesLike decides how particles are emitted and aimed and whether NextParticle successors are created. This key decides what each particle does once it exists.
Particle system behavior
- Applies to
- ParticleSystemType
- File
rules.ini- Section
[<ObjectType ID>]- Value
- string
- When omitted
noneThe read's default is no behavior, not the behavior already in force, so a later file that contains the section without this key leaves the type with no behavior at all.
Selects what every system of this type does on its turn. The value is one of seven names, matched without regard to letter case, so spark and Spark are the same behavior. Each behavior reads a different part of the section, and settings it does not read have no effect. What each system behavior reads lists them setting by setting.
| Value | What a system of the type does each frame |
|---|---|
Smoke | Emits a particle on an interval that lengthens as the plume ages, and replaces each expiring particle that has a NextParticle with two of them, thrown out to either side. It follows the object it is attached to, unless that object is a structure. |
Fire | Emits a particle toward a point that sways from side to side across the line of fire. While the firer has a target and its body is still turning, the stream re-aims along the body’s facing. |
Spark | For a fixed number of frames, throws a burst of particles on a random chance each frame, each particle flung along a randomly deflected direction. |
Railgun | On its first frame, lays one corkscrew of particles along the line from the firer to the target and, with Laser=yes, draws a beam along it. After that it only ages the particles it laid. |
Gas, WeakGas, Web | Drifts the particles it holds and replaces each expiring one with that particle’s successor, in place. It emits nothing, so every particle it holds arrived from outside, such as from a warhead’s blast, or is a successor of one that did. |
[MyRailgunSys] ; a ParticleSystemType registered in [ParticleSystems]BehavesLike=RailgunHoldsWhat=MyRailgunPart ; a ParticleType registered in [Particles]SpiralRadius=15ParticlesPerCoord=.15Laser=yesLaserColor=25,20,255Gas, WeakGas and Web systems treat their particles identically. They differ in one place: an ordinary blast from a warhead whose Particle names a Gas system releases its particle into the scenario’s shared gas cloud and builds no system of its own. A WeakGas or Web system named there is built normally.
A damaged object picks its sparks from the Spark entries of its DamageParticleSystems and its smoke from the Smoke entries. An entry with any other behavior is never used.
The same seven names on a ParticleType’s section are a separate setting, and there Gas, WeakGas and Web do differ.
HoldsWhat, Lifetime, Particle, DamageParticleSystems, AttachedParticleSystem, MaxEC, NextParticle, Velocity, WindEffect, Warhead