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.

June 26 (7 years ago)
vÍnce
Pro
Sheet Author

TokenLock: https://app.roll20.net/forum/post/1033747/slug%7D



Vince said:

TokenLock: https://app.roll20.net/forum/post/1033747/slug%7D



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.

June 26 (7 years ago)
The Aaron
Pro
API Scripter

Ah, that's a script I always wanted to write.  I'm not aware of one for that specific purpose currently.


The Aaron said:

Ah, that's a script I always wanted to write.  I'm not aware of one for that specific purpose currently.


Ah okay, well thanks hopefully something comes out down the road!

June 26 (7 years ago)

Edited June 26 (7 years ago)
vÍnce
Pro
Sheet Author


Anthony V. said:


Vince said:

TokenLock: https://app.roll20.net/forum/post/1033747/slug%7D


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. 

Seems like a handy script request though.  I have one player with crazy movement in PF and it would really help when moving their token.  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.  ;-)



Vince said:


Anthony V. said:


Vince said:

TokenLock: https://app.roll20.net/forum/post/1033747/slug%7D


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. 

Seems like a handy script request though.  I have one player with crazy movement in PF and it would really help when moving their token.  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.  ;-)



I’d settle for what you said :)

June 26 (7 years ago)
The Aaron
Pro
API Scripter

What he said is pretty hard, actually...  My thought would be to show an aura with their remaining movement, and a path showing their past movement, and options to reset.  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...  My thought would be to show an aura with their remaining movement, and a path showing their past movement, and options to reset.  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!

June 27 (7 years ago)
vÍnce
Pro
Sheet Author


The Aaron said:

What he said is pretty hard, actually...  My thought would be to show an aura with their remaining movement, and a path showing their past movement, and options to reset.  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...)  An "overlay" of possible movement could be used as a quick visual of a token's max range of movement.  Maybe a token could be used as a template that would be auto-sized to match speed.

June 27 (7 years ago)
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

June 27 (7 years ago)
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!

June 27 (7 years ago)
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.  The problem with aura's would be probably be diagonal movement rules...?


June 27 (7 years ago)
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.  The problem with aura's would be probably be diagonal movement rules...?



Square aura for 5e, which is non-Pythagorean.

June 27 (7 years ago)
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.
http://www.d20pfsrd.com/gamemastering/combat#TOC-Measuring-Distance
June 27 (7 years ago)

Edited June 27 (7 years ago)
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).  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...  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...  Maybe some hotkeyed bookmarklet-style things?  That might be the easiest way to do it...


As for PF diagonals...  Is it possible to use the API to scale a translucent token?  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...  I can see why this hasn't happened yet...

June 27 (7 years ago)
The Aaron
Pro
API Scripter

Yup!  That's largely exactly what I was thinking. =D

June 27 (7 years ago)
vÍnce
Pro
Sheet Author

Human's win. ;-P


Vince said:

Human's win. ;-P


For now! Until the Scriptmancers find a way ;)