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

[Help Request] Recursive Table Setup

Hey I Wonder if I can get some help with Recursive Tables. What I am trying to recreate is a ( 1d5 x Tablename ) meaning, that it will roll randomly 1d5 results of 1 table. For example if it was a 3 I would get 3 results from the Tablename. I was trying to read trough the forum, but didnt understand if this is possible or how do I do it. All Help appreciated 
Another question can I add this somehow to Powercards without needing to use the !rt command? I am trying to have a conditional before the roll? so for example  --?? $Type == 1 ?? Treasure| [[1d5]]t[Treasure]  Dont know if this make any sense
1570988366
The Aaron
Roll20 Production Team
API Scripter
For your first question, you'd just do something like: !rt [[ [[1d5]]t[Treasure] ]] That will give you 1–5 results from Treasure, comma delimited. For your second question, It's probably easiest to have RecursiveTable call PowerCards with the results.  I don't know the syntax for PowerCards anymore but something like: !rt !power --?? $Type == 1 ?? Treasure|[[ [[1d5]]t[Treasure] ]] Recursive table will do the expanding of rolls and then execute whatever statement was after the !rt part, so the above will end up as if you'd typed (assuming the bolded part came from the Treasure table): !power --?? $Type == 1 ?? Treasure| 23gp, a healing potion, 3 gold bars worth 50gp each
Hey Aaron thx you for the explanation. The first part is working perfect. The Second part is a problem since the table I am creating is a little bit more complicated and the line I am taking is part of a random generator. I can make it work and I can see the result if I hover the mouse over. I tried to look at powercards and there is a statement by Kurt but I dont know how to apply it to it. I have manage to get what i was looking, but it just required a longer command.
1571001127
The Aaron
Roll20 Production Team
API Scripter
The syntax would be something like: !power --api_rt [[ [[1d5]]t[Treasure] ]] But it probably won't work with RecursiveTable unless he's accounting for the format of inline rolls passed to the sub commands.