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

Automatic Turnbased Token Movement.

Hello dear rolld20 experts, I am looking for a way to automate token movement (like patrol or moving traps) but the only thing i found was "Token Controller" which doesn't seem to work in initiative turns but milliseconds which isn't helpful for my needs.  I, for example, want to automatically move tokens on initiative 0/1 in a predefined reoccuring path like in the example shown below. Ideally the trap "tokens" won't show on Turn Tracker and movements of all traps occur when the "labyrinth" main token has its turn.  Any hints or ideas?
1686948564

Edited 1686948950
I could envision an API that would do the following: It would save an array of waypoint records (TokenId/Waypoint#/CurrWP/(Top, Left)/Pageid/CurrPos/Mode/Footsteps/OnTurn) in a state array to preserve your token/waypoint configuration.   It would have 8 major functions, each tied to a macro button to make things easier to use: 1. Add Token Waypoint  - Adds an entry to the state array of token/waypoints/Page.  If it doesn't have an entry, it will add one with Waypoint#(1), and serialize future Waypoint#s (2, 3, 4...). 2. Clear Token  Waypoints  -   Remove all movement records for the selected token(s). 3. Clear all  Waypoints  - Remove all movement records for all tokens. (maybe a page-specific option as well) 4. Next - For every token on the Current page if there is a movement record, move to the next location based on the next record in the movements array. 5. Previous - Same functionality as Next, but move back 1 record. 6. Reset - Move all tokens back to their initial positions.   7. Report - Dump list of movement records by page.  Would include functionality to Remove token movement, or change the Mode of the movements by token.      Mode being one of:         *  Run Once:  Run through movements once then stop on last entry.   (1 to 2 to 3 stop)         * Repeat : Run circularly through the list of movements.  (1 to 2 to 3 to 1 to 2 to 3 to ...)         * Pace :  (Default) Run to the end, turnaround and return to the start in reverse order. (1 to 2 to 3 to 2 to 1 to 2 to , ....).  To use, select one or more tokens.  Click the Add Waypoint  macro button to add your initial waypoint.  Move the tokens, then click the Add  Waypoint  button again to add your next waypoint.  Do this until you've moved your happy with all the waypoints you've established. Run the Report Movements function to configure the movements as Run Once, Repeat, or Pace. Click the Reset button to move all your tokens back to position 1.   Click the Next and Prev buttons to affect the movements.   Possible features:  Footsteps - Add the option to include a sound of footsteps (or other sound effects).  On Turn - Automatically move to next waypoint when the token comes up in the turn order.   Not sure if something like this exists, but if no one picks this up, I might give it a shot.  
1686949506
Kraynic
Pro
Sheet Author
I haven't used anything like this, but it has been done before.&nbsp; Might not be anything in the regular api/mod library though. Here is a recent one: <a href="https://app.roll20.net/forum/post/11115799/slug%7D#post-11124353" rel="nofollow">https://app.roll20.net/forum/post/11115799/slug%7D#post-11124353</a> And for older ones that may still be available/work, there are a couple mentioned in this thread: <a href="https://app.roll20.net/forum/post/6325799/slug%7D" rel="nofollow">https://app.roll20.net/forum/post/6325799/slug%7D</a>
I see it now - Token-Patrol.&nbsp;&nbsp; GitHub - Ineeri/Roll20-API-Token-Patrol
Thank you both for your input. I tried out Token Patrol, which has the same issue for me. It is set to real-time passed for the next step, not for initiative or turns. An alternative solution would be a macro or input like "next step" where i can click a simple button to move all "patrolling tokens" to the next step when the lair has its turn instead of manually moving 17 tokens every turn while looking on my paper sheet that has each step to make sure everything is where it should be. Maybe I've overlooked something? I am not a programmer, I can make some macros and read some javascript, but every one of you experts knows reading and writing code is a huge difference in knowledge and understanding.&nbsp;
I can definitely see the benefit of it being more stepwise.&nbsp; I can code, but don't have a lot of time this weekend.&nbsp; I'll let you know if I take a stab at it.
I didn't want to burden you with my problem. I just thought maybe one of you has an easy solution to this and point me in this direction without me taking up your free time. :)
1687474613

Edited 1687474723
Question solved. A friend and coder has added "move Tokens to next patrol point" to the TokenPatrol mod for us and I trigger it with the "OnMyTurn" mod or manually by button. Thanks for helping and even considering to code stuff for a stranger on the internet! &lt;3
1687499547
The Aaron
Roll20 Production Team
API Scripter
Great resolution! Glad you got it working.&nbsp;