Well, I did it, plus some upgrades! (see below for details) I'll probably divorce it from CM in the future because it kinda assumes you only have one token, but for now it works for me at least, and devising a good overall solution isn't trivial because you could have any of the below and a user can only actually see one map at a time. players covering missing players familiars, mounts, or other secondary controlled tokens an overall display of all players together like I have If anyone has an idea for how to manage tokens on multiple pages, let me know. Best I've thought of is giving each player a macro button that lets them pick between their "active" token locations. Then you'd need another one for the GM to set tokens as active ones in the event people get moved or go to a new map or something. = SETUP =
0. Have CashMaster installed and have each player select their primary token and run this command:
!cm -sc Yes
1. Create a token named "Teleporter_[group id]_[node id]_[target node options]"
- Group Id: an alphanumeric string such as "01" or "Group1". NO SPACES!
- Node Id: an alphanumeric string such as "01" or "Node1". NO SPACES!
- Target Node Options: a comma-delimited string of node IDs such as "01" or "01,02,Node3"
2. Move the token to the GM Layer
3. Create a corresponding portal that has a node ID that was in the previous target node list.
- One-way portals can be made by not declaring a target list on the destination such as...
SOURCE: "Teleporter_OneWay01_01_02"
DESTINATION: "Teleporter_OneWay01_02"
- Two-way portals can be made by simply having the destination have the source as a target.
SOURCE: "Teleporter_TwoWayGroup_Node1_Node2"
DESTINATION: "Teleporter_TwoWayGroup_Node2_Node1"
4. If these portals are not on the same page, make sure there is another player token on the
destination page.
= USE =
GENERAL: Have the user move their token into the field of the portal.
PAGES: If they destination portal is on the same page, the token will just be moved.
If a different page, the user will be moved to the other page and will gain control of
the token there. Their old token will then be moved to the GM layer.
RANDOM NODES: If you have a node with a target list, one of them will be chosen at random
to be the target node each time a token lands on the portal.
CONVERGENCE: It is possible to have multiple nodes in a group point to the same destination
node.
= IMPROVEMENTS =
While FinalFrog's initial coding was useful, I've added a few more features...
- CM Integration: while a proper full solution is liable to occur eventually, until then,
I've made the script run on CM's default character system (see Step 0 above). This allows
you to have multiple players controlling multiple tokens. Only when your primary
character token is moved to a different page will you follow. As CM allows you to rebind
your primary token, you can always adapt on the fly.
- Overlap Coverage: the old code had a bug where when player A went through a portal to another
page, their now-GM-layer token would jam up the collision detection logic and block future
players from going through the portal through the same square.
- Regex: The original version did not support human-readable names. Github Gist