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

How to call just the icon of a rolled table result

..or just the text.  I have a rollable table I made and the option to show the icon/img along with the text just requires you to add the graphic. RecursiveTable.js allows you to include the icon or not in what is shown in chat. Can anyone figure out how to pull JUST the icon and not the text if I want to? Not limiting the answer to the javascript, I want to show the result in chat whether I use the script or not, just by typing in the right command when querying the table. BUT if it is only possible through the API or the script that's fine. Pro user.
API Scripter
Can I interest you in a vacuum? ... Sorry. A joke out of context. Muler 2.0 can do what you want. get.table.TableName.ItemName?image You can refer to the name of an entry in order to return the image associated, or you can roll against the table to get the item (but then only return the image)... or... well, a lot of options. You can roll with modified-rolls (instead of just rolling [[1t[TableName] ]] you could roll [[1d8 + @{selected|VeryHelpfulAttribute}]]). Lots of options. And since Muler is a metascript, it will work in the command lines of other scripts, or in messages you want to hit the chat window (instead of going to the Script Moderator). Check out the thread-- Heh. "Thread." I crack myself up: it's a post. Check out the post and see if it makes sense on its own. If not, post back with how/where you want to use the image, your table name, etc., and I can try to help point you in the right direction.
I'll buy two please, and I don't even get the reference. Damn, that's so much good information, thank you! I looked at some of the other links from that post and I'm overwhelmed.  Now I wish I could commission what I needed since it took me about 10 hours to get to where I am now (and hiring someone to make a janky (functional but not pretty) javascript webpage (client side) to do what I want.  But my ultimate goal (especially now that I see it's possible) is to make what I want available in roll20 for the 2d20 Fallout RPG, but it could be altered to fit any genre and content I suppose. Just have to do the work getting it running. So if you're bored... :)
API Scripter
I'm glad that helped! As for the larger build you have going... I can't make any commitments -- I'm too backed up on updates, bug hunts, refactors, and new projects. However, scripts are fairly straightforward to write and, as is the case with Muler, sometimes already exist. So share what you want to be able to do in Roll20 and people can point you at the solution.
I understand. If I can figure out the command that only shows a table results associated graphic i'll be that much closer. Haven't found out how to call it yet but i have only had the script for an hour or so.