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:
- Create a region (A) with a name "F01 down to G02" on scene 1.
- Create a region (B) with a name of "G02 up to F01" on scene 2 (make sure this is saved before moving to the next step).
- In the second region (B), add a Teleport Behavior.
- The UUID of the teleport will be automatically and immediately populated with the UUID of the first region (A).
- A Teleport Behavior will be automatically creatred on the first region (A) which points to the second region (B).
Here is a video showing how simple the process is:
http://www.youtube.com/watch?v=2bDblk4W034
UUID references
- Adds a drop-down menu to all UUIDFields where the UUID references either a Macro, Scene, Region, or Region Behavior.
- A module setting can be enabled to limit the entries in the list to only those in Scenes which have Navigation enabled.
- Note that standard HTML functionality means that you can enter some of the text containing the scene name or region name to reduce the list down to just entries that contain that text.
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