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.