Director ​
The director decides when a scene appears. It rolls every 7 to 9 hours (random inside the window), hits with a 50 %
chance and picks a template by weight among the eligible ones, then a free spawn point for it. Nobody is told:
every roll goes to env_rolls, the staff log (np_admin, or an np_discord channel) and the server-local
np_environmental:rolled event, never to players or factions.

A roll ​
- Due? Every
Config.Director.tickSeconds(30) the director checks whether the next roll is due. The time of the next roll is drawn insideConfig.Director.intervalafter the last roll and stored inenv_meta, so a restart never resets the clock. With population scaling on, the window is multiplied byhighFactor(0.75) at 48 players or more and bylowFactor(1.5) at 12 or fewer. - Room? With
maxLive(3) scenes live, the roll is a miss (max_live). - Coin flip. Below
chance(0.5) it is a hit, otherwise a miss (chance). - Pick a template by weight among the eligible ones. None eligible: a miss (
no_template). - Pick a spawn point for it that nobody is near. When the template has none free, the next template is tried; when
no template has one, the roll is a miss (
no_spawn). - Spawn. The
beforeSpawnhook may veto (vetoed). The template goes on its cooldown.
Roll reasons: hit, chance, max_live, no_template, no_spawn, vetoed, paused. Staff see them in the
history; players never do.
Eligible templates ​
A template is skipped when it is: invalid, disabled, weight 0, staff only, already live, on its template cooldown
(Config.Director.cooldown, 24 h), outside its weather or hours, below minPlayers, or (with
Config.Director.clearableOnly) no faction on its list that can clear it has conditions.minOnDuty members on duty,
or it has no enabled spawn point.
Weather comes from GlobalState.weather / GlobalState.currentWeather (Config.Director.weatherProvider = 'auto');
set it to a function or 'hook' (Config.Director.weatherHook) for other weather resources, or false to ignore
weather conditions. The hour comes from GlobalState.currentHour / .clockHours, else the server clock
(Config.Director.hoursProvider).
Free spawn points ​
A spawn point is free when no player is within Config.Scenes.noWitnessRadius (150 m), no live scene is within
Config.Director.sceneGap (300 m), and no scene spawned within areaRadius (500 m) inside areaCooldown (24 h). With
np_drugs, spawn points near a lab count several times for chemical scenes. A zone gives a
random spot inside it.
The director screen ​
/envdirector (or the np_admin tool Open the director) opens it. It needs the np_environmental.director node (or
.admin).
| Panel | What it shows |
|---|---|
| Next roll | Countdown, the window it was drawn in, the coin flip; Roll now (the same coin flip as a real roll) and Spawn a pick (pick a template, it spawns at one of its free spawn points, no coin flip) |
| Rules | Interval, chance, lifetime, live at once, Scale with population, Need someone to clear it (clearableOnly), No repeats (cooldowns) |
| Last 7 days | Every roll per day: cleared (bar = spawn to clear), expired (nobody found it), skipped; rolls, scenes, cleared and expired counts |
| Live | Map of the live scenes with their progress, heat where scenes get found fastest, ghost pins for the spawn points. T teleports, Del removes a scene |
| Live scenes | Each with its state (reported, units on scene, progress) and time left |
| What the next roll would pick | The odds of every eligible template after the filters (live and cooling-down templates are out) |
| Is it working? | Share cleared, average time to the first report, average time to clear |
The top bar shows whether the director runs, players and on-duty counts, Pause spawns / resume, and Clear all
scenes (live scenes are cleared as staff without pay, expired ones removed).
| Paused | Quiet (nothing live) |
|---|---|
![]() |
![]() |
Rules ​
The screen may change exactly the rules in Config.Director.editable:
| Rule | Range | Config key |
|---|---|---|
interval |
600 s .. 7 days, min <= max |
Config.Director.interval |
chance |
0..1 | Config.Director.chance |
maxLive |
0..20 | Config.Director.maxLive |
lifetime |
60 s .. 7 days | Config.Scenes.defaultLifetime (templates without a lifetime) |
clearableOnly |
on / off | Config.Director.clearableOnly |
cooldown, areaCooldown |
0 .. 30 days | Config.Director.cooldown, .areaCooldown |
areaRadius, sceneGap |
0 .. 5000 m | Config.Director.areaRadius, .sceneGap |
scaling |
on / off | Config.Director.scaling.enabled |
Changes are stored in env_meta (director.rules) and written back into Config at start, so the screen and
np_admin's Resource settings agree. Every change, roll, pause and staff spawn is logged.
From code ​
SpawnScene(templateId, where?, opts?)spawns a template at coordinates, a spawn point, or the director's pick of a free spawn point (beforeSpawnruns withsource = 'export').- The
beforeSpawnhook vetoes any spawn (director, staff, export, chain). np_environmental:rolledfires on every roll with{ hit, template, scene, reason }.- The np_admin tools Roll the director now, Pause the director, Resume the director and Clear all scenes do the same as the screen (see Staff).

