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

Rollable Table to Name a Rollable Table

Looked around and didn't see anything like this. Looking to make random encounter tables: Grasslands-Common, Grasslands-Uncommon, Grasslands-Rare, etc (Each with random creature outputs. Each works when triggered individually) I then have a table for determining the rarity ( Rarity ) which outputs: Common, Uncommon, or Rare. Trying to place the following into a macro but it's not working: /w gm [[ 1t[?{Terrain?|Grasslands |Mountains }-[[1t[Rarity] ]] ] ]] Ouput desired to mimic rolling once from table Grasslands-<Rarity from 2nd table> If I take away the outer table and enter:  ?{Terrain?|Grasslands |Mountains }-[[1t[Rarity] ]]  ... I DO, in fact, get ' Grasslands-Common ' but when I insert that into the outer table roll, it breaks. I get a non-response, nothing in chat and nothing failing in API. That response apparently is not being entered into the outer table as [[1t[Grasslands-Common] ]] (which works if I type it out specifically this way) Found The Aaron's 'Recursive Tables' (Awesome, BTW. Totally got my random treasure charts working) and tried the above line with the !rt in front - no change. Not sure it was meant for this, but what it does do works great. So, real question is: can a table be rolled and have the output pulled into a table name of a rolled table?
1479672311

Edited 1479672426
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
You will need Aaron's Recursive Tables script for this functionality:&nbsp; <a href="https://app.roll20.net/forum/post/2845333/script-r" rel="nofollow">https://app.roll20.net/forum/post/2845333/script-r</a>... Apparently I can read everything (doh). Just ignore me.
Originally posted this in 'Specific Use Questions' ... noticed that it got moved to API (by SOMEONE ?) If this an API issue, then I just need guidance on where to look to fix this issue.
1479674419

Edited 1479674550
Silvyre
Forum Champion
John K. said: ... noticed that it got moved to API (by SOMEONE ?) Guilty! I moved this thread to the API forum because certain individuals (namely Aaron) pay special attention to it. That said, this is not strictly an API issue, and there does exist a non-API workaround . However, my suggestion is looking into the Randomizer script .
1479701519

Edited 1479701532
Personally i just put all the random encounters into one table, but increased the weigth on the more common encounters. So you have a 1 weight for very rare encounters, 3 for rares, 5 for uncommon, 10 for common for example.
1479702023
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
If you want to do this using recursive tables, I'd recommend making a table for each environment that would be your rarity table, each table item in that table would be an inline roll to the table of encounters for each rarity.
Tried Randomizer .... Results: !randomizer &nbsp;?{Terrain?|Grasslands |Mountains } [[1t[Rarity] ]] This results in no table found. Not even the Grasslands tables. !randomizer ?{Terrain?|Grasslands |Mountains } This results in Every Grasslands table being rolled with results from that table being rolled on once each. Interesting side-effect is that it triggered a similar effect as Recursive Tables by rolling the number of creatures I had in the table descriptions (i.e. "[[2d4]] creatures" as a table entry turned out as "&lt;inline&gt; creatures" instead of a text output showing the brackets) Without having to restructure everything, I believe that I will settle for the following: /w gm [[1t[Rarity] ]] !randomizer ?{Terrain?|Grasslands |Mountains } This pops up with the rarity first of which to use then the template that randomizer creates showing table rolls from all the Grassland possibilities. Output is still more than I require as I get rolls for all rarities, but it allows a single macro to pull up all encounter options. Much cleaner than what I started with. Then I can just take from what the whisper tells me that I should be using.
1479758883
Silvyre
Forum Champion
How about this? !randomizer ?{Terrain|Grasslands|Mountains}-Encounter