Version 2.1.0 of SwapTokenPositions has now been released, introducing explicit token targeting and enhanced access control.
Discussions on the additions, changes and fixes can be found on the Roll20 forums: https://app.roll20.net/forum/post/12727681/new-swaptokenpositions.
Change Log
Added
- Explicit token targeting via
--token1 <id|name>and--token2 <id|name>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.
parseFreeStringFlagparser 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
--saverequired):--token-input-access <gm-only|all-players|selected-users>— sets who may use--token1and--token2.--token-input-users <id|name,...>— replaces the allow-list with the specified players (resolved by ID then display name).--token-input-users-remove <id|name,...>— removes specific players from the allow-list.- Default mode is
gm-only. The GM is always permitted regardless of mode. --show-settingsnow includesToken Input Accessand (inselected-usersmode)Token Input Users.
parseCommaListFlagparser utility for comma-separated quoted and bare values.
Developer Notes
- Build process now automatically syncs
package.jsonversion fromscript.jsonon 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 eachnpm 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.
Where to install the mod from?
- Roll20 One-Click Installer - Coming soon.
- Roll20 API GitHub master branch.
- Download and install manually from Dropbox.