Skip to content

Lights

Every light the scripts make with the long form of SetLight(0, type, pos, dir, colour, radius, cone, coronaHeight, coronaPull, coronaSize, lights, effects, corona, state) (Lighting). global.lua builds each level's moonlight, reflected and ambient light from the level's LightData; level scripts add their lamps, most kept in a Lights table.

What is complete

Every 14-argument SetLight call; arguments the script computes show none. The corona parameters and the effects word are not listed.

5,283 entries. Data: research/references/lights.yaml.

Pages

Level Entries
level2 143
level3 155
level5 128
level9 95
level11 149
level14 167
level20 247
level31 133
level34 68
level51 247
level52 165
level54 314
level55 142
level63 31
level80 109
level81 56
level82 253
level83 247
level84 16
level86 201
level87 165
level92 271
level93 116
level95 350
level99 90
level101 69
level102 45
level104 56
level105 10
level107 23
level108 71
level109 53
level110 4
level111 58
level112 257
level113 34
level116 8
level118 23
level120 43
level121 21
level122 18
level123 5
level124 11
level126 19
level127 32
level128 7
level129 98
level130 40
level131 21
level132 5
level133 84
level134 37
level136 27
other 46

Sources and evidence

Evidence levels used: confirmed-code.

  • the level scripts and global.lua, SetLight

Fields

Field Type Hand-written Meaning
id str <script>:<n>: the script and the call's place among its SetLight calls.
level str The level whose scripts make the light; none for global.lua.
name str The key the script keeps the light under in its Lights table, when it does.
type str Second argument: point, spot, directional or ambient.
pos list Third argument: position {x, y, z} in metres (point and spot lights).
dir list Fourth argument: direction (spot and directional lights).
rgba list Fifth argument: colour {r, g, b, a}, components 0-1.
swatch str A swatch of the colour (rendered).
radius float Sixth argument: radius in metres.
cone float Seventh argument: a spot light's cone.
flicker int Thirteenth argument: the corona, 0 none, 1-6 a rectangle of the lighting sheet.
flicker_params list Eighth to tenth arguments: the corona's height, pull towards the camera and size, in metres.
group int Eleventh argument, 0-3: what the light lights (bit 0 objects, bit 1 the world).
priority int Twelfth argument, the effects word: bit 0 light bugs, bits 1-4 a flicker mode.
state int Fourteenth argument: 1 on, 0 off, 2 removes the light.
script str The script that makes it (without .lua).
source str yes Where the entry comes from: a script and binding, an address, a chunk.
evidence str yes How we know: confirmed-code, confirmed-runtime, inferred or speculative (evidence levels).
notes str yes Our own short notes.