Skip to content

feat(SwapTokenPositions): v2 modular rewrite + new FX pipelines#2216

Open
steverobertsuk wants to merge 18 commits intoRoll20:masterfrom
steverobertsuk:sr/swap-token-positions-v2
Open

feat(SwapTokenPositions): v2 modular rewrite + new FX pipelines#2216
steverobertsuk wants to merge 18 commits intoRoll20:masterfrom
steverobertsuk:sr/swap-token-positions-v2

Conversation

@steverobertsuk
Copy link
Copy Markdown
Contributor

Added

  • New staged FX pipeline with explicit origin, travel, and destination phases.
  • New FX flags: --origin-fx, --travel-fx, --destination-fx.
  • New timing flags: --origin-time, --travel-time, --destination-time, --swap-delay, --destination-delay.
  • New travel visibility flag: --travel-mode with values normal and invisible.
  • Preset system with portal, lightning, shadow, fire, magic, transport, and none.
  • --instant flag to force immediate swap.
  • Backward-compatibility parsing for legacy flags with deprecation warnings.
  • Modular multi-file source structure under src/.
  • Local build tooling (rollup) to generate single-file artifacts for Roll20.
  • Build banner metadata in generated output, including build timestamp.
  • Explicit same-page validation for selected tokens before swap.
  • Delayed pipeline safety checks that cancel gracefully if tokens disappear mid-sequence.

Changed

  • Refactored internal architecture from a monolithic file to source modules with a generated bundle.
  • Replaced the v1 mode-centric flow (--mode + repeated beam cycle) with a staged pipeline (origin -> travel -> swap -> destination) driven by stage FX and timing flags.

Deprecated

  • --mode (mapped for compatibility: beams -> --preset lightning, transport -> --preset transport)
  • --duration (replaced by --swap-delay)
  • --beam-fx (replaced by --travel-fx)
  • --burst-fx (replaced by --destination-fx)

steverobertsuk and others added 18 commits April 23, 2026 13:27
- Refactor SwapTokenPositions into a modular source architecture and generated bundle workflow.
- Add configurable multi-phase FX flow with origin, travel, and destination stages plus timing controls.
- Introduce new command flags, presets, instant mode, and settings validation support.
- Keep backward compatibility for legacy flags with deprecation warnings and migration guidance.
- Update metadata and documentation for the v2 command model, changelog, and testing notes.

Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>

Co-authored-by: Copilot <copilot@github.com>
- Add new travel visibility control via --travel-mode with normal and invisible options.
- Add transport preset and update preset defaults for better Roll20 FX compatibility (including lightning/shadow adjustments).
- Rework swap execution flow:
   - split phase timing into clearer origin, travel/swap, and destination windows
   - support invisible travel by temporarily moving tokens to GM layer, then revealing after swap
   - add swap verification retries before final success/failure handling
   - schedule destination FX after reveal/timing delays
- Harden string flag parsing by normalizing quotes and trailing punctuation in flag values.
- Extend config/state/help plumbing so travel mode is parsed, validated, persisted, and shown in override/settings output.
- Update docs and metadata to reflect the new command model and test coverage (README, CHANGELOG, TESTING, script.json).
- Update build metadata injection in Rollup/constants so build name/script/version/date are injected from script metadata.

Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>

Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
…travel time

Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
…iles.

Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
…ollisions.

Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
…ction

Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>

Co-authored-by: Copilot <copilot@github.com>
… compatibility warnings

Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
… addition of a developer guide for contributor setup and workflow

Co-authored-by: Copilot <copilot@github.com>
…timing and delays

Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
…age styling

Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>

Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
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