Register

Token Aura Ring

An Add-on Module for Foundry Virtual Tabletop

Author: Anthony Edmonds Project Source: Project URL Versions 12 - 12 (Verified 12) Last Updated 2 weeks, 4 days ago

Token Aura Ring

A simple module for Foundry VTT which adds outlined aura rings to a token.

How token aura rings appear to the game master

About

This Foundry VTT module allows you to add and customise aura rings emanated from a token, ideal for cleanly representing the range of aura type effects without obscuring the map.

Aura rings are calculated as an emanation, based on the Pathfinder 2nd Edition rules. This means that the range of the aura ring is calculated from the edge of the token, instead of the centre.

How token aura rings appear to players

Creatures larger than 1 tile will have flattened sides to correctly represent their aura range.

Visibility of aura rings are obscured by fog-of-war, and hidden entirely when the viewing player is unable to see the token from which the aura rings are being emitted.

Hidden tokens will only show their aura rings to the game master.

What's the difference between this and Dynamic Token Rings?

Dynamic Token Rings, which is a Foundry VTT v12 feature, adds a ring directly around the edge of a token to represent resources, such as health or mana.

Token Aura Ring draws an arbitrary ring at any range from the token's edge.

Installation

Either search for and install this module within Foundry VTT, or copy this address into the Manifest URL bar:

https://raw.githubusercontent.com/AnthonyEdmonds/token-aura-ring/main/module.json
 

Usage

Once enabled, you can add and configure aura rings from the "Confgiure Token Aura Rings" button on the "Identity" tab of any token settings page (to avoid any confusion with dynamic token rings).

An example of a token aura ring configuration

Settings are fully previewed, and are not stored until you press "Save Changes" and "Update Token".

Stroke and fill

Aura rings may be drawn as an outline, a solid fill, or both.

An example of an aura ring with a mixture of strokes and fills

The colour, opacity, and weight can be individually controlled, and strokes have the option of being "closed" if a complete outline is desired.

Multiple aura rings

You can add up to 100 aura rings to a single token by pressing the "Add Aura Ring" button.

Press the "Duplicate Aura Ring" button to create an exact copy of the currently selected aura ring.

Press the "Delete Aura Ring" button to remove the currently selected aura ring.

Visibility

You can control which user roles can see an aura ring using the "Visible to" setting.

You can also quickly show and hide an Aura Ring by pressing the "Eye" button or checking the "Hire Aura Ring?" option.

Enabling the "Only show on hover?" option will cause the Aura Ring to only show when the token is hovered.

Enabling the "Only show to owner?" option will cause the Aura Ring to only show for the token owner and observer, which includes the Game Master.

Angled aura rings

You can adjust the "Direction" and "Angle" settings to create arcs instead of circles.

An example of a token with arcs instead of circles

The "Angle" setting determines how much of the arc to draw.

The "Direction" setting rotates the arc around the token.

Arcs are drawn relative to the top of the token, where a direction of "0" is considered facing forward.

The arc is centralised around its direction, where an angle of "90" would have 45 degrees on either side.

When you rotate the token the arc will rotate with it.

Setting the "Angle" to "360" will draw a complete circle.

Grid based aura rings

This feature is experimental and under development

Checking the "Use grid-based shapes" option will turn the aura ring from euclidean to grid-based, if the current scene has a grid enabled.

A comparison between a grid-based and euclidean Aura Ring

Tokens must be of a uniform size (1x1, 2x2, 3x3, etc) for this to work.

Hex grids are not currently supported.

Negative radius

You may set the radius of an aura ring to a negative value to draw within the token's bounds.

An example of a token with a negative radius

This will only work with tokens which feature transparency, and is limited by the overall size of the token.

For example, a standard medium creature (1 square = 5 foot) can have a minimum radius of -2.49 feet.

API

Module developers can control Aura Rings using the AuraRingApi class.

Macro developers can control Aura Rings using the TokenAuraRing global variable.

Function Parameters Returns Description
all TokenDocument Array[AuraRing] Retrieve all Aura Rings
blank   AuraRing Get an unsaved empty Aura Ring without an ID
delete TokenDocument, id   Remove an Aura Ring
deleteAll TokenDocument   Remove all Aura Rings
get TokenDocument, term, field = 'id' AuraRing|false Retrieve a specific Aura Ring by a field, ID by default
index TokenDocument Object{id: name} Retrieve a list of Aura Ring names keyed by their ID
new TokenDocument AuraRing Create a new Aura Ring from the default settings
set TokenDocument, AuraRing   Overwrite an Aura Ring with new settings
setAll TokenDocument, Array[AuraRing]   Overwrite all Aura Rings with a new set
setValue TokenDocument, id, key, value   Update a specific Aura Ring value directly

All changes will trigger flag updates on the SimpleTokenDocument, and can be edited in the normal UI.

It is left up to the module developer to ensure that any set Aura Rings are valid.

Macro example

This macro will list all of the Aura Rings on the selected token:

  1. Create a new script macro
  2. Paste the following:
    console.log(
        TokenAuraRing.all(token.document),
    );
     
  1. Select a token and run the macro to see a list of the Aura Rings on that token in the console

Issues

This module may not work with game systems or addons which already implement their own token auras.

If you encounter any problems, raise a ticket on Github and I'll take a look.

Categories

Available Versions

  1. Version 2.5.1

    2 weeks, 4 days ago
    Foundry Version 12 - 12 (Verified 12) Manifest URL Read Notes
  2. Version 2.4.0

    2 weeks, 5 days ago
    Foundry Version 12 - 12 (Verified 12) Manifest URL Read Notes
  3. Version 2.3.0

    2 weeks, 5 days ago
    Foundry Version 12 - 12 (Verified 12) Manifest URL Read Notes
  4. Version 2.2.0

    3 weeks, 2 days ago
    Foundry Version 12 - 12 (Verified 12) Manifest URL Read Notes
  5. Version 2.1.3

    3 weeks, 5 days ago
    Foundry Version 12 - 12 (Verified 12) Manifest URL Read Notes
  6. Version 2.0.0

    3 months, 3 weeks ago
    Foundry Version 12 - 12 (Verified 12) Manifest URL Read Notes
  7. Version 1.3.1

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

    7 months, 3 weeks ago
    Foundry Version 11 - 11 (Verified 11) Manifest URL Read Notes
  9. Version 1.1.0

    8 months ago
    Foundry Version 11 - 11 (Verified 11) Manifest URL Read Notes
  10. Version 1.0.0

    8 months ago
    Foundry Version 11 - 11 (Verified 11) Manifest URL Read Notes