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 .
×

[RecursiveTable] Weird behavior when calling from a macro

Hello, I have a weird behavior when I'm using RecursiveTable with a macro calling a RollableTable. But I'm not 100% confident that this is a problem with RecursiveTable. First, here is the macro calling the RollableTable with RecursiveTable: !rt /w gm &{template:npcaction} {{rname=Treasure Hoard: Challenge 5-10}} {{name=}} {{description=[[1t[TreasureHoard5-10]]]}} When having this item from the table [[2d6*100]] CP, [[2d6*1000]] SP, [[6d6*100]] GP, [[3d6*10]] PP, [[[[2d4]]t[25GPArtObjects]]] (25 GP), [[[[1d4]]t[MagicItemTableC]]] Everything is fine: But on a line like this one [[2d6*100]] CP, [[2d6*1000]] SP, [[6d6*100]] GP, [[3d6*10]] PP, [[[[2d4]]t[25GPArtObjects]]] (25 GP), [[1t[MagicItemTableD]]] The weird behavior appears I have a 0 result from the [[1t[MagicItemTableD]]] code (at the end). I said this is weird because when I try to run the command using the chat like so !rt [[2d6*100]] CP, [[2d6*1000]] SP, [[6d6*100]] GP, [[3d6*10]] PP, [[[[2d4]]t[25GPArtObjects]]] (25 GP), [[1t[MagicItemTableD]]] I get a proper result And this behavior occurs on all item lines with "1t", but is not related to the table called after. Thanks.
1588180616
The Aaron
Roll20 Production Team
API Scripter
I think this is the bug you're experiencing:&nbsp; <a href="https://app.roll20.net/forum/post/6778746/api-sendchat-returns-bad-results-to-callback-with-rollable-tables-expressions-with-inline-rolls" rel="nofollow">https://app.roll20.net/forum/post/6778746/api-sendchat-returns-bad-results-to-callback-with-rollable-tables-expressions-with-inline-rolls</a> It's not addressable by the API (well, not easily), it's a problem with the sendChat() function that Roll20 needs to fix.&nbsp; You can change they way you are calling some of your tables to prevent the problem.
1588180693
The Aaron
Roll20 Production Team
API Scripter
If you change this: [[2d6*100]] CP, [[2d6*1000]] SP, [[6d6*100]] GP, [[3d6*10]] PP, [[[[2d4]]t[25GPArtObjects]]] (25 GP), [[1t[MagicItemTableD]]] to this: [[2d6*100]] CP, [[2d6*1000]] SP, [[6d6*100]] GP, [[3d6*10]] PP, [[[[2d4]]t[25GPArtObjects]]] (25 GP), [[ [[1d1]] t[MagicItemTableD]]] It should work.
Yes, it works. Thank you so much.
1588181577
The Aaron
Roll20 Production Team
API Scripter
Great!