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

Random images/gifs in macros

Hey guys I'm working on a macro for using tarot cards in game. I have a list of images for about 22 tarot cards and I have no trouble inserting them individually into macros, but what I want the macro to do is choose three of these images at random to display in chat. Is there any way you guys can think of that would make this possible? Thanks.
1605492352
vÍnce
Pro
Sheet Author
Does it have to be a macro?  How about an actual tarot deck?  Make a tarot deck using your images set as a finite deck and draw three cards as needed. 
1605506314

Edited 1605506367
Oosh
Sheet Author
API Scripter
You can mix rolls with image names, though there'd be nothing stopping it from rolling the same number multiple times. You need to have your images saved in a way that they're identical links apart from the trailing number, like: imagehost.com/oosh/image1.png imagehost.com/oosh/image2.png ...... imagehost.com/oosh/image22.png You can use tinyurl to manufacture some links if your image host doesn't allow this. You can then call one of them with this syntax: [[ [img](imagehost.com/oosh/image[[1d22]]#.png)
1605506985

Edited 1605507136
Gold
Forum Champion
Vince's answer is good, start there. Note: If you agree to using Card Decks method and want to save some time, there are 2 good Tarot Card Decks for sale from Roll20 Marketplace. Those install instantly into your game, ready to work. Oosh's answer is a creative alternative, almost a hack rather than a Roll20 feature (especially in light of using external image hosting, where you need to be able to control the Filename/URL). Functional idea, I'd like to give it a try. If you still want it to be in Chat of your own design, look into Rollable Tables. Rollable Table feature can randomize & display images in chat. You can easily repeat the Rollable Table roll, 3 times to get 3 cards. When you make the Rollable Table, you'll have to put ONLY the card image, do not put a word or title in text per-card. You want the output from rolling the Rollable Table, to be the card image.  Unfortunately rollable tables currently do not output the Picture AND the Text, it's one or the other, so for Tarot Cards do the images. Here's a macro for ya! Something like this:  /me LAYING DOWN THREE TAROT CARDS: [[1t[Tarot-Cards-Table]]] [[1t[Tarot-Cards-Table]]] [[1t[Tarot-Cards-Table]]] How did I do? Can I get a reading? But maybe this: /me LAYING DOWN THREE TAROT CARDS: [[3t[Tarot-Cards-Table]]] How did I do? Can I get a reading? Have fun.