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

Roll20 Audio Master Script + Customizable Roll Listener Script - Trigger Issue

Hey guys, I am looking to trigger some sound effects based off of my rollable table results.  So here is where I'm at so far.. 1. I created a rollable table: 2. I created this macro to trigger it: 3. I have my tracks configured and ready to go in the jukebox: 4. I installed the Customizable Roll Listener (CRL) script to try and trigger the sound effects when the result appears in the chat using these codes: !crl \\create,name=LoreSound,text=Lore \\!roll20AM --audio,play,nomenu,single|Lore !crl \\create,name=PuzzleSound,text=Puzzle \\!roll20AM --audio,play,nomenu,single|Puzzle !crl \\create,name=CombatSound,text=Combat \\!roll20AM --audio,play,nomenu,single|Combat !crl \\create,name=DMChoiceSound,text=DM's Choice \\!roll20AM --audio,play,nomenu,single|DM's Choice For whatever reason I cannot seem to get the sound effect to trigger when the rollable table spits out the result in the chat, but when I simply type and enter a result (i.e. Combat or Puzzle) it triggers the sound effect just fine. Any ideas as to why this may be? I hope that makes sense.
1703774613
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Unfortunately, this is because of how Roll20 encodes table results. CRL is an early script of mine, and it's not setup to dig into a table result to get the text. It's a fix I can probably put in, but I'll need to refresh myself on the code.
Scott C. said: Unfortunately, this is because of how Roll20 encodes table results. CRL is an early script of mine, and it's not setup to dig into a table result to get the text. It's a fix I can probably put in, but I'll need to refresh myself on the code. Hey Scott, Thanks for the speedy reply! Is there an alternate solution I could use to trigger my sound effects in the jukebox if CRL doesn't work? I'd really like to automate it so it triggers when the rollable table provides the result.
If you are looking for another option, ScriptCards  can do this. Here is a script that will roll on a table and send that result to roll20AM !scriptcard {{ --/|Play random track from a rollable table --/|Mods Required: ScriptCards, Roll20 Audio Master --/|VARIABLES TO SET --&audioTableName|Travel-Dice --&silenceOutput|true --=AudioTrack|[T#[&audioTableName]] --@roll20AM|_audio,play,nomenu,single|[$AudioTrack.tableEntryText] --?"[&silenceOutput]" -eq "true"|[ --#hidecard|1 --]|[ --#title|Roll for Audio --+Now Playing|[$AudioTrack.tableEntryText] --]| }} You can toggle whether or not you want to display anything to chat with --&silenceOutput variable. But that should roll on the table and play the track rolled. You will need both ScriptCards and Roll20 Audio Master mods installed and everything setup as you described in your first post.
Joshua N. said: If you are looking for another option, ScriptCards  can do this. Here is a script that will roll on a table and send that result to roll20AM !scriptcard {{ --/|Play random track from a rollable table --/|Mods Required: ScriptCards, Roll20 Audio Master --/|VARIABLES TO SET --&audioTableName|Travel-Dice --&silenceOutput|true --=AudioTrack|[T#[&audioTableName]] --@roll20AM|_audio,play,nomenu,single|[$AudioTrack.tableEntryText] --?"[&silenceOutput]" -eq "true"|[ --#hidecard|1 --]|[ --#title|Roll for Audio --+Now Playing|[$AudioTrack.tableEntryText] --]| }} You can toggle whether or not you want to display anything to chat with --&silenceOutput variable. But that should roll on the table and play the track rolled. You will need both ScriptCards and Roll20 Audio Master mods installed and everything setup as you described in your first post. Wow - This is an awesome work around!  Thank you so much for the help. I'll probably stick to this unless there is an update to the CRL script.
1703784299

Edited 1703884477
timmaugh
Forum Champion
API Scripter
You might be able to use the metascript toolbox in a slight modification to your original command line. Change your Travel-Dice macro to be this, instead: ![[1t[Travel-Dice]]].value {&simple} That would require the ZeroFrame mod, which you can get separately or (preferably) as a part of the MetaScriptToolbox.
timmaugh said: You might be able to use the metascript toolbox in a slight modification to your original command line. Change your Travel-Dice macro to be this, instead: ![[1t[Travel-Dice]]].value That would require the ZeroFrame mod, which you can get separately or (preferably) as a part of the MetaScriptToolbox. I gave that a try after installing all the proper scripts, but it only seems to play the sound. It does not show the table result in the chat. Not sure why that is, but the Script Cards method is working well for me regardless.
1703884457
timmaugh
Forum Champion
API Scripter
Oh, sorry. Yes... to see the result would require a {&simple} added to the command. I know you have your working solution, but I'll amend the above for anyone else that happens upon this thread later.
No problem! Thanks for all of the help everyone!