< Vision
No edit summary |
No edit summary |
||
| Line 16: | Line 16: | ||
}); | }); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Note that for | Note that for this application, the Active Effect and Effect Macro need to be on the weapon itself, not the accessory. | ||
Latest revision as of 15:47, 20 March 2024
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.
