It would be really emberrasing if I just missed something easy, but I can't figure it out. I'm using complex structure of fables to roll loot using RecursiveTable script and recently I noticed a weird '0' in the output. After quite some digging I pinponted the problem. Apparently nested roll are unfolded differently depending on wether they are posted from chat or from the API. Here's a sample [[6d6*100]] cp, [[3d6*100]] sp, [[2d6*10]] gp, [[[[2d4]]t[ArtObjects25gp]]], [[1t[MagicItemTableG]]] Output if I post it in chat 1900 cp, 1400 sp, 90 gp, Cloth-of-gold vestments (25gp), Weapon +2 Which admittedly still doesn't process nested roll but inlinerolls are recognized correctly. However if I make test script to post it from API: on("chat:message", function(msg) {
'use strict'
if(msg.type == 'api' && msg.content.startsWith('!test')) {
sendChat('','[[6d6*100]] cp, [[3d6*100]] sp, [[2d6*10]] gp, [[[[2d4]]t[ArtObjects25gp]]], [[1t[MagicItemTableG]]]');
}
});
Result: 2100 cp, 1000 sp, 70 gp, Gold locket with a painted portrait inside (25gp), 0 Any advise? EDIT: Sample tables for anyone who wants to reproduce: !import-table --_FigurineOfWondrousPower --show
!import-table-item --_FigurineOfWondrousPower --Bronze griffon --1 --
!import-table --MagicItemTableG --show
!import-table-item --MagicItemTableG --Weapon +2 --11 --
!import-table-item --MagicItemTableG --Figurine of wondrous power <%%91%%><%%91%%>1t<%%91%%>_FigurineOfWondrousPower<%%93%%><%%93%%><%%93%%> --3 --
!import-table-item --MagicItemTableG --Adamantine armor (breastplate) --1 --
!import-table --ArtObjects25gp --show
!import-table-item --ArtObjects25gp --Silver ewer (25gp) --1 --
!import-table-item --ArtObjects25gp --Carved bone statuette (25gp) --1 --