RPTools / maptool

Virtual Tabletop for playing roleplaying games with remote players or face to face.
http://rptools.net
GNU Affero General Public License v3.0
784 stars 259 forks source link

[Feature]: Lights - additional parameter to control rendering hierarchy #4562

Open Ahnoold opened 9 months ago

Ahnoold commented 9 months ago

Describe the Problem

Currently, a light's lumens value is used to indicate on the lumens overlay both how bright the light is, and which light takes precedence where the areas of multiple lights (and/or darkness) overlap. However, it is sometimes desirable for a light that would be considered dimmer to override a brighter light, such as when the dimmer light is created by a more powerful spell than the brighter light. It would be nice to be able to define which light overrides other overlapping lights independently of how bright the light is supposed to be.

The Solution you'd like

Add an optional parameter to the definitions of lights that, when assigned a value, sets a hierarchy for determining which light gets rendered on the lumens layer where multiple lights overlap. If this additional parameter is not set, lights are rendered according to their lumens values, as they are now.

Alternatives that you've considered.

No response

Additional Context

I think that this would only affect how the lumens overlay gets rendered.

thelsing commented 9 months ago

I don't think that lights should get more complicated than they are now. The use case seem to be to specific.

Can some spell being more powerful than another be done by using the personal lights in dev and multiplying the lumens of the light with a "power level" via macro?

Ahnoold commented 9 months ago

Can some spell being more powerful than another be done by using the personal lights in dev and multiplying the lumens of the light with a "power level" via macro?

I'm not completely understanding what you mean by this, but if it involves changing the value of the assigned lumens so that it is rendered over another light, then under the current implementation, doing so would also change how bright the light is indicated to be.

It's entirely possible that I might be the only person that wants dimmer lights to be able to take precedence over brighter lights. I'm prep'ing a GURPS campaign, and it has spells that increase/decrease illumination levels without going fully bright/dark, and it's entirely possible for a dimmer illumination source to overpower a brighter illumination source. If there aren't enough other people that would utilize this, or it's otherwise not worth development time for whatever other reason, I understand.

kwvanderlinde commented 9 months ago

I think what we need is some real AOE support. As far as I know we don't have any direct support, just a few features here and there than be wrangled into helping out (templates, drawings, terrain modifiers on tokens, etc). But nothing general like "this spell covers this area" or "these two effects play off each other in some way".

I think we can cover a lot of the basics by having an AOE concept defined by answering these questions:

And if frameworks can enumerate AOEs, check the areas involved, etc., they could do more specialized stuff based on this. E.g., trigger something when a token enters the area, etc.

This FR would then be covered as a special case: to cast one of these light spells is to define an AOE of a certain power level, attached to a token, requiring LOS, set to subtract based on power level, and with a lighting effect. But the AOE system could also handle, say, an Entangle spell as an effect not attached to any token (so it stays put), needs LOS, has a terrain modifier, but no special interactions with other effects.

Ahnoold commented 9 months ago

Now there's an intriguing idea that is way more ambitious than anything I'd dare suggest! It touches a number of "wouldn't it be nice if MapTool could..." situations I've come across lately.

Pmofmalasia commented 9 months ago

This issue has managed to touch on two major features I'd like in MapTool all at once ;)

As for the initial proposal, it's something I'd definitely make use of myself - 5e has all kinds of different ways that lights interact with each other, e.g. standard darkness, magical darkness, a void of all light, knocking light levels up/down one notch from where they are, sunlight vs. standard light, lights overriding other lights cast at a level less than X, etc. In spirit, this reminds me of the discussion on #4379, though in practice it would hit at a different aspect of lights (how lights interact with each other vs. how sights interact with lights).

I think what we need is some real AOE support.

This would be wonderful - I touch on some of this in #2743, I don't want to derail this FR too much so to keep it brief I think a lot of these things could be tied to drawings/templates. As you mentioned sometimes these things need to be attached to a token and move with it, so this would not 100% cover that aspect, but as is I think auras can do a lot of what you mentioned (with macro help) while drawings/templates are simply incapable of doing much at all for these static AOEs.