Hi everyone! It's my first contribution to the Roll20 community and also my first API script!
Since I couldn't find any script that did what I wanted, I decided to create one myself. I've created a script called MovementRange that tracks and highlights the remaining movement a token can make during its turn. It supports multiple movement rules (like D&D 5e or Pathfinder), and can be customized for feet or meters. It’s been super helpful for our group to quickly see what squares are still reachable! Features :
Automatically displays reachable tiles at the start of a token’s turn.
Highlights squares based on remaining movement.
Supports diagonal movement rules ("dnd", "pathfinder", "manhattan").
Allows quick reset to the original position for the turn.
Compatible with square grids (70px tiles).
Sends a customizable macro each turn.
How it works :
When the active token’s turn begins, it calculates how many squares it can still move, and visually displays all reachable tiles. If the token is moved, the range updates dynamically. Once movement is exhausted, the highlights disappear and the player is notified. Commands :
!mr show : Toggle automatic display on/off.
!mr reset-turn : Return token to its starting position for this turn.
!mr clear : Manually remove highlights from the map.
Note : This script assumes 70px grid tiles and uses a transparent PNG image to highlight the movement range. You can change the image URL to fit your style. Script Gist : <a href="https://gist.github.com/Filrahen/bcdcb3dfde6454785dcb915a805ac478" rel="nofollow">https://gist.github.com/Filrahen/bcdcb3dfde6454785dcb915a805ac478</a> Initially, I intended for the tiles to be visible only to the active player, but this doesn't seem to be possible. Feel free to try it out, suggest improvements, or fork it for your own use! Let me know if you run into issues.