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 .
×
Advertisement Create a free account

Display an Art Library Image from a macro?

1620151325
Jay R.
Pro
Marketplace Creator
This seems so straightforward, but I haven't found an answer. I want my players to be able to display an image from my Art Library as an overlay to the current page. Ideally, it would be a "Lightbox"-style blackout and zoom similar to the integrated token zoom, but all I really need is a button enabling my players to summon and dismiss an overlaid image at will. I don't want to have to open a new page (neither a Roll20 page nor a new browser tab). Does anyone have a technique for doing this? Thanks.
1620151786
The Aaron
Forum Champion
API Scripter
I can't think of a way to do that.  The options you have for players to view an image like that are: 1) Put it on the map where they can select it and hit the Z button 2) Put it in a handout that they can open. You could dump it to chat either publicly or as a whisper from a macro, but getting the lightbox thing is only possible with the Z key.
1620164221
Jay R.
Pro
Marketplace Creator
Thank you for the answer. I was beginning to suspect as much. Now I'm wondering if I can: Place a character token on the GM layer with the image as its token art—and minimize that image to one grid square. Have a macro that brings the token to the Map or Object layer and restores it to its full size (I'd have to store the image's pixel dimensions somewhere, maybe in the bars.) and centers it on the screen. Another button that dismisses the image back to its minimized size on the GM layer. As I'm thinking about it, it seems reasonably slick — but also maybe a little fragile. There's no way for a player to select the desired token on the GM layer, so I might have to have a button for each image, or have the button summon a chat menu which presents the 6-8 choices I'm picturing. I'd have to put the GM-layer tokens on each page, which is a little annoying, but it might be do-able for my map-light campaign.
1620172474
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I have a number of overlays I use on my campaign map. They just hide out on the DL layer when not in use. They are very large transparent PNGs, but deliberately simple to make them compressible. Here is a proof of concept video I made a couple of years ago. The only API is Token-mod. Is this the sort of thing you are talking about?
1620184826
Jay R.
Pro
Marketplace Creator
That looks like a very useful implementation. I won't have any lighting on these maps — I didn't think of using that layer for storage. I will definitely use it for something. The difference with my situation is that I'd like to be able to give each player individualized access. I'm using my overlays for abbreviated rules pages. They're meant to be referenced while a player is preparing for their turn, and shouldn't obscure the page for other players. If I could programmatically select a token and send a "Z" key to it, I could accomplish what I'm trying to. Currently I'm just putting minimized tokens on the object layer and letting my players select & zoom (and accidentally move and delete) those tokens. I wish we could have really granular toggles on tokens: locks for zoom, move, scale, bar access — every attribute. I think it would open up a big space of hackability for custom Roll20 maps.
1620185287
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
You could display images in chat. They don't even need to be in your art library. Prepend them with a whisper command and they won't clutter the interface for other players: /w "playername" [any text](image url) These can be put into a chat menu or action buttons. It could be made universal by making it a universal token action button (would require the player to select a token they control first: /w "@{selected|token_name}" [any text](image url)
1620185572

Edited 1620185624
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Another alternative is just using image handouts. This is the solution used by modules. They can also be trigger-opened by chat buttons. Edit: Just realized that the Aaron already suggested this.