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

Rollable Tables?

1478553871

Edited 1478554120
I am using a Rollable table and if i use /r 1t[Table] it shows the table and outputs the icons like it is supposed to but if i use [[1t[Table]]] it just shows the name of the option chosen but doesn't show the icons associated with the table? Any reason why this is happening? For the most part I want it to output a clean macro with the icon used in the table instead of showing something like rolling 1t[Table] (Icon) = 0
That is the way they work
1478554741
The Aaron
Pro
API Scripter
Depending on your use case, you could make a Rollable Table Token on the map and select it and choose random side.  Note that rollable table tokens don't preserve the odds for a given entry.
1478555709

Edited 1478555742
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
See this forum post for some ideas for ways around this limitation:&nbsp; <a href="https://app.roll20.net/forum/post/4106861/way-to-show-picture-in-inline-roll/?pageforid=4106861#post-4106861" rel="nofollow">https://app.roll20.net/forum/post/4106861/way-to-show-picture-in-inline-roll/?pageforid=4106861#post-4106861</a>
1478555724

Edited 1478556498
To maybe shed some more light, the table options don't have names, I just want it to "roll" an icon. However if i use [[1t[Table]]] all it does is output a blank box because it is trying to output the name of the option not the icon of the option Scott C. said: See this forum post for some ideas for ways around this limitation: <a href="https://app.roll20.net/forum/post/4106861/way-to-show-picture-in-inline-roll/?pageforid=4106861#post-4106861" rel="nofollow">https://app.roll20.net/forum/post/4106861/way-to-show-picture-in-inline-roll/?pageforid=4106861#post-4106861</a> Wouldn't that just generate a button which then links to an image instead of embedding it? Like all I want it to show is
1478556524
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
the suggestions in the above work very well, but do require some setup.
1478556833

Edited 1478557642
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Ah, but the secret lies in Silvyre's note that leaving an inline roll unended allows the link to work, so doing: [Meaningless label that won't show[[ ]( <a href="http://tinyurl.com/testerimage[[1]]#.jpg" rel="nofollow">http://tinyurl.com/testerimage[[1]]#.jpg</a> ) shows this image in chat (putting the inline roll brackets that won't have a matching end pair in the label will hide them from being output to chat): I only made a single tester image, but you can see that the inline roll still allowed it to function. You'd just need to make enough tinyurls for your possible rollable table outcomes so that they are still properly weighted, and then just do: [Meaningless label that won't show[[ ]( <a href="http://tinyurl.com/whatevernameyoulike[[XdY]]#.jpg" rel="nofollow">http://tinyurl.com/whatevernameyoulike[[XdY]]#.jpg</a> ) Edit: could of course end in .png or .gif if what you were linking to needed transparency or movement respectively as long as the actual url was a .png or .gif
Okay, so how would i use an image link like <a href="http://i.imgur.com/rBsYYem.png" rel="nofollow">http://i.imgur.com/rBsYYem.png</a> to work with that? Or will it not work?
1478557993

Edited 1478558080
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Go to <a href="http://www.tinyurl.com" rel="nofollow">www.tinyurl.com</a> Copy your image url into the box for generating a tinyurl. Choose a naming convention for your table images (e.g. B14star). Make a tinyurl for your first image that is your naming convention with a 1 after it (e.g.&nbsp; <a href="http://tinyurl.com/B14Star1" rel="nofollow">http://tinyurl.com/B14Star1</a> ). Now, when you put in your image url code to your macro it'll look like this: [ [[ ]( <a href="http://tinyurl.com/B14Star[[1dy]]#.png" rel="nofollow">http://tinyurl.com/B14Star[[1dy]]#.png</a>) or just [ [[ ]( <a href="http://tinyurl.com/B14Star[[1d1]]#.png" rel="nofollow">http://tinyurl.com/B14Star[[1d1]]#.png</a>) EDIT: Gives this output for me: end EDIT to specify that image if you wanted to test the inline roll to make sure it is working before making all of them. The image fragment at the end (e.g. #.png) is what triggers it to be displayed as an image rather than just a link in chat.
1478559182

Edited 1478559753
So... why does it ONLY work if you use Tinyurl? nevermind, i just found out it doesn't have to use just tiny url... [ [[ ](<a href="http://i.imgur.com/rBsYYem.png" rel="nofollow">http://i.imgur.com/rBsYYem.png</a>) Works perfectly
1478559711
The Aaron
Pro
API Scripter
Right. &nbsp;The hack is that with tinyURL you can build the URL dynamically with an inline roll to choose different images.&nbsp;
1478559771
The Aaron
Pro
API Scripter
You can always insert images directly in chat with the basic formatting:&nbsp;<a href="https://wiki.roll20.net/Text_Chat#Basic_Formatting" rel="nofollow">https://wiki.roll20.net/Text_Chat#Basic_Formatting</a>
1478559933

Edited 1478559940
I figured i could just try and change the table names to the inline roll and see if that would work... it didn't sadly lol The macro I am using is &{template:pf_generic} {{name=Unit Requisition}} {{Unit Type:= ?{Unit Name?|Soldier}}} {{Quality:= [[1t[Requisition]]]}} anything i need to do on the macro part? Or do I just have to mess with the table? because I am attempting to have the table be the rolling method because of the specified weights i had if it is just 1d5 for 5 separate images that is not weighted the way i would like..
1478560704

Edited 1478560790
The Aaron
Pro
API Scripter
You'd want to create a rollable table with the correct weights and the values of 1,2,3,4,5 (or 5 other unique values to use on the end of your url) and then use that url trick to get the image to show up. &{template:pf_generic} {{name=Unit Requisition}} {{Unit Type:= ?{Unit Name?|Soldier}}} {{Quality:= [ [[ ](<a href="http://tinyurl.com/B14Star[[1t[Requisition]]]#.png" rel="nofollow">http://tinyurl.com/B14Star[[1t[Requisition]]]#.png</a>)}}
1478560762

Edited 1478560828
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Unfortunately, short of the Recursive Tables API script by The Aaron, there's no way to extract the text of the inline table roll. Using the script, you can cut out the tinyurl hack and just put your image links directly in as table results, but this requires a pro subscription. So using tinyurl to make a bunch of links that are the same name, differentiated only by a number, allows you to simulate this via inline rolls as Aaron said above, after all what are rollable tables but a dice roll to determine some text output (or in this case image output). EDIT: or use the fact that rollable tables resolve to a number if the table entry starts with a number that Aaron just ninja'd me with. I always forget that caveat of rollable tables.
I was hoping there would be some way I could stray away from tinyurl, don't know why just never thought i should have to use 3 sites to get this to work lol... but it does work now thanks to you two.
1478561473
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
There's a way to do most anything on Roll20; you just have to be a little creative to do it for free sometimes ;) Happy Rolling, Scott
1478561652

Edited 1478561946
Thats for sure
Before I forget, I assume the answer for this one is a no. But now that I have the images correlating with the 1-5 #s on the table. Is it possible to have a Table correlate with another table? so that when it pulls #3 from one table it pulls #3 from another?
1478562288

Edited 1478562342
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
That one will require the API, but is possible with that via Aaron's Recursive Tables linked above. EDIT: gah, I'm posting too much, must have linked it in another thread: <a href="https://app.roll20.net/forum/post/2845333/script-recursivetables-expands-inline-rolls-in-rollable-table-results/?pagenum=1" rel="nofollow">https://app.roll20.net/forum/post/2845333/script-recursivetables-expands-inline-rolls-in-rollable-table-results/?pagenum=1</a>