No description
- JavaScript 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| lang | ||
| .gitignore | ||
| example-aura.jpg | ||
| example-config.jpg | ||
| LICENSE | ||
| main.js | ||
| module.json | ||
| README.md | ||
Fork
This is a fork of https://bitbucket.org/Fyorl/token-auras/ to make it run in foundry v12 and v13
Token Auras
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.
API
Aura objects have the following properties:
{
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.
square: boolean, // The aura is square if true, otherwise it is circular.
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();
Examples
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('token-auras', 'auras'));
const newAura = Auras.newAura();
newAura.distance = 15;
newAura.colour = '#ff0000';
auras.push(newAura);
token.setFlag('token-auras', 'auras', existingAuras);

