Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
The Roll20 Black Friday sale is live now! Up to 30% Off Your Favorite Content!

[Script, Update] SwapTokenPositions

1793928121

Edited 1793929831
MidNiteShadow7
Pro
API Scripter
This update is already in the One-Click Installer. But you can download it directly from GitHub:&nbsp; <a href="https://github.com/steverobertsuk/roll20-api-scripts/releases/download/SwapTokenPositions-v2.1.0/SwapTokenPositions_v2.1.0.zip" rel="nofollow">https://github.com/steverobertsuk/roll20-api-scripts/releases/download/SwapTokenPositions-v2.1.0/SwapTokenPositions_v2.1.0.zip</a> Watch the How-To video: <a href="https://youtu.be/h6vKrvqYICg" rel="nofollow">https://youtu.be/h6vKrvqYICg</a> [2.1.0] - 2026-05-19 · Milestone Added Explicit token targeting via --token1 &lt;id|name&gt; and --token2 &lt;id|name&gt; flags. Both flags must be provided together; omitting one produces a clear usage error. Each input resolves by token ID first, then by token name on the active page. Ambiguous name matches (multiple tokens with the same name) are rejected with guidance to use a token ID. Cross-page explicit pairs are rejected the same as cross-page selection pairs. parseFreeStringFlag parser utility to handle quoted (space-containing) and unquoted string values. Explicit token access control via three new GM-only management commands (take effect immediately, no --save required): --token-input-access &lt;gm-only|all-players|selected-users&gt; — sets who may use --token1 and --token2 . --token-input-users &lt;id|name,...&gt; — replaces the allow-list with the specified players (resolved by ID then display name). --token-input-users-remove &lt;id|name,...&gt; — removes specific players from the allow-list. Default mode is gm-only . The GM is always permitted regardless of mode. --show-settings now includes Token Input Access and (in selected-users mode) Token Input Users . parseCommaListFlag parser utility for comma-separated quoted and bare values. Developer Build process now automatically syncs package.json version from script.json on each build. Build process now auto-increments the trailing build number on pre-release versions (e.g. 2.1.0.beta.0 → 2.1.0.beta.1 ) so the version is always up to date after each npm run build . Release versions ( major.minor.patch ) are not auto-incremented. Versioned archive folder now uses the base semver ( major.minor.patch ) rather than the full pre-release string, so pre-release builds update the same folder in place. Click here to view the original Roll20 forum thread on the SwapTokenPositions mod .
The Roll20 wiki now has a page for SwapTokenPositions 2.1.0: <a href="https://wiki.roll20.net/Script:SwapTokenPositions" rel="nofollow">https://wiki.roll20.net/Script:SwapTokenPositions</a> It covers every command and option, the presets, GM settings and upgrading from version 1.