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 for Skill Checks

1603393683

Edited 1603400947
Hello!   Been using Roll20 for a while now, and just upgraded to PRO to introduce APIs into my game.  I've been going a little crazy linking sound effects using the Customizable Roll Listener (GREAT SCRIPT!!!), but have run into a wall. I have a general listener for Crits and Fumbles, as well as custom attack sounds set in playlists for each player, and spell effects for each spell the spellcasters know. I was wondering 3 things. First, is there a way, using OGL sheets, that I can limit the listener to one character?  Currently I have attack effects triggered by the type of weapon used, and I would rather assign them to [template=charname&&atk]. Right now it works because they all use unique weapons, but if the halfling rogue picks up a mace, the sound for my dwarf cleric would play.  Is it possible, and if so what would the script for that template be? Follow-up, I am having trouble setting the listener to listen for multiple templates.  It says to separate different templates with double ampersand (&&) which doesn't seem to work (i.e. template=atk&&dmg yields "atk&&dmg" in the template field of the config menu) Should there be a space between the template name and the ampersands? Second, I am trying to assign critical success and fumble effects to skill checks.  What would the name for that template be in OGL?  Would I need to make a separate listener for each skill check (i.e. template=acrobatics_roll etc) Third and lastly, is it possible, perhaps in conjunction with DeathTracker, to have a death sound assigned when an npc token dies? If so, what would the script for that look like? Any help would be GREATLY appreciated!
1603423724

Edited 1603424241
Oosh
Sheet Author
API Scripter
Multiple templates need to be separated with a space, not with &&. && is a strict AND operator, even if it does parse properly with template=atk && atkdmg, you're telling it to wait for a template which is both &{template:atk} AND &{template:atkdmg} - this will never trigger. So template=atk atkdmg will listen for both auto-roll damage and no-roll damage settings. Skill checks are usually on the simple template, though you could include skill to cover custom macros, and skill3D to cover the proficiency die variant rule. I've had all kinds of trouble getting !crl to work with multiple text strings as well, so not sure on the best way to handle individual character names. You should be able to use text=character_name to listen by character name - regardless of template output, the character name should be sent to chat at least once in any roll - remember it is case sensitive, it need to match the character sheet name exactly. The bit where it falls apart (for me), is adding a roll filter with multiple text strings: text=Alice \\alice detected                                        <==== this works         text=Alice&&## \\alice roll detected                         <==== this works text=Alice&&##,roll=critical \\alice crit detected     <==== this does not work See if it works for you or not, but it seems to be searching the inline roll and Alice for critical success. Or something.
Thanks for the reply, @Oosh.   So for a character specific attack sound for a character named Alice to play from the random single playlist Alice Attack, the script would read: !crl \\create,name=Alice,text=Alice,template=atk  !roll20AM --audio,play,nomenu|Alice Attack ((Just checked. This works. Now I gotta find a way to differentiate ranged attacks)  I am still unclear on the syntax for a generalized skill check effect. I tried this, to no avail: !crl \\create,name=SkillCrit,template=simple,roll=critical !roll20AM --audio,play,nomenu|Skill Crit Effect I suppose I did not ask the right question about multiple templates. I knew a space would incur the <and> parameter. I was wondering if there was a template for char_name, so I could look only for atk template and char_name template. Otherwise it would trigger anytime either template was activated. I wanted only when both are activated. Either way, you answered the syntax question and why it wasn't working. I hadn't considered adding char_name to the text field. That makes sense. 
I cannot seem to get this script to activate: text=##,template=simple,roll=[critical][fumble] For some reason, my API Output gives me this error now, when it did not before:   > CRL ERROR ||| Ability: Crit was not parseable. You may want to remove/update this ability via the config menu." "  > CRL ERROR ||| Ability: Fumble was not parseable. You may want to remove/update this ability via the config menu." "  > CRL ERROR ||| Ability: abilitycrit was not parseable. You may want to remove/update this ability via the config menu." The crit and fumble effects are working, they just spit out this error now, and they didn't before.  Unrelated?
1.  Ability checks don't have critical failures or successes in 5e.  So if you are doing a house rule thats fine just thought I'd point that out though.   2.  If you indeed do want a critical success and failure ability check to fire something you need to break them up and you then also need to take into account players who roll advantage and understand that npcs use different templates so thats familiars, companions, npcs.  Additionally you can't utilize the cool scripts like group check with this either.  That error message you keep getting is pretty much always going to fire and its going to spam the hell out of the api output till a scripter jumps on this and finally picks up the torch and fixes it.   in place of ##, put "r1=##" and "r2=##" Template is fine with Simple Do one for critical and then another for fumble. So in total for an ability check to have a crit failure and a crit success event to happen, you need 4 total CRL entries.  And all 4 of those entries are going to spam the hell out of the output for every non success/failure roll till someone fixes this script.  
1603589067
Oosh
Sheet Author
API Scripter
I'm also assuming there's no way to stop CRL from firing if you roll, for example, a 12 and a 20 with disadvantage. It's going to trigger a crit success even though the 20 is greyed out by the template.
@DM Eddie - I know ability checks don't have crits and fumbles, per se.  I just want to add a funny sound effect if they were to roll a nat1 or nat20 on them, that is different than my standard attack crit and fumble effect.   I tried the r1## r2## suggestion, to no avail. @Oosh, I would assume not, as any roll in with that in either the r1 or r2 slot would trigger the command. I am giving up for now, unless any brilliance surfaces in the near future.  Seems like a lot of trouble to make a fart joke when they roll a 1.
First off lets clarify some misconceptions.  I can only help you if your session is using 5e by roll20 character sheets.  Not the community sheet.  Not the shaped sheet.  Not any other game set sheet.   If you are using dnd 5e by roll20 sheet, what you want is not possible because both saving throws, ability checks, and random player created token actions/macros will utilize the templates and cause false positives or make an ability check not fire in your setup.  If you simply want to see it work however, you could do "r1=##" and "r2=##" in the first field, then "simple" in the second field, and "critical" in the third field with exact case sensitivity, spelling, and syntax.  and that will make nat 20 saving throws and nat 20 ability checks on the 5e by roll20 sheet to fire whatever event you assign to the fourth field.  All of this is said assuming you are using !crl \\config to setup your listener.  Using the command lines to setup a listener is unnecessarily adding a chance to screw up them by typing things wrong.  Use !crl \\config, this script is already insanely sensitive, why add a missed space, or more likely, according to your above reply...why add omissions of the "=" in my first post lead to you thinking it doesn't work.  Use !crl \\config.  The only field I've managed to get to take multiple filters is the template field, I currently have my critical strike and critical fumble attack rolls able to detect "atk, atkdmg".  I do not think you can combine multiple filters in roll results or seach fields, the syntax is too complicated, the listener is too screwy, and theres no real support from a scripter here to get an answer in any reasonable time.  The original author does not answer us here for this script.  
Thanks for the clarifications, DM Eddie. Fwiw, there were no misconceptions. I am using 5e by Roll20 sheets with ogl companion, and I do use crl! \\config to set up my listeners, it's just easier to write the full command than screenshot the config menu. It is good to know that the Text search field does not support multiple triggers. That is likely why my setup didn't work, as I set ## r1=## r2=## in there. 
1603677516
Oosh
Sheet Author
API Scripter
Yeah it's odd... in older threads Scott has suggested this should work, but my Javascript-Fu is nowhere near good enough to see what the problem might be in the meat of the script.