the torch
Codex's own light on the hero. NetHack has no such light.
Builtneeds review7 changes builtSeen all the timeLast touched November 27, 2026: a change of its own was written or changed. Commit b837665c3.
In the terminal
The terminal has no light: what the hero sees is which squares the game draws as seen (a lit room whole, a dark place only next to you); a lit lamp changes which squares are shown, not how bright anything is.
Quotes from NetHack
Show corridor squares seen by night vision or a light source held by your character as lit (default off). Persistent.
Decisions
The hero's light burns the mist off, thinner with distance.
Codex draws itFull text
Fog of war is burned off by the hero's light: the mist thins continuously with distance from the hero (shader), instead of each square opening on arrival.
Backlog decisions: D-21Blind, the torch goes out.
Codex draws itFull text
Blindness (status "Blind") puts the torch out; only what the game shows. Fades over blind_fade_seconds to blind_torch (0: out); outlines and letters remain.
Backlog decisions: N-29In Codex
While the hero is blind the torch fades out, leaving only the glowing letters and lines.
BuiltReaction to an event
Details
Blindness (N-29): while the status line says Blind, the torch fades over torch_blind_fade_seconds to torch_when_blind of its strength (0: out); the glowing letters and whatever the game still shows remain (felt and remembered squares as the game draws them). Faithful to the console (X-622, D-128 question 71: "Let's stay faithful to Nethack, whatever that is in the console."): while Blind the console draws every remembered floor with the dark room symbol and lit corridors as plain ones, and the stone darkens exactly there, square by square, from the glyphs the port sends (nh_site::map_light; a lit room loses its own light and goes to pencil). Blind is the first row of the table of conditions (X-975, nh_plays::lanes::conditions::blind): the place's dark as far as it has come on; the light over the explored map and the faint light everywhere stay, since the console still draws the whole remembered map. Behind blind_dims_the_lights_of_moments (off until the director has seen tests/films/blind-moments-*.json), the lights the plays bring (a fountain's answer, a prayer's, an altar's flash) dim to the torch's share. The idea of a world falling back to remembered outlines (idea 30) and whole-screen conditions (P-4) are not built.
- Id
codex.blind- Exact state
- Built
- Playtests
gallery-hero,blind-moments-as-now,blind-moments-dim- Settings
light.torch_when_blind,light.torch_blind_fade_seconds,light.blind_dims_the_lights_of_moments- Code
crates/codex-client/src/pov.rs,crates/codex-client/src/conditions.rs,crates/nh-plays/src/lanes/conditions.rs,crates/nh-plays/src/lanes/conditions/blind.rs,crates/nh-state/src/lib.rs,crates/nh-plays/src/light.rs,crates/codex-client/src/draw/in_flight.rs
| N-29 | Done | 5 | Blindness (status "Blind") puts the torch out; only what the game shows. |
An eerie feeling in an empty temple or a graveyard draws your lantern in and cools it for a moment.
Builtneeds reviewReaction to an event
Details
N-669 (the slate of 2026-11, D-138: go-ahead). An untended temple's "You have an eerie feeling...", "You feel like you are being watched." or "A shiver runs down your spine." (priest.c:506-512, one of the three or nothing, rn2(4)) and a graveyard's "You have an uncanny feeling..." as the hero enters it by day (hack.c:3691) each play one beat on the hero's lantern, the only source that changes: over 1.2 s its reach draws in to 0.45 of the torch's range, it burns half as bright and its light turns most of the way (0.8) toward a cold blue (hue 240, chroma 0.16): in a lit room the lantern is a small share of the light, and less read in no view but first person; it holds while the line is read and eases back over 1.3 s, gone by 4 s. From the high views the hero's pool of light on the map shrinks and cools for the same moment. Every line plays the same, so the light tells no more than the words. It is a moment and not a look for the room, because the port never says where the room ends. The hero's @ gains contrast as the warm pool under it goes (5.1 to 7.0:1 held, against 3.6 to 4.6:1 at 0); far letters at the pool's edge dim for the moment and return. Louder holds longer, never colder or darker (D-92). Its look-alikes are read as nothing: the midnight graveyard's "Run away! Run away!" (hack.c:3689), a magic trap's "A shiver runs up and down your spine!" (trap.c:4386), a spellbook's "A chill runs down your spine." (spell.c:254), the forbidding feelings (priest.c:476) (tests/lines/eerie.txt). Its family plays no light of its own (no file in nh-plays brings/, so the table of lines holds it quiet): built on the table of conditions (X-975, nh_plays::lanes::conditions::eerie): the hero's lanes lantern_reach, lantern_dims and lantern_tinge, which the client's lantern takes in Hero::burns and Hero::lit.
- Id
codex.eerie_feeling- Exact state
- Built, not reviewed
- Settings
light.eerie_feeling_strength- Code
crates/nh-moments/src/catalog/happened/eerie.rs,crates/nh-plays/src/lanes/conditions/eerie.rs,crates/nh-knobs/src/light/eerie_feeling.rs
| N-669 | Built, not reviewed | An eerie feeling cools the light |
Weak or fainting with hunger, the lantern burns low and gutters like a failing flame.
BuiltReaction to an event
Details
Hunger on the hero's lantern (N-484, Dad: "When you are so hungry you are weak maybe there would be a fading light and your character light would flicker in a wimpish sort of way."; D-126 question 49: go-ahead). While the status line's hunger word is Weak (eat.c:70, written by botl.c) the lantern burns half as bright (0.6 gone from the map view, where its pool is small beside the room's light) and gutters, a weak, uneven flame on the game's clock: three waves of 0.6 to 1.6 s that never line up again, a quarter either side, so it sinks and recovers now shallow, now deep; no frame moves it by more than a twentieth. Fainting is two thirds gone (0.72 from above), guttering the same, never out; Fainted, while the hero lies passed out, is the same row, so the light does not brighten as the word hands over. From the high views, where the lantern's pool is a few dozen pixels, the pool also draws smaller (0.7 of the torch's range at Weak, 0.55 at Fainting; Hero::lantern_reach, which the client's torch reads, X-2250), and in every view its edge wavers with the gutter, 0.12 of the range either side. It comes and goes over hunger_seconds. The amounts were measured in films against their twins at strength 0 on the pool beside the @, in a dark corridor and the lit room (N-484's card): the first amounts, a third gone, sank the pool only a tenth even in the dark. The lantern's own breath (N-314, slow, 5%) goes on beneath it. "You feel strong!" is its own treatment, codex.strong, its knob in the same file. Built on the table of conditions (X-975, nh_plays::lanes::conditions::hunger): the hero's lanes lantern_dims, which the client's lantern takes in Hero::burns, and lantern_reach, the torch's range in pov.rs.
- Id
codex.hunger- Exact state
- Built
- Playtests
gallery-hunger,hunger,hunger-as-now- Settings
light.hunger_strength,light.hunger_seconds,light.strong_strength- Code
crates/nh-plays/src/lanes/conditions/hunger.rs,crates/nh-knobs/src/light/hunger.rs,crates/nh-plays/src/lanes.rs,crates/codex-client/src/pov.rs
| N-484 | Built, not reviewed | The hero's light shows hunger and strength |
A faint glow in the air around the lantern, so it reads as a lantern and not a spotlight.
Builtneeds reviewCamera or view
Details
Air in the light (N-313): the air the lantern lights glows faintly, brightest beside the lantern and gone lantern_air_reach squares out, summed along each view ray in closed form up to the first surface (a depth prepass), so the air behind a wall or a letter adds nothing. Added light only: it never hides a letter or a square. It follows the lantern's brightness (its breath, Blind, the terminal view) seen from behind the hero it is a halo close around the lantern (lantern_air_from_behind), and it thins away as the camera rises. In a trip it takes the lantern's gel, never the torch's own color, so the air and the light the lantern throws agree (X-178). At [picture] quality low there is none, and no depth prepass.
- Id
codex.lantern_air- Exact state
- Built, not reviewed
- Playtests
gallery-lit-room,gallery-dark-corridor,gallery-trip-moments- Settings
light.lantern_air,light.lantern_air_reach,light.lantern_air_from_behind- Code
crates/codex-client/src/pov/air.rs,crates/codex-client/src/pov.rs,assets/shaders/lantern_air.wesl
While the hero is sick the lantern's light turns toward a sickly green, as bright as it was.
BuiltReaction to an event
Details
Sick, the hero turns green (N-485, Dad: "When you feel sick you could turn a pukey shade of green."; D-126 question 50: "the lantern's light tinged green while Ill or FoodPois shows"). While the status line shows FoodPois or TermIll (botl.c:181 and 183), the lantern's light, and the air round it, turn toward a green (OKLab hue 140°, chroma 0.30, where the gel saturates) at the light's own brightness, three quarters of the way close by and the whole way from the map view (from_above, ByView), coming on and going over sick_seconds. The amount was measured against strength 0 in all four views (the hue of the light round the hero moves from the torch's orange, 44° to 56°, to 100° to 125°; N-485's card) and every letter keeps its strength-0 ratio. The first row built on the table of conditions (X-975, nh_plays::lanes::conditions::sick): the hero's lane lantern_tinge, data only. Brown and yellow letters keep their own colors. The director's note on the same answer ("maybe sort of slink or slime around slouching") is a pose of the hero's motion, a row of its own (N-2232).
- Id
codex.sick- Exact state
- Built
- Playtests
gallery-sick,sick,sick-as-now- Settings
light.sick_strength,light.sick_seconds- Code
crates/nh-plays/src/lanes/conditions/sick.rs,crates/nh-knobs/src/light/sick.rs,crates/nh-plays/src/lanes.rs,crates/codex-client/src/pov.rs
| N-485 | Built, not reviewed | Sick, the hero turns green |
When the game says you feel strong, the lantern beats bright three quick times.
BuiltReaction to an event
Details
Feeling strong on the hero's lantern (N-484, Dad: "When you feel strong your light should be strong and pulsate quickly a few times."; D-126 question 49: go-ahead). "You feel strong!" and "You feel very strong!" (attrib.c:195, plusattr at attrib.c:11: strength gained, from a potion, a giant's corpse, a fountain, a throne or exercise alike; "very" for more than one point, the same beat) play one beat: the lantern up to twice as bright over 0.6 s, beating three times in 2.2 s between three fifths of that and the whole of it, then as it was; no frame moves it by more than a tenth. Louder plays more beats for longer, never brighter. Its look-alikes are read as nothing: every other attribute gained or lost, a god's "You feel stronger." (pray.c:442), hunger's "You feel weak." (eat.c:3495), the sink's "The water flow seems stronger now." (do.c:540) (tests/lines/attributes.txt). Built on the table of conditions (X-975, nh_plays::lanes::conditions::hunger, hunger::Said::FeelStrong): the hero's lane lantern_flares, which the client's lantern takes in Hero::burns.
- Id
codex.strong- Exact state
- Built
- Playtests
gallery-hunger,hunger,hunger-as-now- Settings
light.strong_strength- Code
crates/nh-plays/src/lanes/conditions/hunger.rs,crates/nh-knobs/src/light/hunger.rs,crates/nh-moments/src/catalog/happened/attributes.rs,crates/nh-plays/src/lanes.rs,crates/codex-client/src/pov.rs
| N-484 | Built, not reviewed | The hero's light shows hunger and strength |
The hero always carries a warm flickering torch that lights the walls, floor and objects nearby.
BuiltCamera or view
Details
The hero always carries a torch: a warm point light (torch_brightness, torch_reach squares, torch_color) in a warm lamplight (torch_color 1.0, 0.75, 0.50: N-283 took it from the orange 1.0, 0.70, 0.42, which melted brown and yellow letters into its pool, to 1.0, 0.80, 0.58, and the director asked for it a little warmer again, midway) held like a lantern (N-277): torch_height above the floor, torch_behind behind the hero and torch_to_the_side to their right, so the floor a few squares ahead takes more of it than the hero's own square, the wall ahead in first person is not blown out, and shadows fall forward where the camera sees them; breathing slowly and swaying a little (N-314: three slow waves on the game's clock, torch_flicker and torch_sway; the director's go-ahead under D-17 on 2026-11-03), casting shadows; it lights the stone, the floor and the objects (the mist only takes a faint warmth from it close by, N-275); monster letters glow by themselves. It is Codex's own light, not NetHack's: it does not follow whether the hero stands in a lit room. Out in the terminal view and while Blind. When the game says the hero's own light went out ("Your lamp is now off.", "Your lantern has run out of power.", "You snuff out your candle.", a `Lamp` moment, X-137, D-114 question 13: a lamp turned off dims the torch) it burns at torch_with_your_lamp_out of its brightness, fading over torch_lamp_fade_seconds, and back when one is lit again; D-128 (question 68): half (0.5), until the game says a lamp is lit again; at 1 nothing changes. Filmed in tests/films/lamp-out-*.json. The game never says whether another light the hero carries still burns: the last of its words is taken.
- Id
codex.torch- Exact state
- Built
- Playtests
gallery-hero,gallery-dark-corridor,gallery-lit-room,lamp-out-as-was,lamp-out-half- Settings
light.torch_brightness,light.torch_reach,light.torch_color,light.torch_flicker,light.torch_sway,light.torch_casts_shadows,light.torch_height,light.torch_behind,light.torch_to_the_side,light.torch_with_your_lamp_out,light.torch_lamp_fade_seconds- Code
crates/codex-client/src/pov.rs,crates/nh-plays/src/light.rs,crates/codex-client/src/conditions.rs,crates/nh-moments/src/catalog.rs
Accepted pictures and playtests
A change to how this looks is compared with these pictures before it is accepted.
gallery-countdowns, stone climbing first person 1. Accepted November 21, 2026. Renderer: NVIDIA GeForce GTX 1660 Super.gallery-hunger, strong first person 1. Accepted November 21, 2026. Renderer: NVIDIA GeForce GTX 1660 Super.gallery-sick, coming on first person 1. Accepted November 21, 2026. Renderer: NVIDIA GeForce GTX 1660 Super.gallery-dark-room, dark room. Accepted November 21, 2026. Renderer: NVIDIA GeForce GTX 1660 Super.gallery-dark-corridor, dark corridor. Accepted November 21, 2026. Renderer: NVIDIA GeForce GTX 1660 Super.gallery-ghosts, ghost. Accepted November 21, 2026. Renderer: NVIDIA GeForce GTX 1660 Super.gallery-lit-room, lit room. Accepted November 21, 2026. Renderer: NVIDIA GeForce GTX 1660 Super.Playtests: gallery-hero, blind-moments-as-now, blind-moments-dim, gallery-hunger, hunger, hunger-as-now, gallery-lit-room, gallery-dark-corridor, gallery-trip-moments, gallery-sick, sick, sick-as-now, lamp-out-as-was, lamp-out-half
Planned and proposed
In progress For each square, the light that falls on it, summed from every source the game shows.
Left to do: The torch as a source is round 2, then room light by region, lamps and lit monsters.
Details for builders
Id: torch. Lexicon subjects: lens.torch.
Design notes from NetHack
Lit rooms, carried light sources, and the lit_corridor option, which shows corridor squares seen by night vision or a held light source as lit.
Backlog rows
| N-29 | Done | 5 | Blindness (status "Blind") puts the torch out; only what the game shows. |
| N-669 | Built, not reviewed | An eerie feeling cools the light |
| N-484 | Built, not reviewed | The hero's light shows hunger and strength |
| N-485 | Built, not reviewed | Sick, the hero turns green |
| X-62 | Built, not reviewed | The light field |




















