A FoundryVTT module for configuring token auras. Auras are visual only, but should work in any system and can be used as a basis to build more advanced features on top of. The module adds configuration options for up to two auras to the token configuration dialog, and additional auras can be added programmatically, with no limit.
Expanded on work done by Kim Mantas.
Install via Manifest URL: https://github.com/crcroberts/radial-token-auras/releases/latest/download/module.json
Aura objects have the following properties:
{
angle: number, // The angle (in degrees) for the aura to occupy. The semicircular aura is centered on a position directly to the tokens 'south', and rotates with the token
distance: number|null, // The radius (in grid units) of the aura.
colour: string, // An HTML hexadecimal colour.
opacity: number, // The opacity of the aura between 0 and 1.
permission: string, // The permission level required to see this aura.
uuid: string // A unique identifier for every aura.
}
A new aura can be created with:
Auras.newAura();
Programmatically edit the radius of an aura to be 10
grid units:
token.setFlag('token-auras', 'aura1.distance', 10);
The UI-configurable auras are stored in aura1
and aura2
, but additional auras can be added by adding to the auras
array:
const auras = duplicate(token.getFlag('radial-token-auras', 'auras'));
const newAura = Auras.newAura();
newAura.distance = 15;
newAura.colour = '#ff0000';
auras.push(newAura);
token.setFlag('radial-token-auras', 'auras', existingAuras);