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

Is there a maximum number of nested rolls in a macro??

1519583235

Edited 1519583450
Pedro B.
Translator
Hello, I am having a lot of trouble with nested macros and abilities for my NPC. I hate oppening the character sheet of the PNJ as a DM, since it slows a lot the game even if the server was fast which is not, specially in rush hours. Because of this I nest my macros so that with a token button I can roll a full attack, and the macro will ask me if I am using power attack, vital strike, , divine favor, etc. So there are a lot of nested rolls and queries that repeat for each attack.  Until recently I was using them whithin tables with more or less success although it shocked me that exactly the same macro will sometimes work and sometimes not.  See the atached screenshot. Both rolls are done with the same button. Now that my NPC are level 10+ it is a nightmare, since the more lines the table has, the more likely is that it gets one of these random bugs on reading properly the macro. Macro that always work perfectly in a single attack. So I decided to change my approach to my macros and use several consecutive tables, in order to avoid this. So now I want to do macros like the following one: Note that on the last image each row is a different table, so I can avoid the aforementioned problem. But now I have a different problem.  If I add more attacks to the macro it won't work at all. This is what the text of the macro is:  &{template:pf_attack} {{color=@{0_color}}}{{header_image=@{0_image1}}} {{name= @{Nombre} FULL TWF }} {{ at - confirm = dmg _ critDmg _sneak}} %{@{character_name}|w1_1} %{@{character_name}|w1_2} %{@{character_name}|w1_3} %{@{character_name}|w1_4} If I use more than 3 of the table attacks  %{@{character_name}|w1_1}  the macro does not work.   I can change the order or repeat the same attack, with exactly the same result. More than 3 attacks make the macro useless. So I am guessing that there is a maximum number of nested macros allowed. Is this right?  If so, is it the same for subscriptors than for free users?
1519592047
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Yes, there is a limit of ~1000 rolls (nested or discrete) per chat message
1519624968

Edited 1519625003
vÍnce
Pro
Sheet Author
I would also check your macros to see if you have included space around all inline rolls.  ie this " [[ 1d20 ]] " vs this "[[1d20]]"  For some reason making lot's of inline rolls within a roll template can cause some of them to fail if you do not include the extra "padding". 
1519631513
Jakob
Sheet Author
API Scripter
Vince said: I would also check your macros to see if you have included space around all inline rolls.  ie this " [[ 1d20 ]] " vs this "[[1d20]]"  For some reason making lot's of inline rolls within a roll template can cause some of them to fail if you do not include the extra "padding".  On the flip side, the API will sometimes fail sending rolls with sendChat() if you do  include padding. Fun times!
1519659168
vÍnce
Pro
Sheet Author
Jakob said: Vince said: I would also check your macros to see if you have included space around all inline rolls.  ie this " [[ 1d20 ]] " vs this "[[1d20]]"  For some reason making lot's of inline rolls within a roll template can cause some of them to fail if you do not include the extra "padding".  On the flip side, the API will sometimes fail sending rolls with sendChat() if you do  include padding. Fun times! I read your post the other day mentioning that Jakob.  I think I had the same thought. "Fun times!", however I don't think I used the same vernacular.  ;-P
1519659320
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Yep, Aaron made a script a while ago (like several years) that displays all the various eccentricities in a chat output.
Thanks guys, so spacing createas some errors and not doing it creates some others? At least that is consistent with my experience. Some times the errors disapeared by reversing the order of the factors ot by adding 0+ at the beggining of the roll. Knowing there is a maximum number of rolls per message, I think that my last approach is the safer one. Maybe adding two buttons if there are two many attacks.