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

Customizable Roll Listener Question

I'm trying to produce critical hit sounds using CRL and Roll20AM in my Pathfinder E1 game using the Community sheet. The critical hit sound works using the following command: !crl \\create,name=CritHit,template=pf_attack,text=##,roll=critical \\!roll20AM --audio,play,nomenu|Critical Hit This works for only the first attack. I setup this command for the second attack: !crl \\create,name=CritHit 2,template=pf_attack,text={{attack2=##}},roll=critical \\!roll20AM --audio,play,nomenu|Critical Hit I have something wrong because this one won't work. Anyone have an idea on what I messed up? - Meldogs
I'm not familiar with using CRL but Roll20's audio is very buggy.  Roll20AM is great but sometimes Roll20 itself has trouble keeping up, or just playing audio in general.  Are you using these two macros back-to-back quickly?  Are you getting any errors, or just no sound?  Can you try to use something besides Roll20AM, like just a line of chat, to verify the CRL part is working fine for the second attack?
1561057383

Edited 1561057509
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
I need to dig into CRL and fix several things in it. in the meantime, perhaps try taking out the brackets around attack2=. Other things to check are that the macro sends the attack2 field as attack2=[[1d6]] and not attack2= [[1d6]]. If it sends it with a space in there that you don't have accounted for, the roll listener won't recognize it.
The Roll20AM part is actually working well. The first command picks up critical hits for the first attack and plays the sound without fail. The issue seems to only be with additional attacks. I tried it without the brackets and I'm pretty sure that it is sending in the format of attack2=[[1d6]]. This is the bit of the macro for an example: {{attack2=[[1d20cs>[[ 10 ]] + [[ [[ 3 ]] [Total] + [[ 0 ]] [Macro] + @{Spoiled|toggle_global_melee_macro_insert} + @{Spoiled|toggle_global_attack_macro_insert} + 0 ]] [iterative] ]]}} This is what the config output looks like for each of the listeners I have setup looks like. CritHit works and CritHit2 doesn't. I get this in the API Output Console. Strange that it errors on CritHit which is the listener that is working. Thoughts? Thanks for they help guys. Your time is appreciated. -Meldogs
1561061826
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hmm, ok, based on that error, and what you've shown (thanks for the detail btw), I think we're running into a race condition. Part of the problem here is that your critHit listener will actually trigger on any critical roll, regardless of if it is in the attack1 field or not. So, when you then get a crit in attack2, it is trying to trigger both listeners instead of just one. I'd recommend changing critHit's text to be attack1=## instead of just ##
Scott C. said: Hmm, ok, based on that error, and what you've shown (thanks for the detail btw), I think we're running into a race condition. Part of the problem here is that your critHit listener will actually trigger on any critical roll, regardless of if it is in the attack1 field or not. So, when you then get a crit in attack2, it is trying to trigger both listeners instead of just one. I'd recommend changing critHit's text to be attack1=## instead of just ## I changed the listener to attack=## instead of just ## as suggested and CritHit listener still works that way. The numbering system for attacks in the pathfinder community sheet is attack, attack2, attack3, ect. I double checked it to make sure that the first attack is just attack and not attack1. CritHit 2 listener, attack2=##, still doesn't work though. I still get the same API Output Console error for CritHit even with the updated listener. I did some additional testing and with the listener set to just ## as it was originally and found that it works for only the first attack and not any additional attacks. Setting the listeners to attack=##, attack2=##, ect. seems like the way to go with multiple listeners watching for crits, but I wanted to let you know that if ## should work for any attack that is doesn't appear to be behaving properly. - Meldogs
1561078478
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Thanks meldogs. I'll try to find some time to update CRL.