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

Help for Dummies: FFG Star Wars Sheets: Playing a Sound with a Roll

OK... a little help needed for a non computer programmer.   I am a GM for an FFG Star Wars game.  I use the FFG Star Wars API and I recently (this morning) added the Roll 20 Audio Master API, b/c I THINK it might be part of the solution. What I WANT to do: play a specific sound from my downloaded Jukebox songs when a player hits the "roll" button for a particular weapon.   The way it works now, a player declares he is going to fire his blaster... I frantically scramble through my sound files... and I hopefully find the right file and hit PLAY about the time he rolls... or soon thereafter.   I would rather it play INSTANTLY when the PLAYER rolls the dice. There has GOT to be a way to make this work.  I THINK it might be thru typing in macro code in a field within the specific weapon on the character sheet. HELP ME ROLL20 DEVS - YOU'RE MY ONLY HOPE  :-) - GM Khyrith
1484414428

Edited 1484414499
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Hi Khyrith, Roll20AM can definitely help you accomplish what you want to do. I'm not familiar with the details of the Star Wars FFG sheet, but you'll want to add the following api command to the end of your attack macros: !roll20AM --play|Track or playlist name|Track2 or playlist2 name There are some additional options that can be tacked onto that command. See the  Roll20AM forum post for all the command syntax. Of special note, you'll want to tag the tracks that you want your players' actions to play as player accessible by adding "-players-" to the end of the track name; you will not write the players tag in when you call a track with a roll20AM command line. Let me know if you have specific questions, Scott
Scott C - Thanks.  Think I'm still missing something.  Trying to make the sound effect a token action.   I'm using a track from Fanburst called "Blaster Sniper by RevanMJRoll20" Here's what I've done: 1. "Added" a rollable token action on the Char Sheet (the token is linked) 2. Renamed the track "Blaster Sniper -players-" in my Jukebox.  Its NOT in a playlist folder (does that add MORE syntax if it is?) 3. Used this syntax in the token action: "!roll20AM --play|Blaster Sniper" 4. So, when I (or the player) clicks on token, I see the token action appear as a button. BUT... I've hit that button... and the "d20" button in the macro on the char sheet... and its not playing. I REALLY want to embed this inside the weapon's category on the spreadsheet... but I'll settle for a token action in the meantime!  
1484417360
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
You did everything right, which made me go back and check the code. I made a small error in the code; it doesn't account for the potential for space between the track name and the "-players-" tag. I'll get an update pushed to the repository this weekend to handle that; in the meantime change your track name to "Blaster Sniper-players-" and it should work fine. I also wanted to note that you could use another of my scripts,  Customizable Roll Listener , to "attach" the roll20AM command to your players' weapon macros without needing to go in and edit every one (or if the macros are embedded in the sheet and not editable by you). Take a look at the documentation and let me know if you've got any questions on it.
Worked like a charm for the token action!   We roll off the char sheet (its another Roll20 API script), so I guess I need to maybe ask that scripter how to embed the Audio Master macro inside the char sheet.   
Aaaaaaaand, it just stopped working.   But I'm also unable to manually play ALOT of sounds... might be a Jukebox problem.
1484418976

Edited 1484419088
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
For the embedding, take a look at using CRL, I made it so you can define reactions to chat messages. For instance, if you had a roll macro that was: Attacks with his Blaster /r 1d20+8 You could tell CRL to listen for the text "Attacks with his Blaster" and trigger the command "!roll20AM --play|Blaster Sniper" every time that exact string appears in chat. EDIT: It can also look for specific roll templates and only trigger when it finds the text in a message using the specified roll template. Can also listen for Rolls or specific types of roll results (success, fail, Crit, Fumble) and only trigger the command when the text and roll match.
1484420273

Edited 1484420290
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Also, is this sort of what you're experiencing? for the no longer playing.