League-of-Foundry-Developers / torch

Simple torch module for Foundry VTT
10 stars 16 forks source link

Improvement using token effects. #82

Open Andersants opened 2 months ago

Andersants commented 2 months ago

Hi, thanks for the module, it's a very interesting option. Is it possible to add an effect to the token, for example Active Token Effects or DFreds Convenient Effects when activating the buttons on the HUD? Unfortunately the way it is, by updating the lighting configuration on the token, there's no way to use some level of automation, for example the light extinguishing itself after the duration time as far as I can see.

lupestro commented 2 months ago

We do provide a set of APIs to call to light a torch as a result of an event. The module also needs corresponding events that active token effects, convenient effects, and now perhaps macros associated with scene regions could attach to, to find out when somebody has "flicked their Bic". I've got an open ticket #67 marked as an enhancement for that (although the substance of the enhancement is buried in a comment well down the discussion.)

Where possible, I keep module enhancements passive enough that they don't end up entangling Torch with other modules, providing mechanisms to use but leaving the application of "glue" to those using both modules together. It avoids getting in the middle of impossible debugging situations as the various modules grow and change independently. However, once I've done that, I'm happy to supply, purely as examples, what such an integration might look like, providing a starting point and leg-up for exploration.

I'm happy to report that, with the APIs alone, a macro for "Gas Leak in the Basement and the schmo with the candle" is now a very real possibility. :)