Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account
This post has been closed. You can still view previous posts, but you can't post any new replies.

Dynamic Lighting Toggle Buttons

Did a bit of looking and couldn't find a thread on this topic. I'm working on a game which will require players to constantly put on and take off masks and helmets (limiting field of view), switch flashlights on and off (Major penalties to stealth with a light on, obviously), and may include the use of multiple different light sources (One person carrying a lantern that casts light in a circle around them, versus switching on the weapon light for fighting that casts a narrow cone of light straight ahead, versus pulling out a very small, weak light source if another goes dead or gets broken). Doing this how I want it presently will require that I be constantly adjusting player vision and light. Doing this requires two things: 1) The ability to toggle light or vision sources on and off via macro buttons available to the players. 2) The ability to set up different light sources that can be switched between using these buttons. This also would handle some aspects of things such as darkvision and low light vision. Simply set improved vision types as a character light source that isn't viewable by other players. The ability to name these light sources would also be handy. I think this would be easily handled by adding the option to add additional light/vision modifiers, and a simple button to check/uncheck the "use" box for each. Treat the top light source and vision cone as the character's default, to which they return when they remove or switch off any lights or vision-modifying things. I also had thoughts on player placed light sources (putting down a flashlight, throwing a torch, etc), but this can generally be handled by the GM in all but extreme circumstances.
1410834764

Edited 1410836526
Gauss
Forum Champion
Just a note, you could use the API (a Mentor level feature) for this. This kind of automation was what it was created for.
Noted. Does the API permit the use of multiple token generated light sources simultaneously (such as to mimic a very powerful flashlight, which casts a strong light in a narrow cone and a dim light in a wider but shorter cone), or allow you to create buttons that will automatically adjust those settings with a single click (such as going from a default of 180 degrees of vision, down to 120 with a helmet, down to 60 degrees with night vision goggles, or different types of light sources). It's good to know that the API can be used for such things, having played around with dynamic lighting that makes it that much more tempting. Even just dynamic lighting makes game features possible that I could never replicate on a real table. That said, adding it as a feature as easy to use as the other "create macro" buttons, with the default interface would no doubt be appreciated by those inclined to use such a thing, rather than having to code everything in manually. Still, much lower priority if the means to do it are already available.
1410844740
Gauss
Forum Champion
So you have a couple of questions in there. I don't use the API myself so most of them are more suitable for the API forum but I believe that the answer to most of them is yes. 1) To have a cone of strong light and a second, wider, cone of dim light you would need two tokens with on token set (via the API) to following the first token. 2) I do not think the API can create buttons but you can use commands and via that you can set up macros or token actions that trigger the API script to change the token's values.
1410845435
The Aaron
Roll20 Production Team
API Scripter
3) you could setup a script that watches particular status icons on a token and activates/attached particular lights/restrictions based on them. That's probably how I'd handle the buttons. I agree that this is all basically possible in one form it another. My !torch script handles a fair amount of what you want already.