Register

Easy Regions

An Add-on Module for Foundry Virtual Tabletop

Author: Farling Project Source: Project URL Versions 12+ (Verified 12.331) Last Updated 3 weeks, 4 days ago

Easy Regions

Easy Regions makes it easier to find the correct UUID when managing regions.

It also works for other UUID fields which require a field of a supported type (Macro, Region, RegionBehavior Scene).

Automatic Linking of Teleport Regions

With suitably named Regions, on creation of a Teleport Behavior the UUID will be automatically set to the matching other region, and the other region will be linked to this region (creating a new Teleport Behavior if necessary, or overwriting an existing one).

Linking can be based on either the same Region name at both ends, or a pair of pattern matching strings for the name at each end (see the following example).

For example, using the default name mappings in the module settings:

Here is a video showing how simple the process is:

http://www.youtube.com/watch?v=2bDblk4W034

UUID references

For users of the Foundry app, the presented dropdown list does not include a scrollbar, so you might want to enter some text to narrow down the list of available options.

Note: The module implements a custom field to allow the dropdown list to only display the LABEL of each UUID (since Chrome/Chromium prefers to display the UUID in large text and the label in small text). This behaviour can be disabled in the module settings (and is not required with the Firefox browser anyway.)

Region Icons

Provides an additional entry in the Region definition to specify an icon (along with its colour and size) which will appear in the centre of each Shape that is defined for a Polygon.

Highlight Regions with no Behaviors in Region List

Changes the colour of the Config button in the Region list if the region has no behaviors configured on it.

Custom Message for Teleport Token behaviors

Custom strings can be specified (separately for player and GMs) when using the "confirm" checkbox on Teleport Token region behaviors. Just like the base message strings, you can use the tags {token}, {region}, {scene} within your message to get the name of the corresponding object.

Macro: Set Icon on all Regions with a matching name

const pattern = "up to";
const icon = "icons/svg/upgrade.svg";

for (const scene of game.scenes) {
  for (const region of scene.regions) {
    if (region.name.includes(pattern)) {
      region.update({"flags.easy-regions.src": icon})
    }
  }
}

The colour of the icon can be set using the above macro by changing `tint` instead of `src`.

The size of the icon can be set using the above macro by changing `size` instead of `src`.

 

LICENSE

 

This module is licensed under the MIT License and Foundry's Limited License for Package Development

Categories

Available Versions

  1. Version 0.9.2

    3 weeks, 4 days ago
    Foundry Version 12+ (Verified 12.331) Manifest URL Read Notes
  2. Version 0.9.0

    4 weeks, 1 day ago
    Foundry Version 12+ (Verified 12.331) Manifest URL Read Notes
  3. Version 0.7.2

    3 months ago
    Foundry Version 12+ (Verified 12.328) Manifest URL Read Notes
  4. Version 0.7.1

    3 months ago
    Foundry Version 12+ (Verified 12.328) Manifest URL Read Notes
  5. Version 0.6.1

    3 months ago
    Foundry Version 12+ (Verified 12.328) Manifest URL Read Notes
  6. Version 0.5.0

    3 months, 1 week ago
    Foundry Version 12+ (Verified 12.328) Manifest URL Read Notes
  7. Version 0.4.1

    3 months, 1 week ago
    Foundry Version 12+ (Verified 12.328) Manifest URL Read Notes
  8. Version 0.3.1

    3 months, 2 weeks ago
    Foundry Version 12+ (Verified 12.327) Manifest URL Read Notes
  9. Version 0.2.0

    3 months, 2 weeks ago
    Foundry Version 12+ (Verified 12.327) Manifest URL Read Notes