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

Nested Rollable Table with Corresponding Rollable Tables (Ultimate Magic Item Generator Macro)

Hi. I'm trying to make an ultimate magical item generator macro. So, you would roll for the class that the item would be for (general, rogue, warrior, mage, etc.) then for the type of item (weapon, armor, amulet, etc.), which is  doable without API. Now here's where it gets complicated. Also want to link each different item to a specific roll table for the abilities. So a Generic sword has a different ability roll table than a Rogue armor would. This means that the Rogue armor (loot1, loot21, armor) is somehow linked to another table that the code remembers that anything from loot21 could access. This is what I think it would look like, but not sure: /em is amazingly lucky! They find a [[1t[loot[[1t[loot[[1t[loot]]]]]]]]] with a [[2t[lootStat]]] ! Don't steal it from them...
1527190466
The Aaron
Pro
API Scripter
That's pretty much exactly what I wrote RecursiveTable for:&nbsp; <a href="https://app.roll20.net/forum/post/5954076/script-u" rel="nofollow">https://app.roll20.net/forum/post/5954076/script-u</a>...
Having rebuilt the 3.5 MIC treasure tables, The Aaron's script is the way to go. While the link you provided is nifty, it looks like there'd be difficulties when you have items that have partial, but not complete, overlap in shared abilities. If you'll be entering slews of data, use The Aaron's&nbsp; table export&nbsp; as well.
Cool. Thanks, guys. The Aaron said: That's pretty much exactly what I wrote RecursiveTable for:&nbsp; <a href="https://app.roll20.net/forum/post/5954076/script-u" rel="nofollow">https://app.roll20.net/forum/post/5954076/script-u</a>... Was actually looking at this one but my brain wasn't comprehending it. Probably tired or not paying attention. Will look at it again. Thanks
1527196832
The Aaron
Pro
API Scripter
All it really does is keeps re-evaluating the results of table rows until there are no more inline rolls left.&nbsp; So You might have a Treasure Type table, with rows that become more specific like a Treasure Type Sword table, and then gets Sword Traits.&nbsp; Behind the scenes, that might end up going through this process: Found: [[1t[TreasureType]]] Found: A Sword of [[ 1t[TreasureTypeSword] ]] Found: A Sword of the Headsman with [[3t[SwordTraits]]] Found: A Sword of the Headsman with a leather wrapped handle, ruin inscribed blade, blood stains
Nice. That makes sense now.