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

[REQUEST] Movement Tracker - Non-Grid

Is there an API that would allow a non-grid map to track a tokens movement? Preferably in such a way that would mimic the effect of moving the token and using the ruler feature at the same time?
1428200180
The Aaron
Roll20 Production Team
API Scripter
I don't know about a script, but the built in movement features might do what you want: <a href="https://wiki.roll20.net/Manipulating_Graphics" rel="nofollow">https://wiki.roll20.net/Manipulating_Graphics</a> While "holding" a token, you can hit space to see a measure of movement. Hitting space while moving drops waypoints. If you select a token and hit space, it will show the last path that token moved.
Yeah, I mean is there a way to do it by default? Not just when setting up waypoints, but every time the token is picked up and moved.
1428202828
The Aaron
Pro
API Scripter
Ah, I see. There isn't that I know of, but it would be pretty easy to write something that would just keep appending moved. There are some problems with the trivial implementation (mistake handling, etc), but you could have an undo move macro to back up.
there is an old movement tracker script that worked well for this - it showed an aura set to the distance the a token could move, and with every move it would reduce the aura by the amount that it moved, until it ran out (and then locked the token from moving) It didn't need a grid to work, though the grid DID make for cleaner math (no ungodly fractions of a move to set into the tokens aura. It also was bound to the turn order script, so only the token at the top of the turn order could move, but it was a good little script none-the-less, and it sounds like that, or some new script based on that idea, would work just fine.
I think I saw that one. The problem with using it would be two-fold. The game system I use doesn't have set movement rates. They can either be flat or rolled, with variable distances between. Also, the game has a 'Us and Them' initiative system... so no one would be on top of it. It's really just the counting of distance, automatically, when a token is dragged along the field that I need.
thats easy - canabilize the code and keep the snippets that set aura distance to the characters movement, and then bind movement to one of the token bubbles - that way it can be updated with the current correct movement, regardless of the method used to determine it, and also keep the part of the script that managed subtracting the amount moved from the remaining aura till it reaches zero. probably a good idea to keep the undo function of the script as well, so that it can backtrack as its needed.
Sounds amazing, my ability to manipulate java... less so.
1428349467
The Aaron
Pro
API Scripter
(... must... not... wisecrack... )
Feel free!
1428360686
The Aaron
Pro
API Scripter
( THAT'S OK, IT'S WRITTEN IN JAVASCRIPT!!!! aaaaahh... much better... ) =D Javascript is a lot more forgiving than Java, and easier for the layman to pick up. I'm a big fan of Javascript: The Good Parts by Douglas Crockford , particularly if you know a little programming already. If not, there are several online resources to learn more about it, or just dive in and make some changes to existing scripts. Write something simple, post it, ask for feedback, or how someone else would write it, etc. Learn by doing!
See, I learned HTML and whatever code maptools uses by cutting things out of existing code and playing with them. Javascript is more complex, I can't learn it that way...
1428360969
The Aaron
Pro
API Scripter
I can see that. No worries. =D
Ω said: See, I learned HTML and whatever code maptools uses by cutting things out of existing code and playing with them. Javascript is more complex, I can't learn it that way... Sure you can. That's how I learned javascript.