Skip to content

BehavesLike

The named behavior that decides which fixed routines drive a particle or a particle system.

Particle behavior

Specification — Particle behavior
Applies to
ParticleType
File
rules.ini
Section
[<ObjectType ID>]
Value
string
When omitted
noneNo name is supplied rather than the behavior already in force, so a later file that carries the section without this key leaves the type with no behavior at all.

Seven names are recognized. Each selects one routine that ages a particle of the type and, for four of them, one that moves it, and the choice is fixed — nothing else in the section changes which routines run.

ValueWhat a particle of the type does
GasSettles toward the ground and wanders sideways, glancing off terrain, bridge decks, walls and buildings, and poisons whatever shares its cell.
WeakGasMoves and ages exactly as Gas does, but never applies damage.
SmokeClimbs at its own speed, wanders a little to either side, and slows until it is rising at 3 leptons per frame.
FireCoasts along the line it was fired on, thins as its states advance, scorches everything sharing its cell except the object its system is attached to, and dies where the ground rises to meet it.
SparkFalls under gravity and dies where it strikes ground, a bridge deck or a wall. Drawn as a single lit pixel rather than from artwork.
RailgunRides its firing direction at a speed that wanders from frame to frame. Drawn as a single lit pixel rather than from artwork.
WebHolds its position and delivers its warhead, at zero damage, to everything in its cell every frame.

A name outside that set leaves the type with no behavior: its particles hold still, draw frame zero of their artwork, and do nothing but count MaxEC down to expiry.

The behavior a particle’s own section names is separate from the one its holding system names. The system’s behavior decides how particles are emitted and aimed and whether NextParticle successors are created at all; this one decides what each particle does once it exists.

Particle system behavior

Specification — Particle system behavior
Applies to
ParticleSystemType
File
rules.ini
Section
[<ObjectType ID>]
Value
string
When omitted
noneNo name is supplied rather than the behavior already in force, so a later file that carries the section without this key leaves the type with no behavior at all.

One of seven names, and it picks which update routine drives every system built from the type. Each routine reads a different part of the section, so most of the settings alongside it are consulted under one behavior and passed over in silence under the rest; what each system behavior reads gives the division setting by setting.

ValueWhat a system of the type does each frame
SmokeEmits a particle on an interval that lengthens as the plume tires, splits an expiring particle into a pair of its successors thrown out to either side, and rides along with a source that is not a building.
FireAims along the firer’s body facing while that facing is still turning, and launches a particle toward a point that swings in and out along the line of fire.
SparkThrows a burst of particles on a roll, each flung along a randomly deflected direction, for a fixed run of frames.
RailgunLays one corkscrew of particles along the line from the firer to the target on its first frame, draws the beam, and afterwards only ages what it laid.
Gas, WeakGas, WebDrifts the particles it holds and replaces each expiring one with that particle’s own successor, in place. It emits nothing of its own, so everything it holds arrives from whatever asked it for a particle.

Gas, WeakGas and Web drive their particles identically, so nothing a system of one of those three does with its particles distinguishes it from the other two. They part company only where a setting sorts systems by this value: a warhead’s Particle tests for Gas and for nothing else. The same three names on a particle’s own section do differ from one another, but that is a separate setting.

rules.ini
[MyRailgunSys] ; a ParticleSystemType registered in [ParticleSystems]
BehavesLike=Railgun
HoldsWhat=MyRailgunPart ; a ParticleType registered in [Particles]
SpiralRadius=15
ParticlesPerCoord=.15
Laser=yes
LaserColor=25,20,255

Two settings elsewhere read this value to choose between systems rather than to run them. DamageParticleSystems is one pool that is split into its Spark entries and its Smoke entries, and an entry carrying any other behavior is never drawn from it. A warhead’s Particle is tested for Gas before the blast decides whether to build a system at all: a gas type releases its particle into the scenario’s shared cloud instead.