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

Macro to display item name for rollable tables

1752062424

Edited 1752062562
I have set up so rollable tables for macros and I tried adding pictures for each of the items drawn which made it look good. Problem is - I can either  roll from the tables list - in which case my picture appears tiny in brackets or i can set up a macro that produces the lovely big picture - but I’m missing the text that goes with the NAME field - ie what they encountered does someone have a macro that will allow be to roll the table and get (a) a decent big picture and (b) also display the text of the field NAME of the encounter rolled
1752076208
timmaugh
Forum Champion
API Scripter
This is impossible without a script. If the game owner is a "Pro" level subscriber, scripts should be available, then something like this becomes trivial with a script like the Metascript Toolbox or Scriptcards. Here is a version referencing my local "MaleNames" table, which has a handful of names and associated avatars: !&{template:default}{{name=Proof of Concept - Name and Art}}{{Roll=[[1t[MaleNames]]]}} {{Extracted Text Value=$[[0]].value}}{{Image=@(table.MaleNames.$[[0]].value.img)}}{&simple} And some output:
Thanks so much ill try that out for my game tonight.   I was missing the “Extract Text” section 
1752087848
timmaugh
Forum Champion
API Scripter
To be clear, that example macro requires the Metascript Toolbox to be installed... which (as I mentioned) means the game owner has to be a Pro sub. So... Pro Sub + Install the Metascript Toolbox ----------------------------------------- Profit.
kinda a work around - uncertain if this will work but maybe the macro/roll table and include this: [x](link of image here) so it would look like this [x](<a href="http://www.randomwebsite.com/nameofimage.jpg" rel="nofollow">www.randomwebsite.com/nameofimage.jpg</a>) you can also use .gif hopefully a solution can be found.&nbsp;
Thanks all. i didn’t manage to get the picture in, but at least with the Extract-Text it looked better Did not miss the picture tooooo much when (despite some advance warning that something big and bad was coming) the party were caught badly flatfooted when a pair of these guys came around the corner and bumped into the Druid….