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

Set conditions or custom buffs based on lighting?

I am DMing an adventure with a player that is dazzled in areas of bright light. One of my players is a programmer that can code an API to take care of this for me, but I wanted to see if one already exists, or if it can be accomplished through other methods before he goes through all the work.  What I've done for now is to leave him dazzled all the time, then if he isn't in bright light, we manually remove the penalty. This way we don't forget to apply the penalty if for instance he is too close to a torch light. 
1644260989

Edited 1644261053
Kraynic
Pro
Sheet Author
If this is something built into whatever sheet you are using, you can probably enable/disable it with the ChatSetAttr script.  This wouldn't be automatic with respect to being close to a light source, but should make it possible to set as a token action macro.
What game are you playing? What character sheet template are you using? When you say the character is 'dazzled', what does that mean, and what mechanical effect does it have? It sounds like another player is trying to come up with a way to detect a token's range to an active light source , which sounds similar to what you're looking to do (but yours is supposed to adjust a stat maybe?).
Sorry for the lack of information. As I said I am still fairly new to Roll20.  I am playing pathfinder 1e, using the Pathfinder by roll20 sheet.  The in game effect of being dazzled is " The creature is unable to see well because of over-stimulation of the eyes. A dazzled creature takes a –1 penalty on attack rolls and sight-based perception  checks." The penalties are accurately applied by applying the dazzled condition within the pathfinder sheet. What I am hoping to do is have roll20 apply this, or other conditions based on the lighting the token is under. A torch gives off bright light for 20' and then dim light for another 20', but sometimes it is not easy to see the areas that are under bright light.  Basically, I want roll20 to determine the lighting condition of a space (bright, dim, darkness) and then apply chosen conditions to tokens based on the lighting condition of their current space.  Does that make sense?
1644271293

Edited 1644271408
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
This was recently asked in another thread (which you are following). It is possible, but to a limited degree. An API script could tell if the token is in range of a light, but not if they have Line of Sight. I.e. it could be applied when the character was within 20 feet of a torch, but would not know if that torch was on the other side of a wall. Not without a huge amount of programming to basically duplicate the effort being done by Dynamic Lighting.
keithcurtis said: This was recently asked in another thread (which you are following). It is possible, but to a limited degree. An API script could tell if the token is in range of a light, but not if they have Line of Sight. I.e. it could be applied when the character was within 20 feet of a torch, but would not know if that torch was on the other side of a wall. Not without a huge amount of programming to basically duplicate the effort being done by Dynamic Lighting. Thank you