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

Issue with Recursive Tables

I am setting up the treasure tables for BECMI D&D in my game and I wanted to test Recursive Tables (I do have a Pro account). So, I have 3 rollable tables setup for common, uncommon and rare jewelry. Each containing something like "an armband", "a necklace", etc. Then I have the rollable table for jewelry values (TT-jewelry) which looks something like this: "[[1t[TT-common-jewelry]]] worth 100 gp" (without " of course) I am then trying to call the treasure table from a link in a handout with this: !
!rt/w gm [[1t[TT-jewelry]]] However, when clicking the link I get nothing. Not even "[[1t[TT-common-jewelry]]] worth 100 gp". The system doesn't react at all. It's like I never clicked. I can roll the tables individually of course. Do you have any ideas?
1529701692
The Aaron
Pro
API Scripter
You need a space between !rt and the rest of it, and only one ! on the front: !rt /w gm [[1t[TT-jewelry]]]
The first ! is a leftover from the code that I wrote in my message and that apparently gets parsed in this forum as well ! & # 13;  But the space was doing the trick. Thanks a lot. Great script! :)
1529704891
The Aaron
Pro
API Scripter
Right. When putting it in a button, you don’t need the preceding !
  That’s only necessary to fool the API command button into doing other things. With an API Command, you can just put the command in there directly. 
I have another problem: when creating those treasure tables, I have one for gems and one for jewelry. Both work fine independently. I have [[[[ceil((1d100-50)/100)*6d6]]t[TT-Gems]]] [[[[ceil(([[1d100]]-50)/100)*1d6]]t[TT-jewelry]]] They will generate something along the lines of  a Jacinth (10,000 gp), a Ruby (5000 gp), a Pearl (500 gp), a Topaz (500 gp), a Carbuncle (1000 gp), an Opal (1000 gp), a Diamond (10,000 gp), a Topaz (500 gp), a Diamond (10,000 gp), a Diamond (10,000 gp), an Aquamarine (500 gp), a Pearl (500 gp), an Aquamarine (500 gp), a Jade (100 gp), an Onyx (50 gp), an Emerald (5000 gp), an Emerald (5000 gp) and a Four-Leaf-Clover worth 4,000 gp (25 cn), an Anklet worth 1,500 gp (10 cn), a Heart worth 4,000 gp (25 cn) However, when I combine them in one line in a rollable table like so [[[[ceil((1d100-50)/100)*6d6]]t[TT-Gems]]], [[[[ceil(([[1d100]]-50)/100)*1d6]]t[TT-jewelry]]] I only get the gems in return and the part I highlighted in bold a Carbuncle (1000 gp), an Aquamarine (500 gp), an Opal (1000 gp), a Sapphire (5000 gp), an Opal (1000 gp), a Turquoise (10 gp), a Diamond (10,000 gp), an Emerald (5000 gp), a Ruby (5000 gp), a Sapphire (5000 gp), a Crystal (50 gp), a Topaz (500 gp), a Topaz (500 gp), a Coral (100 gp), a Carbuncle (1000 gp), [[1t[TT-common-jewelry]]] worth 500 gp (10 cn) Any idea why? (FYI: The common jewelry table is used to determine which what type of jewelry it is.)
1530222787
The Aaron
Pro
API Scripter
hmmm. There is a limit to the number of rolls that sendChat will perform in a given message, you might be hitting that.  If you reverse the order, is the first roll still the one that is expanded?
This might be it. When I reverse the order I get the jewelry and a couple of gems (like 23 so far, which is reasonable for 6d6). However, when I expand the chat again with magic treasure, coins, and so on. I don't get the gems and also not the jewelry. Is this a script limitation or a roll20 limitation? Is there a way around it?
1530278519
The Aaron
Pro
API Scripter
It’s a Roll20 limitation, but one I may be able to account for in the script. 
That would be awesome. I've been setting up all this tables, linking them, copying the contents only to be stopped at the final level. And just being able to roll treasure table A instead all of its individual contents is so much better. Let me know if I can do anything for you.