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 GIFS

So I know its possible to post gifs with casting of spells, but is it possible to have several gifs under one spell and one randomly show with the casting per use? 
June 26 (6 years ago)
Gold
Forum Champion

Hi jonathan.

Are you asking about posting GIF images into the chat room with the Image macro command?


Rollable Table is a way to randomize things. I am not sure if the Image macro command will render if called from a Rollable Table. Let's test and see.


Wiki docs,

https://wiki.roll20.net/Collections#Rollable_Tables


https://wiki.roll20.net/Text_Chat#Basic_Formatting






Ok so for e.g. under my character sheet > spells> edit spell > description: [insert any text](url of gif) . that gives the ability to add gifs to spells I cast. I just wanted to know if there was a way to add multiple gifs that would be selected at random when I cast the spell as a player?

June 27 (6 years ago)

Edited June 27 (6 years ago)
Gold
Forum Champion


Yes. I'd say best possibility is try to put your


[insert any text](url of gif)


into a Rollable Table (under the Collection Tab).  Let's say for example if you name the Rollable Table "Random Fire Graphics" and put all the random images in there using the GIF-displaying code you have.


Then put

1t[Random-Fire-Graphics] 

in your Character Sheet > Spells > Edit Spell > Description. To roll the rollable table and produce one of your image-codes randomly selected.


See if that works. I'm not sure if Rollable Tables support rendering the Image code. This seems like the most likely way to accomplish it.


I can research, test, and find out if that would work, if that would help more.

June 28 (6 years ago)

Edited June 28 (6 years ago)


I've tried some options myself for it. Trying it that way the code seems not to make the spell roll on a table. I tried this [[1t[Random-Fire-Graphics]]] and it has rolled on the table but it has not displayed any url gifs and for some reason I cannot add icons or gifs into the table icons. Its weird because I remember being able to do so before. So essentially when I would cast like alarm for example I would get this

June 28 (6 years ago)
Brian C.
Pro
Marketplace Creator
Compendium Curator

What about taking the frames out of the GIF and putting them in the rollable table (so that the resulting PNGs are actually stored within the rollable table on Roll20's server)? I am not very good with the Roll20 macros or API, but I would assume that a macro would then be able to not only reference the picture but associated text as well.

June 28 (6 years ago)

Edited June 28 (6 years ago)

Animated GIFs do not work in Roll20, and GIFs in general do not always play well with Roll20. Use a JPG or PNG.

June 28 (6 years ago)
The Aaron
Pro
API Scripter


Brother Castor said:


I've tried some options myself for it. Trying it that way the code seems not to make the spell roll on a table. I tried this [[1t[Random-Fire-Graphics]]] and it has rolled on the table but it has not displayed any url gifs and for some reason I cannot add icons or gifs into the table icons. Its weird because I remember being able to do so before. So essentially when I would cast like alarm for example I would get this

Try adding #.png to the end of the URL.

[ded](https://media.giphy.com/media/STeu8ICZgDUXK/giphy.gif#.png)


June 28 (6 years ago)
Gold
Forum Champion


Rabulias said:

Animated GIFs do not work in Roll20, and GIFs in general do not always play well with Roll20. Use a JPG or PNG.


They have worked fine in the Chat for years. My groups post dozens of GIF's every week we play. The format may be unsupported, but it generally works fine in chat with the image code. They just don't work on the tabletop / Library / Uploads / Bio / Sheets.


June 28 (6 years ago)

Edited June 29 (6 years ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator

My preferred method for doing this takes some setup, but displays much nicer than doing it via rollable table would. Additionally, rollable tables can't display images when rolled inline. So here's my preferred method (which I really need to add to Keith's Stupid Tricks Thread):

  1. Upload your images somewhere that the image can be accessed via a direct link. The Roll20 Library (although difficult to work with), imgur, or something similar.
  2. Next we need a link shortening site that allows custom names. Tinyurl or bit.do as examples
  3. I'm going to use these four images: 1 2 3 4. The short url for which is http://tiny.cc/image_swap_demo_#
  4. Then make your macro:
[Image[[](http://tiny.cc/image_swap_demo_[[1d4]]#.gif)

The double open brackets in the image title (i.e. [image[[]) are there to force the dice roll to display as plain text so that the link works correctly.

This will give you an image based on your die roll:

*Images are from Paizo's Starfinder rule books (Alien Archive and Pact Worlds). Used for demonstration purposes only. Paizo retains all rights

I've done it with .png's here, but it works with .gifs as well (and in fact, you can see that is what I used as the file type extension in the link (i.e. #.gif). As an added bonus, this method means that you just need to copy your macro between games instead of having to deal with recreating a rollable table in the new game, or having to ask your GM to setup a rollable table for you.




Gold said:

They have worked fine in the Chat for years. My groups post dozens of GIF's every week we play. The format may be unsupported, but it generally works fine in chat with the image code. They just don't work on the tabletop / Library / Uploads / Bio / Sheets.

Thanks, Gold. My comment was about the tabletop. I did not think about folks generating images into chat.


June 29 (6 years ago)
Kirsty
Pro
Sheet Author

@Scott That's so clever! I can't wait to try it out!

June 29 (6 years ago)

Edited June 29 (6 years ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator

Thanks Kirsty, as with most things, I didn't think it up. I think it was a Silvyre invention, but I can't find any of the original posts about it (they're from like a year ago, so...)