Skip to content

Gaslight v2.0.0: Scripting engine + unified relay#2265

Open
KenanMillet wants to merge 55 commits into
Roll20:masterfrom
KenanMillet:Gaslight
Open

Gaslight v2.0.0: Scripting engine + unified relay#2265
KenanMillet wants to merge 55 commits into
Roll20:masterfrom
KenanMillet:Gaslight

Conversation

@KenanMillet

@KenanMillet KenanMillet commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Major update adding a reactive scripting engine for per-player automation, unified relay system, and RollCapture integration.

Scripting Engine (new in v2.0.0)

  • Pin-based scripts stored in handouts, activated per-page
  • Per-viewer per-target evaluation with automatic trigger detection
  • Aggregate functions: any(), all(), max(), min(), join()
  • viewer.* and gm.* namespaces for player/GM token references
  • // comments in scripts
  • Auto-triggers from @(target.gl_*) references, or explicit trigger: config
  • !gaslight eval [--dry-run] [--all | <handout>]
  • RollCapture integration: captured roll values auto-trigger pin re-evaluation

Unified Relay (new in v1.1.0, included)

  • Universal auto-relay: master-page commands relay to all player pages transparently
  • Loop prevention via relay key set (command + sender + selected IDs)
  • relayCommands exception for player-page commands
  • Removed _lastpage polling — relies on SelectManager 1.1.15 cross-page ID lookup

Other

  • Help handout created on init with full documentation
  • --assign-capture / --clear-capture for per-token roll value overrides
  • --script-lock/--script-unlock prevents scripted commands from being re-relayed

Dependencies

  • Anchor, Mirror, SelectManager (required)
  • RollCapture (optional, enables roll-triggered scripting)
  • Meta-Toolbox: Fetch, APILogic, MathOps (for script condition/command resolution)

Tested

  • Auto-relay from master page (selection + IDs in command)
  • relayCommands from player page with loop prevention
  • Script evaluation: any/all/max/min/join expansion verified via dry-run
  • Auto-trigger pipeline: RollCapture → attribute write → triggerMap → evaluatePins
  • Blocked: Fetch does not resolve @() in API-originated sendChat (reported to timmaugh)

…elaying set loop prevention, remove _lastpage polling
…utes, token assignment with charId validation
…g, gl_ fallback, restore script-lock, remove debug
…nd in commands list, remove SCRIPTING_DESIGN.md
…ollCapture integration, aggregation, versioned folder
@KenanMillet KenanMillet changed the title Gaslight v1.1.0: Unified relay with cross-page SelectManager Gaslight v2.0.0: Scripting engine + unified relay Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant