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 to limit Movement

I saw the 5E Battlemaster script uses something to limit movement based on one of the Bars on a token. I was trying to get the script to work but couldn't, is there anyone who knows of script that does just that feature of the script? All i want is the limited movement feature none of the other stuff.
1530048064
vÍnce
Pro
Sheet Author
TokenLock:&nbsp; <a href="https://app.roll20.net/forum/post/1033747/slug%7D" rel="nofollow">https://app.roll20.net/forum/post/1033747/slug%7D</a>
Vince said: TokenLock:&nbsp; <a href="https://app.roll20.net/forum/post/1033747/slug%7D" rel="nofollow">https://app.roll20.net/forum/post/1033747/slug%7D</a> Appreciate that but not quite what i meant, I meant if a creature has 30ft speed it can only move 30ft before it gets stopped.
1530048597
The Aaron
Pro
API Scripter
Ah, that's a script I always wanted to write.&nbsp; I'm not aware of one for that specific purpose currently.
The Aaron said: Ah, that's a script I always wanted to write.&nbsp; I'm not aware of one for that specific purpose currently. Ah okay, well thanks hopefully something comes out down the road!
1530049859

Edited 1530049953
vÍnce
Pro
Sheet Author
Anthony V. said: Vince said: TokenLock:&nbsp; <a href="https://app.roll20.net/forum/post/1033747/slug%7D" rel="nofollow">https://app.roll20.net/forum/post/1033747/slug%7D</a> Appreciate that but not quite what i meant, I meant if a creature has 30ft speed it can only move 30ft before it gets stopped. My bad.&nbsp; Seems like a handy script request though.&nbsp; I have one player with crazy movement in PF and it would really help when moving their token.&nbsp; I would like a script that just shows all the available squares a token could move to(an outline would work) based off of a movement attribute value and the systems diagonal rules.(script-based setting). Stopping a token within that parameter would also be nice.&nbsp; ;-)
Vince said: Anthony V. said: Vince said: TokenLock:&nbsp; <a href="https://app.roll20.net/forum/post/1033747/slug%7D" rel="nofollow">https://app.roll20.net/forum/post/1033747/slug%7D</a> Appreciate that but not quite what i meant, I meant if a creature has 30ft speed it can only move 30ft before it gets stopped. My bad.&nbsp; Seems like a handy script request though.&nbsp; I have one player with crazy movement in PF and it would really help when moving their token.&nbsp; I would like a script that just shows all the available squares a token could move to(an outline would work) based off of a movement attribute value and the systems diagonal rules.(script-based setting). Stopping a token within that parameter would also be nice.&nbsp; ;-) I’d settle for what you said :)
1530053508
The Aaron
Pro
API Scripter
What he said is pretty hard, actually...&nbsp; My thought would be to show an aura with their remaining movement, and a path showing their past movement, and options to reset.&nbsp; Have it active for the token with the current turn. Actually calculating possible move locations implies some more difficult work, including (but not limited to) marking movement costs and obstacles (including DL lines), and Path planning using A* or D* or similar.
The Aaron said: What he said is pretty hard, actually...&nbsp; My thought would be to show an aura with their remaining movement, and a path showing their past movement, and options to reset.&nbsp; Have it active for the token with the current turn. Actually calculating possible move locations implies some more difficult work, including (but not limited to) marking movement costs and obstacles (including DL lines), and Path planning using A* or D* or similar. Hmm that does sound really cool but really complicated maybe some day!
1530059726
vÍnce
Pro
Sheet Author
The Aaron said: What he said is pretty hard, actually...&nbsp; My thought would be to show an aura with their remaining movement, and a path showing their past movement, and options to reset.&nbsp; Have it active for the token with the current turn. Actually calculating possible move locations implies some more difficult work, including (but not limited to) marking movement costs and obstacles (including DL lines), and Path planning using A* or D* or similar. I wouldn't worry about obstacles, difficult terrain and such.(although, that would be cool...)&nbsp; An "overlay" of possible movement could be used as a quick visual of a token's max range of movement.&nbsp; Maybe a token could be used as a template that would be auto-sized to match speed.
1530059783
The Aaron
Pro
API Scripter
Ok, so you're really just talking about an aura that matches up with the grid, rather than being round? =D
1530059796
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
The aura seems the easiest to implement. An invisible token character that is linked to the turn tracker to move to the token representing the current character at the start of their turn. If someone moves via cursor key and pauses to think, you lose your origin point after multiple pauses. If it was marked at the top of the turn (by combat tracker, trackerjacker or similar), you could measure from that point. Of course, it wouldn't help with readied action moves... Hmm. it's not a simple problem.
keithcurtis said: The aura seems the easiest to implement. An invisible token character that is linked to the turn tracker to move to the token representing the current character at the start of their turn. If someone moves via cursor key and pauses to think, you lose your origin point after multiple pauses. If it was marked at the top of the turn (by combat tracker, trackerjacker or similar), you could measure from that point. Of course, it wouldn't help with readied action moves... Hmm. it's not a simple problem. That wouldn't be a bad idea having an aura that stays at your starting point, could always recenter the aura if the creature dashes. Readied movement might have to be done the old fashion way but i think that would be the easiest solution!
1530060187
vÍnce
Pro
Sheet Author
The Aaron said: Ok, so you're really just talking about an aura that matches up with the grid, rather than being round? =D I suppose.&nbsp; The problem with aura's would be probably be diagonal movement rules...?
1530060311
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Vince said: The Aaron said: Ok, so you're really just talking about an aura that matches up with the grid, rather than being round? =D I suppose.&nbsp; The problem with aura's would be probably be diagonal movement rules...? Square aura for 5e, which is non-Pythagorean.
1530060530
vÍnce
Pro
Sheet Author
PF diagonals, When measuring distance, the first diagonal counts as 1 square, the second counts as 2 squares, the third counts as 1, the fourth as 2, and so on. <a href="http://www.d20pfsrd.com/gamemastering/combat#TOC-Measuring-Distance" rel="nofollow">http://www.d20pfsrd.com/gamemastering/combat#TOC-Measuring-Distance</a>
1530061084

Edited 1530061592
GM Michael
API Scripter
Perhaps when using turn tracker (or similar), an aura appears at the player's start location displaying total movement available (given system of choice).&nbsp; Then, as they get farther away, a second invisible aura token follows them, shrinking as they get toward the boundary to indicate how much further they can move. Of course, that implies issues with moving around corners...&nbsp; To do that, you'd need to either implement pathfinding (nope) or make some macro button mark an intermediate step, but that seems really excessive just to move around...&nbsp; Maybe some hotkeyed&nbsp;bookmarklet-style things?&nbsp; That might be the easiest way to do it... As for PF diagonals...&nbsp; Is it possible to use the API to scale a translucent token?&nbsp; Perhaps you could precompute an image that looks like a hunk of bismuth (you know, with the nested squares) that increases in transparency as you move outward and then hope that one of them falls roughly at the boundary you're on? blech...&nbsp; I can see why this hasn't happened yet...
1530065887
The Aaron
Pro
API Scripter
Yup!&nbsp; That's largely exactly what I was thinking. =D
1530071527
vÍnce
Pro
Sheet Author
Human's win. ;-P
Vince said: Human's win. ;-P For now! Until the Scriptmancers find a way ;)