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

Understanding Rollable Tables

Hi all, I'm experimenting with setting up a rollable loot table for the first time, and - I don't understand the output. For this example, there are only two entries: The silver coin (2d8 SP, as shown when hovering over the image) and a potion of healing. That's fine. But what does "=2" mean?! It looks ugly! It is in no way any kind of useful information! What does it do there? Can I prevent it from showing up? The internet was unhelpful - I found a lot of other very interesting tips and tricks for rollable tables, but couldn't figure out a way to word my question so that a search engine could point me in the right direction - hence my coming to these forums for help  TIA!
1725545857

Edited 1725546081
Rolls don't normally work within rollable table results - when you use the "roll table" command, and get that result, the roll takes the numeric value of 2 from 2d8 as the result. You do have workarounds, however. Here's one: (with new-table being the default table name, replace it with whatever name your rollable table has) &{template:default} [[ 1t[new-table] ]] {{[loot is...](~loot|$[[0]])}}  Here, using a trick detailed by Shinin-light , a button is created that the rollable table result is inserted into, and from a character sheet named "loot", an ability is called, with the ability name written as table-result)'>table-result With "table-result" of course being whatever you want to identify the particular result as, for example "small-silver-pouch". Then, the roll itself for the amount is within the ability, for example: [[2d8+2]] silver pieces!
1725549758
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
To add to Tuo's answer, and why a trick is needed: If a rollable table entry begins with a number, then the rest is stripped and only the number is returned. This is why modules will not have table entries like "2d8 goblins", but "goblins (2d8)". The first method only returns "2", whereas the second method returns the whole string.
1725555513
timmaugh
Pro
API Scripter
Also, rolling multiple times against the rollable table in the same roll: [[ 2t[LootTable] ]] ...is only helpful if you intend to sum the returns from the table. That is, if the table is set up to return numbers (like a stand-in for a die), and you want to obtain multiple numbers and add them together. If you have text in that table, a roll like the above will only show you a single return. In that case, and without a script, you're better off making 2 separate rolls against the table: [[ 1t[LootTable] ]] [[ 1t[LootTable] ]] With scripts, more things become available, but the owner of the game has to be a Pro subscriber to Roll20 for them to be available in your game.
Thank for your help, everyone. I don't actually really want the roll table to actually roll the 2d8 - I just want the entry, as written, to show up, without any "=x" after it. keithcurtis said: To add to Tuo's answer, and why a trick is needed: If a rollable table entry begins with a number, then the rest is stripped and only the number is returned. This is why modules will not have table entries like "2d8 goblins", but "goblins (2d8)". The first method only returns "2", whereas the second method returns the whole string. I tried to make some entries this way but the result is the same, instead of showing "=2", now it just shows "=0". The "a thing" entry is just that; that's all the input it has. No image, no weight adjusted (it's the default '1'). I don't want it to return any number at all , I just want it to show the 'name' and image I input into the table. Is there no way to do this?
Void, have you tried using an inline roll? When I use /r or /roll, I get the roll like you have above. But if I use an inline roll, I just get the contents of the line. [[1t[Loot-Human]]]
1725649335
Gauss
Forum Champion
Joshua N.,  My understanding is that inline rolls will not display images. Unfortunately the only route (that I am aware of) for displaying the rollable table images is via a standard roll. The moment you inline it it outputs the text instead. 
Using an inline roll does indeed remove the "=x", thanks for telling me c: It's just. Not as handy as just clicking a button though 🙃 I think I'll just scrap it and make the roll table in my notebook instead.
You can quite easily make it a button - just save it as a character ability or a collections macro, and you can check a box to make it appear on your macro bar, and it'll one one click away.