UODiamondCodex

Automated Light System

A single "clock" object that runs a 24-hour day/night cycle, dimming and brightening the world light level and keeping dungeons, towns, and special rooms at fixed light levels. Source: UOD - System Lights.scp.

How it works

The item Automated_light ("Automated Light System") is an invisible clock. It tracks an in-game time in tag.hrs / tag.mins, advancing 15 minutes every timer tick (the timer re-arms at 500). At 24:00 it wraps back to 0:00.

Key times drive world lighting (it moves to p=1,1 and sets region.light):

In-game time Effect
02:00 World light → 10 (dusk); plays sound 11 to all clients
03:00 World light → 0 (full dark)
23:00 World light → 15 (bright/day); plays sound 10 to all clients

Double-clicking the clock reports the current time (<hrs>:<mins>).

Every tick it also runs ResetLights, which pins fixed light levels on specific regions regardless of the day/night cycle:

  • Dungeons (covetous, ice dungeon, shame, wrong, deceit, despise, destard, hythloth, fire dungeon) → light 15 (kept dark).
  • Rooms/areas (starting room, character skill room, tourney area, green acres 1/2/3) → light 0 (kept fully lit).

Key definitions

DEFNAME Role
Automated_light The day/night clock; ticks every 15 in-game minutes
ResetLights Forces fixed light levels on dungeons and special rooms each tick
tag.hrs / tag.mins The clock's tracked in-game time

Note: Higher region.light values are darker (15 = darkest, 0 = brightest) in SphereServer. Only one Automated_light object should exist. The ResetLights list ends at coordinate p 5468,1081 (the script's final line is cut mid-block in the source).