Skip to content

Settings

The module registers seven settings. Six are visible in Configure Settings → Token Light Condition. The seventh (enable) is controlled by the lighting toolbar button and is not shown in the settings UI.

NameScopeTypeDefaultNotes
Show TokenHudClientBooleanOnToggles the lighting badge in the token HUD. See Token HUD Indicator.
Add Token EffectsWorldBooleanOnWhen off, the module still tracks lighting via the lightLevel flag but does not apply Dark or Dim ActiveEffects. See Active Effects.
Global IlluminationWorldBooleanOffWhen on, scene-wide global light grants Bright before individual sources are evaluated. See Light Source Handling.
Delay CalculationsWorldNumber0Range 0-3000 ms, step 50. Debounces recalculations so bursts of events resolve in one pass.
Negative Lights SupportWorldBooleanOffExperimental. Lets sources with negative luminosity downgrade the condition. See Light Source Handling.
Logging LevelClientChoiceWarnings & ErrorsOff, Errors Only, Warnings & Errors, All Messages. Controls the verbosity of console output. Level 1 routes through console.error, level 2 through console.warn, and level 3 (verbose) through console.debug. All levels use a coloured module prefix for filtering.

The world enable setting is registered with config: false and is intentionally hidden from the settings UI. Its value reflects the state of the Toggle Token Light Condition button in the lighting controls. Flipping the button writes to this setting; the setting’s onChange keeps the toolbar button’s active state in sync if the value is changed by another path (such as a macro or another GM client).

The setting defaults to true, so the module is enabled on first install.

The hints visible in the settings UI come from lang/en.json:

  • Show TokenHud: Choose to display the HUD element when right clicking on token.
  • Add Token Effects: Enable to add lighting condition effects to tokens. Disable to only track lighting with flags (TokenHUD will still work).
  • Global Illumination: Enable use of Global Illumination settings in determining token light conditions.
  • Delay Calculations: Delays the light condition calculation by the configured milliseconds.
  • Negative Lights Support: Negative luminance will provide dim or dark conditions instead of removing them.
  • Logging Level: Control the verbosity of console logging for debugging purposes.

The settings UI also displays the section header Experimental Options above the Negative Lights setting (sourced from TOKENLIGHTCONDITION.Settings.ExperimentalOptions).

SettingWhat flipping it triggers
enable (hidden)Syncs the toolbar button’s active state to match the new value and re-renders controls. Token refresh on enable and effect clearing on disable are handled by TokenHelpers.toggleModule(), called from the toolbar button’s own onChange, not from this setting’s handler.
Add Token EffectsWhen turned on: re-initializes the effects system for the current game system. When turned off: refreshes all token lighting (which will skip effect creation).
Global IlluminationRefreshes all token lighting so the new value is applied immediately.
Logging LevelUpdates the in-memory log level so future log calls respect the new verbosity.
Show TokenHud, Delay Calculations, Negative Lights SupportNo immediate refresh. The new value takes effect on the next recalculation.