< Vision
To keep optics mounted on weapons useful, use this code to take the weapon's range into account:
await game.macros.getName("Low-Light Vision").execute({
token: token,
rating: item.system.range.ranges.extreme / 3 - 2,
cone: 15
});
await game.macros.getName("Thermographic Vision").execute({
token: token,
rating: item.system.range.ranges.extreme / 3 - 1,
cone: 15
});
Note that for this application, the Active Effect and Effect Macro need to be on the weapon itself, not the accessory.
