elpossum / fvtt-combat-range-overlay

Combat Range Overlay module for Foundry VTT
MIT License
0 stars 1 forks source link

Combat Range Overlay

Supported Foundry Version Github release (latestSemVer) GitHub release downloads (latest by SemVer and asset)

Summary

This module is designed to quickly and efficiently answer questions such as "How far can I move this turn? What enemies can I reach in the fewest actions? How can I best navigate difficult terrain?" I wrote it because I (not to mention the rest of my group) was tired of my pulling out Rulers, Blasts, and other helpers to figure out "Can I do this? Hmm, no, but maybe if I do it this way ... nope, that doesn't work either. What about ..."

Basic Usage

Click Button showing two figures with a horizontal double-headed arrow connecting them, on the token layer controls, to toggle the Overlay on and off. Once the Overlay is enabled, it should Just Work™ with little to no interaction from you. If you are using a supported system, it should auto-detect the range of your equipped weapons; shift-click the button to change it for your currently selected token. Normally the overlay will reread your position at the end of a move; control-click the button to force the Overlay to reposition. Display preferences are available in the module's Settings page.

Compatibility

Maps: This module now works with square, hex or gridless grids.

Systems: My table plays Pathfinder 2E, but it has been tested to some degree on PF1e, DnD3.5e, SWADE, WFRP4e and DnD5e. It turns out that every system stores its token/actor move speeds in a different spot, so out of the box speed autodetection will only work with Pathfinder 2e, Pathfinder 1e, DnD3.5e, SWADE, WFRP4e and DnD5e. If you're playing with a different system, you'll be prompted to set a speed on token control. You can also set the autodetect path. Also, I believe other systems treat diagonals differently, so there's a (GM-only) setting telling the module how to count diagonal movement.

Weapon range is more complex so the path cannot be manually set for unsupported systems. Pathfinder 2e, Pathfinder 1e, DnD3.5e, SWADE, WFRP4e and DnD5e are all supported to the best of my knowledge of the systems. If you are using an unsupported system, you will be prompted for weapon range when you try to bring up the overlay.

Modules: This module requires lib-wrapper and supports the Enhanced Terrain Layer (not updated for Foundry v11 though may have some functionality) and Terrain Mapper (requires TM >= v0.3.0 to work with PF2E) modules.

Understanding the Overlay

A screenshot of several tokens with the overlay active and numbers corresponding to the following legend.

The overlay in this image assumes a movement speed of 15ft/action and a weapon range of 10ft.

  1. Tiles tinted blue can be reached in a single action.
  2. Tiles tinted yellow can be reached in 2 actions.
  3. Enemies circled in white can be attacked without moving.
  4. Enemies circled in blue can be attacked in a single move.
  5. Enemies circled in yellow can be attacked with 2 moves.
  6. Enemies circled in red require 3 or more movements to attack.
  7. All tokens (other than the selected token) in combat are annotated with their initiative order relative to the current token.
  8. The selected token is annotated with the currently selected weapon range.
A close up of the previous screenshot focusing on one player and two enemies. One enemy is now targeted and the squares within both movement and weapon range are highlighted.

If a target is selected, tiles in your movement range and in range of the target will be highlighted in white, and only tiles on the shortest path to the highlighted squares will remain tinted.
If multiple targets are selected, only tiles in range of all targeted enemies will be highlighted. If there's no way to hit all targeted enemies at once, the Overlay will display a warning and act as if no enemies are targeted.

Sample Use-cases

The Overlay is useful no matter what kind of character you're playing as:

Melee

Screenshot showing a player and two enemies on a map with a wall

Suppose you're trying to decide between these two enemies.

The previous screenshot now with the possible moves highlighted, using a straight ruler, as well as difficult terrain

Both enemies are obstructed - one by difficult terrain, one by walls - so a straight ruler won't help you.

The same screenshot now using waypoints on the ruler to avoid the wall and difficult terrain

You'll need to use waypoints to get the true movement distances.

The first screenshot now with the overlay activated. Squares reachable in one action are highlighted blue, those reachable in two actions, yellow

Or you can use the Overlay to instantly see how many movement actions it'll take to attack each enemy.

Archery

Screenshot showing a player and a distant enemy

You want to attack this enemy, and you'd like to get just close enough to attack him without his being able to close the distance and attack you on his turn.

The previous screenshot now with a blast template, placed to show range, and the player moving to the edge of it.

You drop a Blast on his position and then move to a tile on the very edge of the Blast (of course, working with Blasts takes a lot of control palette switching, clicking, dragging, deleting ... it's kind of a pain).

The first screenshot with the overlay active and the enemy targeted, showing all spaces within range bordered in white

Or you can use the Overlay to see where you can move to that's inside your attack range and move to the position that's nearest you.

Magic

A screenshot showing a player and two enemies

You want to cast Electric Arc (a 2 action, 2 target, 30ft range spell) on these two enemies. Where can you hit them both from? Are they close enough for you to hit them both? Can you reach a good spot in only one action so you'll have the two remaining actions to cast the spell?

The previous screenshot with a blast template placed on each enemy and the player moving to the overlap

You could drop two Blasts and then measure your distance to the overlapping tiles (with waypoints, of course - moving straight through that difficult terrain would be too much).

The first screenshot now with the overlay active and the enemies targeted. Squares in range of both enemies are bordered in white

Or you can use the Overlay to see where you can attack them both from and how far away the good spots are.

Tactician

A screenshot of two players and four identical enemies along with the combat tracker

You're pretty sure you can kill any of these enemies on your turn, and you'd like to kill one that'll go before your teammate to reduce how many enemies there are to attack him (or you). Unfortunately, while the Combat Tracker shows initiative order it doesn't take positioning into account, and trying to figure out which entry in the Combat Tracker corresponds to combatant tokens can be a pain.

The previous screenshot now with the overlay showing the number of actions needed to reach tokens, using colored rings around them, and their place in the turn order

Or you can use the Overlay to see who's close to you and going before your teammate.

Advanced: Setting the speed attribute path

If you're using an unsupported System, you'll need to set the speed attribute path in the module settings. Here's how to do it:

  1. Select a token
  2. Open your browser's dev tools (often F12) and switch to the Javascript console
  3. Type in _token.actor and press Enter
  4. Expand the result, then keep expanding children until you find the movement speed. Take note of each child you expand * For instance, with Pathfinder 2E, you expand system, attributes, speed, and find the speed in total A screenshot of the console showing expanding children to find the speed location
  5. Join these names with periods to come up with your attribute path
    • For Pathfinder 2E, this would be system.attributes.speed.total