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 .
×
Create a free account

[Script] TokenController - Automate Token Movement for Patrols, following, roaming, and more

1644332083

Edited 1644452654
Scotty
Pro
API Scripter
TokenController Patrol Paths are DM-defined sequential directions that can be applied to tokens over an interval. Patrol paths are independent of map or token position and can be stacked on a token, moving the token 1 step from each assigned path per interval. To create a Patrol Path, select a token and click the T-Cntrl_Builder macro. This will allow you to name the Draft Path and will add a simple menu in your chat. A warning, the process of Chat Menus and building a path is going to create a lot of bloat in your chat logs. You may want to save what you have and be prepared to clear it out again later. It may be hard to reference a previous sessions chat otherwise. Once the path is done, click Set to move it from Draft Paths to Patrol Paths. Selecting any amount of Tokens and clicking Start on a path will begin its movement. Following  is done by selecting the Follower Token and clicking the T-Cntrl_Follow macro, then using the Roll20 Targeting System process to select what Token to follow. Its not the most impressive follow, but it gets the job done in a lightweight manner. Token Controls  are found in the !tc menu and allow you to define if a Token should maintain a grid position or stop movement processes. There are simple boundary mechanics to ensure you don't lose tokens to bad patrolling. I will likely not be supporting this, as I no longer use Roll20. This script can be heavy, so tinker with the interval settings and how many tokens are set on paths. Available via the quick install, but here is a link:  TokenController
1644334419
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Link to code? Also, you can use the "noarchive" option in sendchat to avoid clogging the chat log. Posts will disappear on reload and won't go to the archive.
Yeah, it would be good to check the alternative to WayPoints patrol script
1644443517
Andreas J.
Forum Champion
Sheet Author
Translator
Seems it's been in the one-click for a bit over a week now <a href="https://github.com/Roll20/roll20-api-scripts/tree/master/TokenController" rel="nofollow">https://github.com/Roll20/roll20-api-scripts/tree/master/TokenController</a>
1644450877
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Thanks, Andreas!
1644452407
Scotty
Pro
API Scripter
keithcurtis said: Link to code? Also, you can use the "noarchive" option in sendchat to avoid clogging the chat log. Posts will disappear on reload and won't go to the archive. Thanks for the info, I wasn't aware. If I get around to doing an update, I will check that out. If you have any questions or suggestions, just let me know. I have moved to a different platform for now, and have turned my hobby coding directions that way, so it may take some time.
1648489777
I really like this script, makes creating stealth gameplay for the players easier. Just a question: how do I stop a token following another without deleting the token from the map? I realize that I can lock and then unlock that token but is there a simpler way?
1648559653
Scotty
Pro
API Scripter
Just select the Token and on the Menu, under Token, click Stop. Unlock also functions as Stop underneath the hood.