Thanks! Is there any way to set that as a default option on playing tracks? I couldn't find it in the configuration.
Thanks! Is there any way to set that as a default option on playing tracks? I couldn't find it in the configuration.
So I had this on a previous campaign for about a year, but when I load it into my current campaign I cannot get anything to play as a macro. I'm wanting a pretty simple use case: click a general macro reading:
!roll20AM --play|XP
Which would play the song XP once as it was set in jukebox to not repeat. I've set things up pretty much the same on a new campaign, and I guess the coding has been updated to:
!roll20AM --audio,play|XP
But nothing plays. What am I doing wrong here?
The option doesn't appear to be working in the config. I click it and it breaks my api. It looks like this and AuraHealth have some conflicts, so that's probably the root of the issue.
Going to stick with Aurahealth as it provides a bit more of what I need for this campaign, thank you for responding to promptly! I really appreciate it!
Victor, since the import step takes no real time to do, should it be triggered upon spinup of the sandbox (if possible)? That won't help as people add to the Jukebox during a session, but it will ensure that a first-time run of the script commands won't fail.
My guess is that adding a track to the Jukebox is not an action that the API can be aware of?
If you wish @encartrus, please invite me to game and promote me to GM so I can take a look why it's breaking. Are you running 2.10? It fixed a nasty issue with duplicate tracks.
@keithcurtis, I'm not triggering an auto-import thought I could. It's made to be incremental so I will only add new tracks if existing are already found. I'll consider that for next release.
2.11 Deployed. Pick it up here or wait until next Tuesday for Github. https://gist.github.com/vicberg/6635c77f7f730529ccf83f64819297c0
Fixes another nasty bug (thanks encartrus) where launching tracks directly against jukebox was triggering roll20AM upon track completion and roll20AM was getting very very confused.
@kiethcurtis, yes, there are triggers on adding and deleting tracks against Jukebox. The issue I found is that these triggers were getting invoked when they shouldn't have, so I disabled them. I'll revisit that functionality.
Is there anyway to list tracks for players? The only way I can see the list is through the config menu which is GM only.
That's great. Even if I could somehow give players access to the config menus and then later take it away if need be.
I want to give one player in my group access to the music.
Update: on the output config of the script, i just changed the "
/w gm" to "/w 'character name'" and also gave myself control of his character. This way it seems to send the config menus to both of us.
I'm working on adding something that enables you to allow one or all players to view menus. GM will always see the menus. I'm going to integrate it so that you can use the access at the playlist/track level in addition, so you can grant privileges for a player to view all menus and then control which playlists/tracks they can use.
Today Roll20AM suddenly stopped responding. It was giving error messages for a while but after disabling/reenabling/restarting/removing/readding, the API has stopped responding. I'm not sure what's going on with it.
Latest Version
Message:
Invalid Roll20AM Command. Valid commands are --audio, --edit, --config
when I try to do !roll20AM --play
Not sure if this is related:
TypeError: Cannot set property 'playing' of undefined
TypeError: Cannot set property 'playing' of undefined
at changeHandler (apiscript.js:7381:38)
at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:151:1), <anonymous>:65:16)
at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:151:1), <anonymous>:70:8)
at TrackedObj.set (/home/node/d20-api-server/api.js:1028:14)
at updateLocalCache (/home/node/d20-api-server/api.js:1318:18)
at /home/node/d20-api-server/api.js:1530:7
at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560
at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147)
at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546)
at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489)
at Rd.Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425)
You have two choices:
1) Go to github and get version 1.05 and create a new audio script, save the source (make sure to click RAW in github before copying the code) and it will work for you again,
2) Roll20AM has been upgraded to 2.11. Get that version here https://gist.github.com/vicberg/6635c77f7f730529ccf83f64819297c0, but you need to change your commands to
!roll20AM --audio,play,nomenu|<track>
If you choose to upgrade, you'll need to bring up the config menu !roll20AM --config. Then click remove all followed by clicking import jukebox. This will set you up.
Ah, thanks. I hadn't realized it was upgraded and was looking this up while in the middle of a session. Much appreciated for the help, Victor, B! :D
Heya, Victor. As I'm working on updating all script calls among my characters (and my NPCs, and my fellow players' PCs-- O! the curse of being the technically-minded one!), I'm not re-finding a small (but important to me) piece of functionality in your redesign of R20AM:
Play mode single isn't quite what I want since it plays each track in sequence. And random's looping-until-stopped behavior won't work as one line among many in a token action button.
Is the functionality there, and I'm just missing it? If not, would you please consider adding its return to your development roadmap?
No functionality isn't there yet. Random play continues to play tracks randomly until the playlist is stopped or faded out,. A random, single is additional functionality. You're the second person requesting this, so I'll put this into the next release.
Hello Victor,
Thanks for your work. I had a question about a set of macros I am trying to make.
Disclaimer: I am in no way good at coding. I take others ideas from around the forums and try to implement them into my game, and tweak variables until they work for me. I am having some difficulties setting up macros for playing music off of tokens.
I have:
▶️ " !roll20AM --audio,play|@{selected|token_name} " This allows me to name a token after a jukebox track, and after importing it into the jukebox I can run this macro with the token selected and the song plays. An example of my usage is for the Theme at the beginning of my games. One and done.
⏹️ " !roll20AM --audio,stop|@{selected|token_name} " This allows me to do the opposite, clicking on the token and stopping the track after activating the macro.
The problem child is:
" !roll20AM --audio,play,loop,|@{selected|token_name} " The intention of this one is to allow me to run combat music with a click, and to not have to worry about it until combat is over, where I hit the stop button. However, it doesn't function at all how i'd like. The "loop" action/variable seems to have no affect on whether or not it loops. I noticed that I have to manually open the config and hit the playmode button to set the track to loop for this to work properly. But then, on the flip side, when I hit the "play" macro on a song I want to play once on this occasion but also looped for others, the song will loop, even when not specified to in the macro.
Your script is amazing, and has been very fun to use. I understand that this is a very specific and somewhat redundant thing I'm asking for, and I apologize ahead of time if this just isn't the functionality that can be offered. Like I said, I am no good at coding. As far as I know, everything I've done is write in the code, and I'm just wondering if it's on my end or Roll20's limitations.
Thanks again,
-Jared
There's a syntax error in your looping macro which might be causing your problem. You have an extra comma after the loop command word. Try:
!roll20AM --audio,play,loop|@{selected|token_name}
Victor's answer is better. As in, correct.
Loop, single have been taken out of the audio commands and moved to edit, so you edit it once (either via command or via menu) and you don't need to worry about it again. Set the TRACK to loop (it defaults to single) and when you launch the track it will continuously loop until you stop it or fade it out.
I'm honestly not clear on what you're asking. There are times you want the same track to run once and others you want to run in loop mode?
You can modify track (or playlist) behavior by placing an edit command before the audio.
!roll20AM --edit,mode,single(or loop)|@{selected|token_name} --audio,play|@{selected|token_name}
If you are launching a track via macro, add nomenu to it so the menu display is suppressed. It will display another menu when track stops to show the track as being stopped.
!roll20AM --audio,play,nomenu|@{selected|token_name}
Hi everybody,
After one of the tecent changes I have a problem with achieving my goal.
I would like to have ability to use macro to play some fx sound i.e. shotgun blast while playing background musi.. Both sounds should be played laterally/simultanously. It was feasible previously, so I hope that it is possible after recent realease but I cannot find solution.
Regards
Sylwester
Mulltiple sounds play simultaneously. Launch the background music !roll20AM --audio,play|<background music>, launch the fx !roll20AM --audio,play|<fx>, ORr launch both at same time !roll20AM --audio,play,nomenu|<background music>,<fx> OR launch the fx and a playlist of background music !roll20AM --audio,play,nomenu|<fx>,<playlist
There's two new pieces being worked on
Access to Roll20AM and Random Single Mode
Menus may be viewed by: GM (Only), All (all players), Individual Player (drop list list of players to choose from).
Access: None (no player access to tracks or playlists), Full (full access to tracks or playlists), Limited (GM has to go through tracks and playlists and click the padlock icon in order to enable access)
Random Playlist Mode
Random Loop !roll20AM --edit,mode,random,loop|<playlist> or comma separated lists of playlists, plays tracks randomly (may play same track twice) until playlist is stopped
Random Single !roll20AM --edit,mode,random,single|<playlist> or comma separated lists of playlists, plays a single track randomly and then stops
Victor B. said:
Mulltiple sounds play simultaneously. Launch the background music !roll20AM --audio,play|<background music>, launch the fx !roll20AM --audio,play|<fx>, ORr launch both at same time !roll20AM --audio,play,nomenu|<background music>,<fx> OR launch the fx and a playlist of background music !roll20AM --audio,play,nomenu|<fx>,<playlist
Dear Victor,
I use following syntax "/w gm !roll20AM --audio,play|Thunder" and nothing happens. Before recent changes it was working. Is any ediional step required? The track was added to the Jukebox manually.
the "/w gm" is not needed. By default, lines beginning with "!" (API scripts, mostly) do not echo to chat.
keithcurtis said:
the "/w gm" is not needed. By default, lines beginning with "!" (API scripts, mostly) do not echo to chat.
Thanks, didn't know that although removing that part doesn't solve the problem.
I see that you "added to the jukebox manually". You'll need to run config, click remove all, then re-import the jukebox. This is necessary upon adding or deleting tracks from the jukebox.
I have been following this script thread for quite some time but I have not gotten around to trying it yet. It looks like an amazing script!
I'm wondering if what I'd like to do can be accomplished;
I'd like to be able to pause a background music playlist (looping) while I play a battle track or playlist (looping) and then resume after stopping the battle music.
It (pausing) doesn't appear to be a function of the script - it certainly isn't a function of Roll20's jukebox. Is there a workaround someone could recommend?
Doug,
I'm afraid pause isn't a possibility. There's no "progress" within Jukebox. There's no way to know out of Jukebox where you are at within the Track. If this was possible (such as Jukebox showing that the track has played to the 48.05% mark) pause would be possible, unfortunately it isn't.
The only thing I could recommend is that you set the Background Playlist to Loop. Fade out the Background Playlist (it knows which tracks have played and which haven't). Fade in your battle music at the same time. Then do the opposite upon completion of the battle and the background playlist will start up with the next track in the list.
Sylwester, easiest way to resolve this is that you invite me to your game and then promote me to GM so I can look at what's going on.
Victor B. said:
Doug,
I'm afraid pause isn't a possibility. There's no "progress" within Jukebox. There's no way to know out of Jukebox where you are at within the Track. If this was possible (such as Jukebox showing that the track has played to the 48.05% mark) pause would be possible, unfortunately it isn't.
The only thing I could recommend is that you set the Background Playlist to Loop. Fade out the Background Playlist (it knows which tracks have played and which haven't). Fade in your battle music at the same time. Then do the opposite upon completion of the battle and the background playlist will start up with the next track in the list.
Actually, that would be awesome. I don't need to pause within the track to play the battle music, coming back to the next track in the background playlist is all I need. (I have long background playlists and usually the later tracks never get played 'cuz I have to start over).
Thank you!
Two other options for your playlists: Random (which if you have a lot of tracks in the playlist means you'll never know what you get but you can get the same track twice) or Shuffled (shuffles in a random order and then plays from beginning to end based on that shuffled order). Nice when you don't want the same songs playing all the time but don't have enough tracks for random play.
@Sylwester, I might know the cause of your issue.
When I display the tracks in the menus, I cut out everything after the 'by' in order to save space. So Combat Drums by Byrn is displayed as Combat Drums within Roll20AM.
Make sure you put the full name of the track into audio,play!<track name>
Victor B. said:
Sylwester, easiest way to resolve this is that you invite me to your game and then promote me to GM so I can look at what's going on.
Hi Victor,
I've just send you and invitation to my game.
Victor B. said:
@Sylwester, I might know the cause of your issue.
When I display the tracks in the menus, I cut out everything after the 'by' in order to save space. So Combat Drums by Byrn is displayed as Combat Drums within Roll20AM.
Make sure you put the full name of the track into audio,play!<track name>
I thnk that could be reason - I also shorten the track names in Jukebox.
If it won't help I will check also solution given by keithcurtis.
So, I found something that causes a script error...
If you change the name of a playlist in the Jukebox, it has no effect on roll20AM, so the playlist(s) still show(s) up. If you then attempt to delete the playlist in the API, it returns an invalid value (null pointer?) and crashes the sandbox.
Is there a way without "Remove All" and "Import Jukebox" to get rid of the null list? There are quite a few tracks I'd have to reconfigure to be playable by players and other things I might not even remember them all?
Also, when you set a Playlist to be usable by players, does it make everything in that playlist usable or do the tracks need that flag set individually?
For example, if you have a weapon play a --audio,play,nomenu|<SwordsPlaylist> of sounds from the character sheet does it know that the tracks within that Playlist are to be accessed by the sheet when the player clicks on that attack, or does each track then subsequently need to be set?
1) Once the playlist is imported into Roll20AM it's entirely separate from the Jukebox playlist. So deleting the playlist out of Roll20AM should have absolutely nothing to do with the playlist name in Jukebox. I'll see if I can recreate that problem
2) There shouldn't be a null list in Roll20AM unless there is a problem with the delete playlist functionality. However, setting things at the playlist level updates all tracks in that playlist. So unlock the playlist and all the tracks in that playlist get unlocked. That's a quick way to manage player access without having to click on each track.
Victor B. said:
1) Once the playlist is imported into Roll20AM it's entirely separate from the Jukebox playlist. So deleting the playlist out of Roll20AM should have absolutely nothing to do with the playlist name in Jukebox. I'll see if I can recreate that problem
Steps to recreate:
Create New Playlist in Jukebox
Move all tracks from one playlist to New also in Jukebox
Delete playlist from *Jukebox
List Playlists in Roll20AM in the chat window
Old Playlist still exists, so delete it - not so fast sparky!
Crash sandbox, profit? XD
2) There shouldn't be a null list in Roll20AM unless there is a problem with the delete playlist functionality. However, setting things at the playlist level updates all tracks in that playlist. So unlock the playlist and all the tracks in that playlist get unlocked. That's a quick way to manage player access without having to click on each track.
I tried that but it didn't do much of anything as far as accessing the individual tracks. I still had to go in and individually Unlock each track, if I wanted the players to be able to play them from using an action that utilized the calls I embedded on the "freeform" of their character sheet(s).
Also, FYI, I updated the script using the RAW earlier today, if that makes a difference?
**EDIT** Removing All and Import Jukebox worked to resolve the issue with the broken Playlist but I did have to re-unlock tracks individually.
Nope nada to do with Jukebox. I just tried deleting one of my playlists (that completely match Jukebox) and it failed. So it's a bug in the playlist delete logic. Working fixing that right now.
The next release is coming today or tomorrow, one final piece to test. This will be version 2.200
- Ability to give full or limited control over to a player
- Ability to turn off menu display from the config menu so you don't have to add nomenu to macro/templates
- Unlocking a playlist unlocks all tracks assigned to playlist (thanks Ascendant Madness)
- Fixed a bug in the delete playlist logic (also thanks Ascendant Madness)