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 with randomizer script

Hey guys, I'm still pretty new to working with the API and scripting, but I've been bashing my head against a wall for a while now and I'm hoping the gurus in here have an answer (probably incredibly simple) to what I'm trying to accomplish. So, Treasure hoards.  Right now the way I have my treasure hoard macro/rollable tables set up is I have rollable tables called "treasure-gems-10", "treasure-gems-50", etc. along with art objects named similarly, and magic item tables called "magicitem-a", "magicitem-b", etc, and I use the recursive tables script to call a table called "Treasure-Hoard" with an entry like [[[[2d6]]t[treasure-gems-10]]] with the command "!rt /w gm The party finds [[10d1000]] CP, [[10d100]] SP, [[10d10]] GP, and [[1t[Treasure-Hoard]]]." (an example, actual roll values are different to protect the innocent).  It works, but it's really difficult to read when you have a treasure hoard spitting out gold, art, gems, spell scrolls, and magic items, and the recursive table's script doesn't let you /w gm *and* use roll templates at the same time, so it's either ugly or shown to the players.  Not ideal. Enter randomizer, whispering to gm and using the default template to get a much clearer picture.  I found trig's post on reddit and accompanying youtube video for his GM Menu and thought that was a sound idea.  The problem I'm running into is I think I might be setting up my tables wrong for it to work properly.  To emulate the above, I set one table with a single entry for the CP, SP, GP, and a second table to roll for items, like gems.  The first one is simple and works well enough, but for items it doesn't seem to want to work properly.  My entry says something like "treasure-gems-10*[[2d6]]" but it doesn't recognize my inline roll and give me an actual random amount of gems, it only ever rolls one gem.  In the examples the scriptwriter gave he showed examples of saying something like "treasure-gems-10*4" and if I do that it works fine, giving multiple results, but I really want to use this to get a random number of gems, art, magic items, etc. rather than a discrete number, and I *really* don't want to make individual table entries for each individual number because at that point why bother? I'm really hoping that I'm missing something basic here, but I'm not sure.  Help!  Let me know if you need more information to help me track down this issue, or if this is just a flaw in the script and I'm just boned.
1492529318
The Aaron
Pro
API Scripter
I'm not sure about that, but I'm working on fixing the Recursive Tables to support whispering RollTemplates. (Scott already fixed it for me, just need to get it rolled out, which I was working on this weekend).
1492531155

Edited 1492532272
Cool!  Now I just have to figure out how I'm gonna parse out a list of art, gems, and magic items...which is rough when my current syntax looks like just tables rolling tables so it comes out as one nice long string of garbage...Comma delineated, of course.  (almost) back to the drawing board. Edit: aaaaand fixed up.  Split the hoard table into 3 so I can roll gems, art, and magic items separately, and it's looking about as good as it's going to.  Once !rt supports templates and /w gm I'm in business. :D