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

RecursiveTables: problem attempting to utilize selected attributes.

I'm trying to use the functionality of RecursiveTables to enhance the Wild Magic Surge table to include the spell save DC of effects produced by the surge, which are based on the attributes of the sorcerer who produced the surge. The problem is that when I try to utilize selected attributes, I receive error messages. I have a stripped down table entry that reads: [[8+@{selected|pb}+@{selected|charisma_mod}]] When that entry is rolled, the following error message is displayed in chat: (From RecursiveTables): An error occured parsing this roll: [[8+@{selected|pb}+@{selected|charisma_mod}]] Error: undefined In the API log the output "ERROR: Unable to find character selected in chat command." Outside of recursive tables the "roll" is displayed correctly, and the roll will also display correctly within the table if I change "selected" to a character's name. Is there something else I need to do to get selected attributes to work with RecursiveTables? Thanks!
1588774498
The Aaron
Roll20 Production Team
API Scripter
The API has no context for what is selected.  At the point where that roll is passed into Roll20's sendChat(), it can't do a substitution for that stat and ends up with an invalid roll.  It would be the same as typing this in chat: [[8+@{some non-existent character|pb}+@{some non-existent character|charisma_mod}]]
I see, thanks, I wasn't aware of that limitation of the API.
1588775291
The Aaron
Roll20 Production Team
API Scripter
No problem.  The API runs on a server off in the cloud.  You can think of them as another player attached to the game but with no user interface.