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

Show to Players?

Quick and easy question Using the API, is there a way to use the Show to Players function of a handout? Detailed description My group plays face-to-face, and we don't use the chat functions at all. But occasionally I want some text to pop up, and Handouts would be an easy way to do it. But I want to make them pop up using the API rather than click on the button. I've spent almost an hour looking, but my Google-fu has failed me yet again. Any suggestions?
1435700322
Lithl
Pro
Sheet Author
API Scripter
No. You can change a handout's visibility to the players, but you can't force it to pop up.
1435709894
The Aaron
Pro
API Scripter
The closest you can get is passing them a button (link) to open it: sendChat('','/w '+who+'&lt;a style="color: #0645AD; text-decoration: underline;" href="<a href="http://journal.roll20.net/handout/'+handout.id+'&quot;&gt;'+handout.get('name')+'&lt;/a" rel="nofollow">http://journal.roll20.net/handout/'+handout.id+'"&gt;'+handout.get('name')+'&lt;/a</a>&gt;');
Well that was the quick and easy way to do what I wanted. But as with another request I had, even though the function already exists, for some odd reason we cannot access it via the API. Odd. How about using a Text object? Could I create one on the Token layer at the location I wanted, with the text I want, and then delete it? Looking at the Wiki it seems possible. Just takes more coding. Anything I'm missing before I start trying that method? Thanks for the responses. PS: Sorry, Aaron, but we don't use the chat window in our games. That's not an option and the reason I wanted to use a Handout as a popup.
1435762101

Edited 1435762611
The Aaron
Roll20 Production Team
API Scripter
No worries. :) You definitely can create text on the VTT in that manner. You would likely want to create a box behind it with a uniform background to make it readable. Stephen S. wrote a script awhile back that made speech bubbles in much the same way. If avoiding digging in the journal during the game is what you're after, you might consider putting a graphic with the text on the VTT, then pop it up for all to see with shift-Z .
It's not digging around in the journal I'm trying to avoid. It's to make combats easier. In 5e D&D there is a Concentration mechanic. I'm writing a script to pop up a reminder when someone is concentrating. I'd like to include the DC as well, hence why I need something that can be dynamically generated. In a nutshell, the logic works like this: If PC takes damage If PC is Concentrating (has Overdrive status icon) Pop up text (somehow) saying "Make a DC xx Concentration check" where xx is the DC of the check (10 or 1/2 the damage taken, whichever is higher). It's not very complex. I figured a handout was the easiest method, if I could make it pop up using the API (albeit being pretty clunky). Now I'll have to look into creating a text field and moving it and also moving a dark background to make it more visible. It's a lot more work for someone who still only knows enough about the language to be dangerous. Edit: I have other ideas for pop-up text as well. That's just the first one I had started work on.