Gaslight 2.3.0 — !gaslight quick, nested splits, marketplace-safe staging - #2322
Merged
Conversation
- Add supportsCreateCopy() feature detection for graphic.createCopy (experimental sandbox) - Add canStageToken() as the single copy-ability check, used by all staging paths - stageTokenToPages uses createCopy when available (preserves marketplace imgsrc/sides), falls back to createObj - onTokenAdded now reports staging failures to the GM instead of silently swallowing them
Configure + split in one step using existing page copies, filling any shortfall from reusable GLS-SCRAP pages. - Clones master page settings + contents (graphics via createCopy, plus paths/pathv2/text/pins/doors/windows) onto scrap pages, preserving z-order by creating in _zorder order (engine auto-fronts each new object) - Seeds _zorder on pristine scrap pages to avoid the engine adjustZOrder crash - Excludes Gaslight config text and [GLS] script pins from cloning - isScriptPin now requires the linked handout to carry the [GLS] prefix - On merge: wipes + renames scrap pages back to GLS-SCRAP (cascade suppressed via destroying guard); if all player pages were scrap, also strips the master's GM config text and restores its name - Optional group name (auto-generated if omitted); requires experimental sandbox (graphic.createCopy); async with completion whisper
quick's auto-generated group name is now a readable fantasy name (e.g. arcane-dragon) via ScriptKit.randomName, with a useCount check that skips names already used by an existing group. Falls back to genId() if ScriptKit is unavailable. Updated the quick help entry.
…ides - Per-player page stacks: split/quick push each player's page; merge (no arg) ends the most-recently-activated split and returns each player to the most recent group they're still in (or the banner page). merge <group> targets a specific group anywhere in the stack. - !gaslight merge-all — end all active splits at once - Group name optional for setup and quick: readable name auto-generated via ScriptKit.randomName; first arg treated as a player unless it doesn't resolve. Shared resolveGroupName() helper. - Adaptive getting-started guide (quick vs manual by createCopy availability, memoized) + standalone manual-setup guide registered only when quick exists; guide prompts resolve the actual group name dynamically. - Scratch pages renamed GL-SCRATCH (was GLS-SCRAP), detected through 'Copy of' prefixes; shared stripCopyOf helper; all references via SCRATCH_NAME constant. - Docs/handouts: 2.3.0 changelog; dropped redundant aliases and newSince (auto-fallback matches our versioning); removed unused GLS_TAG; user/dev handouts regenerate on the version bump.
…rding - quick: validate all target pages' z-order up front and abort atomically if any page is uninitialized (never viewed) — no partial setup. Error lists the pages to open once so Roll20 initializes them. - getting-started: compose the guide at registration (quick vs manual variant) instead of per-step when checks; keeps the experimental-sandbox tip on the manual variant. - Correct z-order guidance: a page needs to be viewed once (not have an object placed) to initialize its _zorder.
- Add Gaslight/2.3.0/ version snapshot - Update script.json: version 2.3.0, previousversions, description refreshed with the 2.3.0 changelog + command list (ScriptKit added as a dependency) - README: quick vs manual quick-start, quick/merge-all commands, v2.3.0 + v2.2.2 changelog entries, ScriptKit >= 1.4.0 requirement
Alicekb
approved these changes
Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Gaslight 2.3.0 —
!gaslight quick, nested splits, marketplace-safe stagingSummary
Adds a one-command setup (
!gaslight quick), marketplace-safe token cloning, nested-split support via per-player page stacks, and quality-of-life improvements (optional auto-generated group names,merge-all, adaptive getting-started guide).What's new
!gaslight quick [group] [players...]— configure + split in one step. Clones the master page onto existing page copies and/or reusableGL-SCRATCHscratch pages (their settings + contents are cloned from the master, preserving z-order), configures the group, and splits — no manualsetup/split. Requires the experimental/Jumpgate sandbox (usesgraphic.createCopy). On merge, scratch pages are wiped and renamed back toGL-SCRATCHfor reuse; real duplicates are left untouched.quickvalidates every target page up front and aborts atomically (no partial setup) if a page's z-order isn't initialized.Marketplace-safe staging —
stage/clone now usesgraphic.createCopywhen available, preserving Marketplaceimgsrcandsides(previously these failed becausecreateObjrejects Marketplace URLs). Auto-stage failures are now reported to the GM instead of failing silently.Nested splits (per-player page stacks) — activating a second split no longer clobbers the first. Each player tracks a stack of the groups they belong to;
mergereturns each player to the most recent group they're still in (or the banner page). Because groups can involve different player sets, this is tracked per player.!gaslight merge/merge-all—merge(no arg) now ends the most-recently-activated split (top of the stack);merge <group>targets a specific group anywhere in the stack;merge-allends everything at once. (Behavior change:mergewith no argument used to end all splits — that's nowmerge-all.)Optional group names —
setupandquickno longer require a group name; a readable name (e.g.arcane-dragon) is generated via ScriptKit. The first argument is treated as a player unless it doesn't resolve to a player.Adaptive getting-started guide — the interactive guide walks the
quickpath on the experimental sandbox and the manual path otherwise; a standalonemanual-setupguide is offered whenquickis available.Files changed
Gaslight/Gaslight.js— all of the above.Gaslight/2.3.0/Gaslight.js— version snapshot.Gaslight/script.json— version 2.3.0,previousversions, refreshed description/command list; ScriptKit added to dependencies.Gaslight/README.md— quick-start (quick vs manual), command table, changelog, ScriptKit ≥ 1.4.0 requirement.Testing
Tested in-game on the experimental sandbox:
quickwith a master containing tokens (incl. Marketplace art), walls, doors, windows, pins, paths, and text → all object types clone with correct z-order; Gaslight config text and[GLS]script pins are excluded from clones.GL-SCRATCH; the master page keeps all its content (no cascade-deletion).quickabort path when a scratch page's z-order is uninitialized (never viewed) — nothing is changed and the GM is told which pages to open.script.jsonvalidated againstscript.json.schema.Advanced nested/stacked multi-group scenarios with differing player sets are an uncommon case; the underlying stack logic was verified in isolation.
Notes
merge(no arg) documented above.