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 .
×

API/Macro Needed for Thermographic Vision Idea

Hey everyone, I have tried finding a similar solution to this in the forum without success, so if someone knows where this has already been addressed, please feel free to point me in that direction. Okay, that said.... As far as I can tell, there is no great solution out there to represent thermographic vision--that is, the ability to see heat but otherwise NOT darkvision or low-light vision--for a particular character. I've been thinking about it a lot recently and I wanted to see what the community thinks about this idea. I create a token-sized and -shaped circle in red and place it behind tokens representing living beings, including the PCs' tokens. This second token needs to be "attached" somehow to the main token, so it follows it automatically when it moves. I'm imagining something like TheAaron's TurnMarker that marks the current initiative and follows the token when moved. But I would need a unique background token to move with each token. Then I could give control access to these background tokens to the player who has thermographic vision. The tokens have sight, but no light. In darkness, they should always be able to see the red blob background token even if they can't see the token it is attached to/represents due to darkness, and no other players would be able to see either due to darkness. When the creature token isn't in darkness, I'm thinking the background token rests behind it, so it doesn't obscure anything. Obviously, this would require some setup by me as the GM for each map, but I'm wondering if something like this could be done with an API script and macro. Specifically, being able to "attach" two tokens together and make one follow the other, always staying in the same space as the main token. I've never coded or made an API script. Does this seem like something that would be feasible? Would anyone be willing to take a stab at it? Are there easier or better methods I'm not thinking of? I appreciate feedback. Thanks in advance!
I think maybe this should have gone in the API thread, sorry!
1596745184

Edited 1596745220
The Aaron
Roll20 Production Team
API Scripter
If you create a Character with a transparent Token with an aura that only the controlling player can see, then set up the character as a TokenCondition Decoration, you should be able to assign control to the player with thermal vision and drop the markers on all the hot tokens and it will follow around and be visible only to the player.
You're the best, The Aaron. Thank you for that quick solution!
1596745459
The Aaron
Roll20 Production Team
API Scripter
No problem.  I'd love to see pics of it working, let me know if you run into any issues.
This image shows what a token looks like in light and outside of light to the player. I had to tweak it a little. With the new Dynamic Lighting, you need to put Darkvision on for the invisible token in order for the player to see the red glow in darkness. You might not actually need the aura with this, since you can tint the Darkvision red itself. So the Aura can be GM-only so the red imagery disappears if the player's actual token comes near with a light source. One thing I noticed is that the Decoration token gives the player the ability to move both tokens. He can move the invisible token, which forces the normal token to move, too. Not the end of the world--that can be controlled through player agreement. But I wasn't expecting it. All in all, this will definitely work. Thanks again!
1596749591
The Aaron
Roll20 Production Team
API Scripter
Nice!  There's probably a way to prevent that with some of the optional flags. I'll take a look when I'm back at my computer. 
It's interesting information.