League-of-Foundry-Developers / torch

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

[Not Issue - Question] Would this module be able to include Driftglobe in the DND5e system options? #10

Open mrjaksauce opened 2 years ago

mrjaksauce commented 2 years ago

I like how it uses torches and things in the inventory that's real awesome! Would it be possible to add Driftglobe to that?

Thanks for all your hard work in updating and maintaining this module!

:)

lupestro commented 2 years ago

Right now there are a lot of things we don't yet support - lanterns, hooded or otherwise, candles, etc., and that's before you get to the many light-related spells. I am still in the initial consolidation phase. I've restructured the code and am writing test automation for the features we already support.

Once I can easily tell if I've broken it as I add new features, supporting more light sources is at the top of my list. I will be looking at basic items (equipment). I also want to support the basic lighting needs of more systems, and do it in a way that makes the DX (dev experience) of extension easy.

Limitations:

Torch is built around the idea of the player emanating light, so as currently constituted, it only makes sense for things the player is carrying. This has problems when you want to set a lantern in the middle of the room or cast a light spell somewhere other than yourself. We can't do any of that today. Perhaps we can in the future, but that'll be a ways out.

I also want to stick with the "one-button-only" approach where the experience in-game is limited to a single button on the HUD, but I anticipate a per-user "Preferred Light Sources" setting of some sort that lets you order any sources available in your system in the module.

lupestro commented 2 years ago

Well, supporting more light sources and light source selection is happening via a context menu - I wrote the code this weekend and it is in the v10 branch. I need to do some research before Torch will support picking up and setting down light sources, but I've designed in some hooks and I'm closely examining the problem to determine all the implications. Before that, the next easy opportunities will be getting support for conventional light sources in other systems in play. I have several in mind.

The PHB has only 9 spells that explicitly generate light and many of them have other effects, like becoming a weapon or delivering flame or radiant damage, that lead me to think anything they do with light would best be handled in a spell effects module. We will continue to deliver Light and Dancing Lights, and could possibly deliver Daylight and Continual Flame or a limited form of Produce Flame, but each of these require special UX to fully support - Daylight is ranged, and Produce Flame has a thrown effect we wouldn't handle, Continual Flame and Daylight both consume spell slots. All of this has me a little reluctant to take on the light effects of spells that don't behave like equipment, but I will look through the magic items to see what opportunities I find there.

Most of the animated and automatic behavior of Driftglobe is well beyond the scope of Torch. If we supported Daylight, that might let you do something with Torch and Warpgate or something similar to do some of the rest. Any kind of animation or automation is still uncharted territory for Torch.

lupestro commented 2 years ago

I think the configurability of the code just released in v2.1.0 for Foundry VTT 10 will let you add any spell or item that you wish, but it will only do what this module supports - lighting centered on a player token. Because so many things that shed light do other things as well, now that the most important features are delivered, I will start to think about providing a set of APIs that could be used by something like warpgate to combine lighting with other effects.

lupestro commented 2 years ago

Kandashi has created Active Token Effects with its ATL macros, which already provide lighting that can be combined into the active effects of more complex spells and items. You would probably be able to model more of the things that Driftglobe does using that module in concert with the other D&D5e automation than we could ever provide using this module. Do let me know if that provides what you need. I will be spending more time myself looking at what it does with the 20 or so core spells involving light and other effects together.