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 tables not working on my Treasure Table Macros

I've been trying for a couple of weeks to find out what is going on. I've watched several videos, over and over, and have double checked all my syntax and line structure, but cannot get the !rt Macro to give me output based on the rollable tables I've set up. I can get the rollable tables to work. Here is my macro !rt [[1t[TH-Ch0-4]]] Here are the line items for TH-Ch0-4 [[2d4*25]]gp art objects [[3d6*50]]gp gems [[3d6*100]]gp gems [[2d4*250]]gp art objects [[[[2d4*25]]gp art objects [[1d6]]1t[MagicItemTblA]]] [[[[3d6*50]]gp gems [[1d6]]1t[MagicItemTblA]]] [[[[3d6*100]]gp gems [[1d6]]1t[MagicItemTblA]]] [[[[2d4*250]]gp art objects [[1d6]]1t[MagicItemTblA]]] [[[[2d4*25]]gp art objects [[1d4]]1t[MagicItemTblB]]] [[[[3d6*50]]gp gems [[1d4]]1t[MagicItemTblB]]] [[[[3d6*100]]gp gems [[1d4]]1t[MagicItemTblB]]] [[[[2d4*250]]gp art objects [[1d4]]1t[MagicItemTblB]]] [[[[2d4*25]]gp art objects [[1d4]]1t[MagicItemTblC]]] [[[[3d6*50]]gp gems [[1d4]]1t[MagicItemTblC]]] [[[[3d6*100]]gp gems [[1d4]]1t[MagicItemTblC]]] [[[[2d4*250]]gp art objects [[1d4]]1t[MagicItemTblC]]] [[[[2d4*25]]gp art objects 1t[MagicItemTblD]]] [[[[3d6*50]]gp gems 1t[MagicItemTblD]]] [[[[3d6*100]]gp gems 1t[MagicItemTblD]]] [[[[2d4*250]]gp art objects 1t[MagicItemTblD]]] [[[[2d4*25]]gp art objects [[1d4]]1t[MagicItemTblF]]] [[[[3d6*50]]gp gems [[1d4]]1t[MagicItemTblF]]] [[[[3d6*100]]gp gems [[1d4]]1t[MagicItemTblF]]] [[[[2d4*250]]gp art objects [[1d4]]1t[MagicItemTblF]]] [[[[3d6*100]]gp gems [[1d4]]1t[MagicItemTblG]]] [[[[2d4*250]]gp art objects [[1d4]]1t[MagicItemTblG]]] [[[[3d6*100]]gp gems 1t[MagicItemTblH]]] [[[[2d4*250]]gp art objects 1t[MagicItemTblH]]] I am using a pro account and it has worked once or twice. I keep restarting the API sandbox and deleting my chat and clearing cookies and cache, but it just will not return any output  when I click the macro.
1662094776
Kraynic
Pro
Sheet Author
It looks like most of the individual lines might not be correct, unless recursive tables requires abnormal roll syntax. For example, this: [[[[2d4*25]]gp art objects [[1d6]]1t[MagicItemTblA]]] should probably be this: [[2d4*25]]gp art objects [[[[1d6]]t[MagicItemTblA]]]
I'll give that a try
1662152952

Edited 1662153089
I got it to work somewhat when I deleted all my other scripts, but now it's only rolling the first part of any line, and not the Magic Items tables. Even though it sort of works now, the output waffles between: This: 125 50 And This: 150gp art objects Then Reverts to this: 100 125
1662159438
timmaugh
Forum Champion
API Scripter
Each line item has to work as it's own entry. If you copy and paste the text out of the entry and into chat, you'll get the same output. The problem, I think, is that you are wrapping everything as inline rolls (between the double brackets), but then NOT using inline roll syntax (your text  "gp", "art objects", etc., isn't parsable). To fix it, you need to put the number parts in the inline rolls, and the text outside of it.  Not this: [[[[2d4*25]]gp art objects [[1d6]]1t[MagicItemTblA]]] ...but this: [[2d4*25]]gp, [[[[1d6]]t[MagicItemTblA]]] art objects ... or, if I misunderstand what you're trying to do in that entry, at least: [[2d4*25]]gp art objects [[[[1d6]]t[MagicItemTblA]]] ...or... [[2d4*25]]gp, [[1d6]] art objects, and [[1t[MagicItemTblA]]] Any arrangement where the numerical values are what the inline rolls determine, with the text outside.
If I may, Random Treasure should be something like: 2D4 art objects (25Gp), and 1D6 Magic Item Sooo maybe something like this? [2d4]] art objects (25Gp), and  [[[[1d6]]t[MagicItemTblA]]] But the output for rolling a random number of times on  [MagicItemTblA] will most likely result in a really ugly output in chat, if it even works. To fix it, I use a macro to call upon a table which include the line of code I need to roll (coin), and the number of each type of gem/item I need to roll for on another macro. I don't use API for those, I just click my first macro, copy/past the line of code back in chat, then I use the proper Gem/Item macro the number of times generated by that line of code. Example entries on one of my Hoard Treasure Table: Treasure-Hoard-(CR:11-16) GP: [[1000D6 +1000D6 +1000D6 +1000D6]] | PP: [[500D6]] | Arts (250Gp): [[2D4]] | Magic: Roll [[1D6]] times on Magic Item Table C GP: [[1000D6 +1000D6 +1000D6 +1000D6]] | PP: [[500D6]] | Arts (250Gp): [[2D4]] | Magic: Roll [[1D4]] times on Magic Item Table D GP: [[1000D6 +1000D6 +1000D6 +1000D6]] | PP: [[500D6]] | Arts (750Gp): [[2D4]] | Roll once on Magic Item Table F and [[1D4]] times on Magic Item Table G Please forgive the formatting, Roll20 went out of wack again for some reason...
I'm starting to think its roll20. I had it working, after playing around with then, today none of the commands that were working yesterday are working.