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

Recursive Table Crit Rolls - Probably a stupid question....

OK, so I've been using the Rollable Table Macros for players to roll optional crit effects for a couple of years in my campaign now. The tables in question have some effects which are an effect, plus a roll on another table. I was thinking I could use Recursive Tables to simplify this, but I'm hitting the issue that for those entries on my crit table, I've no idea how to format them to show the crit result AND then roll on the next table and display that too....expect this is a silly question, but after poking around in the forum for days I've found nothing to answer it. Thanks in advance!
1633182520
The Aaron
Roll20 Production Team
API Scripter
Can you give a few example rows for your tables and show what the result looks like right now?
When I created the Dragon Hoard/magic item tables I ran into a similar problem getting the spell scrolls and various potions/quals tokens/figurine tables to roll inside of a table so what I did was I made a chat button in the output of the initial roll.  So I roll dragon hoard 1-4, a button pops up beside the money results for treasure cards and magic item tables, I click those buttons to show the results of those, then inside of magic item tables if its a scroll, potion of resistance or something else with a table inside of it I get another chat button.  And since I have cards for everything I also have buttons inside them to give me cards from dealer api.  It was a total pita to make, but because of table export and recursive tables it is easily transferrable AND looks dope as hell with templates.  
1633203592

Edited 1633203625
The Aaron said: Can you give a few example rows for your tables and show what the result looks like right now? Sure, the crit tables are called from a Macro; !rt [[ 1t[?{Table|Bludgeoning|Piercing|Slashing}] ]] Each table called has 10 entries, the last 3-4 of them have entries like this, with an effect and another roll on another table; Pierce! Deal the maximum result of your damage dice twice, roll on the minor injury chart and roll on the major injury chart. I've tried this format; Crushed! Deal twice the maximum result of your damage dice [[1t [minor]]] But this outputs; Crushed! Deal twice the maximum result of your damage dice 1
Crushed! Deal twice the maximum result of your damage dice [[ 1t [ minor]]] Could be the space before the [.
Kilter said: Crushed! Deal twice the maximum result of your damage dice [[ 1t [ minor]]] Could be the space before the [. Nope, that causes this; (From RecursiveTables): An error occured parsing this roll:  Grievous Injury! Deal the maximum amount of damage from your normal damage dice then roll your damage dice and add the result [[1t[minor]]] Error:  Cannot read property 'id' of undefined
1633272590
The Aaron
Roll20 Production Team
API Scripter
What other scripts do you have installed?
The Aaron said: What other scripts do you have installed? GroupInitiative, 5e OGL, Rollable Table Macros, TokenMod, VectorMath, MatrixMath, PathMath, HTML builder, PowerCards, Combat Master, libTokenMarkers, Bump, Token Action Maker, Radar.js, splitArgs, Areas of Effect To be honest, many of them are unused or required by other APIs (eg Areas of Effect and Radar)
1633294658
The Aaron
Roll20 Production Team
API Scripter
Setting up a couple test tables and duplicating your setup, I got a 1 just like you did.  Changing the [[1t [minor]]] to [[1t[minor]] fixed the issue for me:
Thanks - I changed and was getting the error I reported earlier, until I realised I had capitalised the table names....Doh! Well I did say it was probably a stupid question! Thanks for all your help @Kilter and @The Aaron
1633351751
The Aaron
Roll20 Production Team
API Scripter
No problem!