For the first question, I’m not aware if any script that does this specifically, but I think that Scriptcards might have a ‘monitoring’ feature that could possibly watch for tokens on a map and adjust their vision settings. For the second question, there is no ‘maximum vision distance’ setting for a token. The closest you can get is not placing any light sources on a map and giving tokens dark vision out to the distance you want them to see. That could be accomplished with TokenMod, Metascripts, and a custom page light script (I’m sure I’ve seen one that turns on/off page ‘daylight’).