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

Help with Share Vision Script

EDIT: Originally posted in character sheets, now moved here. I'm trying to test the Share Vision script, but I'm not sure if I'm using it right. In this thread, it mentions using an 'aura' marker and an 'overdrive' marker. I tried this on a character that I had assigned to me, and another one that wasn't and then rejoined as a player, but I could only see what my character's token could see. Can I get some help on setting this up right? What I'd like to do is for everyone in the party to be able to share everyone else's sight, but only at certain times (my thought was that I would use TokenMod to apply the appropriate statuses at the appropriate times). Here are the tokens with status markers applied, just to make sure I'm using the right markers: Also, I'd like to be able to configure the markers, if possible, since I'm already using the 'aura' status marker for something else. Any help would be appreciated, thanks!
1492444720

Edited 1492446169
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hey Gozer, it looks like you are using everything correctly. As a note, applying the markers with tokenmod won't trigger the script as no change event is fired from script caused changes. The marker should be picked up if you move the  a token (or otherwise manually change it) after applying the marker with tokenmod. Were you using tokenmod to apply the markers for your test? Another way to test if the script is functioning is to try and select the slave token when you are logged in as a player. It will be in the same location as the master token, but transparent. EDIT: I'll look into an update to make the markers configurable, but in the mean time, you can change the markerState function on lines 178-186 from this: markerState = function(obj){ var aura = obj.get('status_aura'), overdrive = obj.get('status_overdrive'); if(aura || overdrive){ createVision(obj.id, overdrive); }else { removeVision(obj.id); } }, to this: markerState = function(obj){ var aura = obj.get('status_ INSERT REPLACEMENT FOR AURA MARKER HERE '), overdrive = obj.get('status_ INSERT REPLACEMENT FOR OVERDRIVE MARKER HERE '); if(aura || overdrive){ createVision(obj.id, overdrive); }else { removeVision(obj.id); } }, You can find the list of status marker names in the  wiki (bottom of the linked section).
I think I'm not sure about how to use this.  Which one is the "master token?"  Is this a separate token?  I guess I was wanting each player to see each other's vision, but this sounds like there should be a separate token.  Am I understanding that right? By the way, I wasn't using Token-Mod yet, I wanted to get the functioning working, and then apply Token-Mod to make the process quicker.
Ok, so I tried again, and I can select the transparent token as a player, but I'm not actually getting any sight from it.  I can only see what "my" token can see.
1492453403
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Gozer the Gozerian said: I think I'm not sure about how to use this.  Which one is the "master token?"  Is this a separate token?  I guess I was wanting each player to see each other's vision, but this sounds like there should be a separate token.  Am I understanding that right? By the way, I wasn't using Token-Mod yet, I wanted to get the functioning working, and then apply Token-Mod to make the process quicker. So, the only way to see from a token is to have control of that token. A lot of times it isn't desirable for all players to control all tokens though, so the script makes an invisible (just a transparent .png) token that is tethered to the actual token. Any time the actual token is moved, this token is moved to the exact same spot. Your players can select this token and move it around, but the script resets its location to that of it's master token any time it is manually moved, limiting the shenanigans they can get up to with it. Long story short, the master token is the actual token depicting the character. The slave token is the one made by the script to grant sight/light depending on what status markers you have on the master token. Gozer the Gozerian said: Ok, so I tried again, and I can select the transparent token as a player, but I'm not actually getting any sight from it.  I can only see what "my" token can see. Hmm, just checked it in my campaign to make sure something hadn't broken with the recent API upgrades. It's working fine for me. Made a basic map split down the middle by a DL wall with global illumination on. My character is on the left: Then, in my GM account, I turned on the aura status marker for one of the tokens on the right: If you're still having problems, PM me an invite, and I'll poke around to make sure everything's working as it should.
1492463824
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Found the problem,  updated script .