Register

Terrain Height Tools

An Add-on Module for Foundry Virtual Tabletop

Author: Wibble Project Source: Project URL Versions 10 - 10 (Verified 10) Last Updated 1 month ago

Tools for painting grid cells with terrain heights.

Designed for LANCER, Terrain Height Tools takes inspiration from the way painting tiles works in the Political Map Overlay module by cirrahn; and augments it with some line of sight calculation functionality and the ability to render the heights on the token layer.

Overview Preview

Line of Sight Preview

Usage

Once installed, the first thing you need to do is configure the paintable terrain types for your world. You can think of terrain types like colours of paint for your paintbrush. This can be done either by:

See below for more details about configuring terrain types.

Once at least one type of terrain has been configured, you can then use the tools in the 'Terrain Height Tools' menu to paint terrain onto the map. To do this, you need to click the type of terrain you want to paint in the 'Terrain Palette' window and choose a height for the terrain. You can also optionally enter an elevation. Adjacent grid cells will merge together if their terrain types, their heights, and their elevations are the same.

Line of Sight

Terrain Height Tools provides two tools for testing line of sight (LoS) against the terrain that has been drawn to the scene. Both of them can be found under the tokens menu.

Line of Sight Tools

The first, is the humble 'Line of Sight Ruler'. The ruler behaves similarlly to the standard ruler built in to Foundry. You can click and drag between two points, and it will test the line of sight along this line, and highlight any intersections with the terrain. You will also see a 'H' number next to either end of the ruler. This represents the height of that endpoint. You can change this either by using the + and - keys on your keyboard, or typing values into the config window that appears.

The second tool is the 'Token Line of Sight' tool. When you click this tool, you will see a config window appear. Click on the bullseye icon and then click on a token on the scene, for both the boxes that appear. Terrain Height Tools will then draw 3 LoS rays: one from the centre of the first token to the centre of the second; one between the left-most edges of the tokens; and one between the right-most edges. The H value of these lines depends on how the LoS is configured, but it is based on the token's elevation + a modifier multiplied by the token's width (there is no 'vertical height' field for tokens in Foundry, so tokens are assumed to be as tall as they are wide); For example in the default configuration a token with an elevation of 3 and a size of 2, the H would be 5; This represents the top of the token. The tool can instead draw the LoS from the middle or the bottom of a token.

Examples of the lines

When the LoS rays are drawn to the scene, you will see a line drawn from the source point to the target point. This line is formatted depending on what state it is in at that point:

It's also worth noting that the ray is calculated in 3D space, so if you see it abruptly stop intersecting a shape part way through, it has likely impacted the top or bottom of the shape.

Configuring Terrain Types

Terrain Types configuration window

To add a new terrain type simply:

  1. Click the "Add Terrain Type" button in the bottom left.
  2. Give it a name (labelled 2 in the above image). Note that this is what shows in the palette window, NOT what is shown to players on the scene canvas.
  3. Select whether or not the terrain type should have a height/elevation.
    • This is the default, however for some types (e.g. objective/control zones) it may not make sense to give them a height. This setting will disable the height option in the palette, and prevent you from accidentally having areas with different heights. Note that disabling this will NOT affect already-painted grid cells.
  4. Configure the style of the area that will be painted on the scene - these settings should be familiar if you have used the default Foundry drawing tool before.
    • One thing to note though is that the 'Text Label' (number 8 in the above image), which is what the area will be labelled as, allows a %h% and/or a %e% placeholder to be used. These will be replaced with the height or elevation value of the painted terrain respectively. For example, if you create a type with a label of H%h%, when painted on the scene at height 2, it will have a label of H2. If painted at height 4, it will have a label of H4, etc. Likewise, a label of H%h%+%e% would show H3+4 if it was a height 3 terrain at an elevation of 4.
  5. Click 'Save Changes' in the bottom right, and your new terrain type will show up in the palette.

There are some other useful buttons:

Module Settings

Here is a quick reference of the settings module presents in the 'Configure Settings' button of Foundry:

All Users

GM Only

API

Terrain Height Tools exposes an API that can be used by macros, scripts or, other modules. Please see the API documentation for more.

Categories

Available Versions

  1. Version v0.1.4

    5 months, 2 weeks ago
    Foundry Version 10 - 10 (Verified 10) Manifest URL Read Notes
  2. Version 0.3.7

    1 month ago
    Foundry Version 11 - 11 (Verified 11) Manifest URL Read Notes
  3. Version 0.3.6

    1 month, 3 weeks ago
    Foundry Version 11 - 11 (Verified 11) Manifest URL Read Notes
  4. Version 0.3.5

    4 months ago
    Foundry Version 11 - 11 (Verified 11) Manifest URL Read Notes
  5. Version 0.3.4

    4 months ago
    Foundry Version 11 - 11 (Verified 11) Manifest URL Read Notes
  6. Version 0.3.3

    4 months ago
    Foundry Version 11 - 11 (Verified 11) Manifest URL Read Notes
  7. Version 0.3.2

    4 months, 1 week ago
    Foundry Version 11 - 11 (Verified 11) Manifest URL Read Notes
  8. Version 0.3.1

    4 months, 1 week ago
    Foundry Version 11 - 11 (Verified 11) Manifest URL Read Notes
  9. Version 0.3.0

    4 months, 1 week ago
    Foundry Version 11 - 11 (Verified 11) Manifest URL Read Notes
  10. Version 0.2.3

    5 months, 1 week ago
    Foundry Version 11 - 11 (Verified 11) Manifest URL Read Notes