Skip to content

ColorList

The colors a spark or railgun particle blends through as it ages.

Specification
Applies to
ParticleType
File
rules.ini
Section
[<ObjectType ID>]
Value
rgbclass list
When omitted
(empty)
rules.ini
[MYSPARK] ; a ParticleType registered in [Particles]
BehavesLike=Spark
MaxEC=500
XVelocity=10
YVelocity=10
ZVelocityRange=15
ColorList=(255,255,255),(200,200,80),(200,10,10),(0,0,0)
ColorSpeed=.13

Only Spark and Railgun particles use the list, because they are drawn as a single colored pixel. Particles of other behaviors are drawn from artwork and ignore it.

The particle’s color changes through the list in order:

  1. It starts at the first entry. If StartColor1 or StartColor2 is set to anything but black, it starts instead at a random blend of those two colors.
  2. It fades from its starting color to the second entry, then from each entry to the next, at the rate ColorSpeed sets.
  3. When it reaches the last entry, it keeps that color for the rest of its life.

Write each color as a red, green and blue triplet in parentheses, with commas between the triplets. The components are counted in threes from the start of the line, whatever the parentheses say, so a triplet with a missing component shifts every color after it. An incomplete triplet at the end is dropped. Each component is stored in one byte, so 256 reads as 0 and 300 as 44.