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

Seeking Assistance with Roll Templates in Rollable Tables

1714678902

Edited 1714682854
Hi folks, I'm hoping you can help me spot what I'm doing wrong. I've reproduced the Despair Deck from the D&D 4e book "Shadowfell: Gloomwrought & Beyond" with some slight updates for my D&D 5e game. This works when I paste it into chat: &{template:traits} {{name= name }} {{source= source }} {{description= description }} But it doesn't work from the rollable table. I see that the table added parentheses but I don't quite know the wording to search the forums to fix this issue. Help is greatly appreciated :) Also noting that it's a Jumpgate Beta session. I'm not sure if that makes a difference. [edit: fixed wording & added Jumpgate Beta advisory]
1714701006
timmaugh
Pro
API Scripter
Hey lachrymalquietus... unfortunately roll templates do not natively work from Rollable Tables that way. The results of rolling from the table wraps the result in a roll formatting, and the template syntax is not discovered. Also, any inline rolls present in the roll template are also not expanded (they aren't discovered as rolls). However, since I see the Pro tag beside your name, you can solve this with scripts. If you install the Metascript Toolbox, it will work with only a very slight alteration. For example, if your rollable table was named "Despair-Deck," you might previously have rolled from it like this: [[ 1t[Despair-Deck] ]] Once you have the Metascript Toolbox, you can change that command to: ![[ 1t[Despair-Deck] ]] {&simple} And without changing any of the entries in the rollable table, this should work. You'll get a template output to the chat, and if there are any inline rolls in the text, they will be discovered and rolled. If I have misunderstood what you're trying to do -- or if you can't get it to work on your own -- post back with the command you are trying to run and I'll lend a hand.
WORKS! thanks so much, Timmaugh :D
1714750859
timmaugh
Pro
API Scripter
w00t! Oh, and if it doesn't report as coming from "you" (the current speaker), then you want to configure SelectManager (part of the toolbox). Run this command once, and it should fix that issue: !smconfig +who +playerid
Okay, fantastic! Looks like it was already enabled but I've noted it for the future :)
timmaugh said: Hey lachrymalquietus... unfortunately roll templates do not natively work from Rollable Tables that way. The results of rolling from the table wraps the result in a roll formatting, and the template syntax is not discovered. Also, any inline rolls present in the roll template are also not expanded (they aren't discovered as rolls). However, since I see the Pro tag beside your name, you can solve this with scripts. If you install the Metascript Toolbox, it will work with only a very slight alteration. For example, if your rollable table was named "Despair-Deck," you might previously have rolled from it like this: [[ 1t[Despair-Deck] ]] Once you have the Metascript Toolbox, you can change that command to: ![[ 1t[Despair-Deck] ]] {&simple} And without changing any of the entries in the rollable table, this should work. You'll get a template output to the chat, and if there are any inline rolls in the text, they will be discovered and rolled. If I have misunderstood what you're trying to do -- or if you can't get it to work on your own -- post back with the command you are trying to run and I'll lend a hand. Tim, question about this, would this work for the following macro? !rt[Delimiter:BR|] /w gm &{template:default} {{name=Random Treasure}}{{You Found=?{Choose|10gp Gems, [[1t[10gp-Gems]]] 10gp|50gp Gems, [[1t[50gp-Gems]]] 50gp|100gp Gems, [[1t[100gp-Gems]]] 100gp|500gp Gems, [[1t[500gp-Gems]]] 500gp|1000gp Gems, [[1t[1000gp-Gems]]] 1000gp|5000gp Gems, [[1t[5000gp-Gems]]] 5000gp|25gp Art, [[1t[25gp-Art]]] 25gp|250gp Art, [[1t[250gp-Art]]] 250gp|750gp Art, [[1t[750gp-Art]]] 750gp|2500gp Art, [[1t[2500gp-Art]]] 2500gp|7500gp Art, [[1t[7500gp-Art]]] 7500gp|Individual Treasure Tier I, [[1t[ITTI]]]|Individual Treasure Tier II, [[1t[ITTII]]]|Individual Treasure Tier III, [[1t[ITTIII]]]|Individual Treasure Tier IV, [[1t[ITTIV]]]|Treasure Horde Tier I, [[1t[THTI]]]|Treasure Horde Tier II, [[1t[THTII]]]|Treasure Horde Tier III, [[1t[THTIII]]]|Treasure Horde Tier IV, [[1t[THTIV]]]} }}
1715087747
timmaugh
Pro
API Scripter
Hey, ez... I'm not sure what you're asking (that is, I'm not sure what that line isn't doing for you, or what else you want to do). The trick described, above, will render roll templates (and inline rolls) from rollable tables -- with certain limitations. You are presenting a RecursiveTable command line which should output a template... are you asking if you can put *this* command line, itself, in a Rollable Table? If so... the answer is "yes" in that the RT portion will still work... however, also "no" in that you can't bury the query in the table (it won't be detected soon enough to prompt the user. We can work around that, if that's what you want to do, I just don't want to spend too much time going in any particular direction until you can provide more information of what you're looking for... The metascripts can do lots of things... either taking the load off RT or in combination with RT... we just have to understand what you're looking for to make sure we get there.
timmaugh said: Hey, ez... I'm not sure what you're asking (that is, I'm not sure what that line isn't doing for you, or what else you want to do). The trick described, above, will render roll templates (and inline rolls) from rollable tables -- with certain limitations. You are presenting a RecursiveTable command line which should output a template... are you asking if you can put *this* command line, itself, in a Rollable Table? If so... the answer is "yes" in that the RT portion will still work... however, also "no" in that you can't bury the query in the table (it won't be detected soon enough to prompt the user. We can work around that, if that's what you want to do, I just don't want to spend too much time going in any particular direction until you can provide more information of what you're looking for... The metascripts can do lots of things... either taking the load off RT or in combination with RT... we just have to understand what you're looking for to make sure we get there. Thanks for the reply Tim, What I was hoping is to make the output to chat cleaner. Currently the text is being jammed together vertically by the default template AND more importantly its not writing all of the results to chat. Instead of writing all of the gemstones it writes one and only when I scroll over the results can I see the other gemstones, magic items, etc.
1715094483
timmaugh
Pro
API Scripter
It looks like you make a single selection of what kind of treasure to return, and then RecursiveTable expands the results and concatenates them with a line break character. That seems to indicate that there are multiple returns beneath the initial call to the first table (that return has another roll, etc.). Can you share the content of your tables?
So, what follows is the macro calling the various tables !rt[Delimiter:BR|] /w gm &{template:default} {{name=Random Treasure}}{{You Found=?{Choose|10gp Gems, [[1t[10gp-Gems]]] 10gp|50gp Gems, [[1t[50gp-Gems]]] 50gp|100gp Gems, [[1t[100gp-Gems]]] 100gp|500gp Gems, [[1t[500gp-Gems]]] 500gp|1000gp Gems, [[1t[1000gp-Gems]]] 1000gp|5000gp Gems, [[1t[5000gp-Gems]]] 5000gp|25gp Art, [[1t[25gp-Art]]] 25gp|250gp Art, [[1t[250gp-Art]]] 250gp|750gp Art, [[1t[750gp-Art]]] 750gp|2500gp Art, [[1t[2500gp-Art]]] 2500gp|7500gp Art, [[1t[7500gp-Art]]] 7500gp|Individual Treasure Tier I, [[1t[ITTI]]]|Individual Treasure Tier II, [[1t[ITTII]]]|Individual Treasure Tier III, [[1t[ITTIII]]]|Individual Treasure Tier IV, [[1t[ITTIV]]]|Treasure Horde Tier I , [[1t[THTI]]]|Treasure Horde Tier II, [[1t[THTII]]]|Treasure Horde Tier III, [[1t[THTIII]]]|Treasure Horde Tier IV, [[1t[THTIV]]]} }} This is one of the tables that it calls, Treasure Horde Tier I [THTI] Weight 6 = [[6d6*100]] Copper pieces [[3d6*100]] Silver pieces [[2d6*10]] and Gold pieces Weight 10 = [[6d6*100]] Copper pieces [[3d6*100]] Silver pieces [[2d6*10]] Gold pieces [[[[2d6]]t[10gp-Gems]]] 10gp Weight 10 = [[6d6*100]] Copper pieces [[3d6*100]] Silver pieces [[2d6*10]] Gold pieces [[[[2d4]]t[25gp-Art]]] 25gp Weight 10 = [[6d6*100]] Copper pieces [[3d6*100]] Silver pieces [[2d6*10]] Gold pieces [[[[2d6]]t[50gp-Gems]]] 50gp Weight 8 = [[6d6*100]]  Copper pieces [[3d6*100]] Silver pieces [[2d6*10]] Gold pieces [[[[2d6]]t[10gp-Gems]]] 10gp [[[[1d6]]t[MITA]]] Weight 8 = [[6d6*100]]  Copper pieces [[3d6*100]] Silver pieces [[2d6*10]] Gold pieces [[[[2d4]]t[25gp-Art]]] 25gp [[[[1d6]]t[MITA]]] Weight 8 = [[6d6*100]]  Copper pieces [[3d6*100]] Silver pieces [[2d6*10]] Gold pieces [[[[2d6]]t[50gp-Gems]]] 50gp [[[[1d6]]t[MITA]]] Weight 5 = [[6d6*100]]  Copper pieces [[3d6*100]] Silver pieces [[2d6*10]] Gold pieces [[[[2d6]]t[10gp-Gems]]] 10gp [[[[1d4]]t[MITB]]] Weight 5 = [[6d6*100]]  Copper pieces [[3d6*100]] Silver pieces [[2d6*10]] Gold pieces [[[[2d4]]t[25gp-Art]]] 25gp [[[[1d4]]t[MITB]]] Weight 5 = [[6d6*100]]  Copper pieces [[3d6*100]] Silver pieces [[2d6*10]] Gold pieces [[[[2d6]]t[50gp-Gems]]] 50gp [[[[1d4]]t[MITB]]] Weight 3 = [[6d6*100]] Copper pieces [[3d6*100]] Silver pieces [[2d6*10]] Gold pieces [[[[2d6]]t[10gp-Gems]]] 10gp [[[1d4]]t[MITC]]] Weight 2 = [[6d6*100]]  Copper pieces [[3d6*100]] Silver pieces [[2d6*10]] Gold pieces [[[[2d4]]t[25gp-Art]]] 25gp [[[[1d4]]t[MITC]]] Weight 5 = [[6d6*100]]  Copper pieces [[3d6*100]] Silver pieces [[2d6*10]] Gold pieces [[[[2d6]]t[50gp-Gems]]] 50gp [[[[1d4]]t[MITC]]] Weight 7 = [[6d6*100]] Copper pieces [[3d6*100]] Silver pieces [[2d6*10]] Gold pieces [[[[2d4]]t[25gp-Art]]] 25gp [[[[1d4]]t[MITF]]] Weight 5 = [[6d6*100]]  Copper pieces [[3d6*100]] Silver pieces [[2d6*10]] Gold pieces [[[[2d6]]t[50gp-Gems]]] 50gp [[[[1d4]]t[MITF]]] Weight 2 = [[6d6*100]] Copper pieces [[3d6*100]] Silver pieces [[2d6*10]] Gold pieces [[[[2d4]]t[25gp-Art]]] 25gp [[1t[MITG]]] Weight 1 = [[6d6*100]]  Copper pieces [[3d6*100]] Silver pieces [[2d6*10]] Gold pieces [[[[2d6]]t[50gp-Gems]]] 50gp [[1t[MITG]]] I hope that helps, let me know
1715181634
timmaugh
Pro
API Scripter
Something like this is definitely possible. Let me think about how I would approach it before I start modifying what you already have. One question, when you roll: [[[[2d6]]t[50gp-Gems]]] ...do you get all 2d6 returns? Do they all show in your output?
They show up ONLY when I hover the cursor over the output. For example,