death-save / maestro

Audio-focused QOL module for Foundry Virtual Tabletop
GNU General Public License v3.0
18 stars 18 forks source link

Combat Tracks playlist not playing when combat begins #175

Open jshank opened 2 years ago

jshank commented 2 years ago

Describe the bug The combat playlist is not started when combat begins

To Reproduce Steps to reproduce the behavior:

  1. Install and enable Maestro
  2. In settings, Enable Combat Track and Create Combat Tracks Playlist
  3. Add music to now created Combat Tracks playlist
  4. Add tokens to combat
  5. Begin combat

Expected behavior Music from Combat Tracks playlist plays

Screenshots If applicable, add screenshots to help explain your problem. image

Foundry Setup (please complete the following information):

Additional context Confirmed that Hype tracks are working properly. I downgraded to 10.278 (listed compatible version) and disabled all other modules. I am running 5e but still no luck. No errors in the console. I did confirm the playlist plays correctly when I hit the play button.

jshank commented 2 years ago

I've been digging around the combat-track.js file and putting some console.log statements on there to see what's going on. It looks like we're not getting anything back from const flags = CombatTrack.getCombatFlags(combat);, thus this just returns

        if (!flags && !defaultPlaylist) {
            return;
        }

I threw a console.log(JSON.stringify(flags)); and the console shows the result as undefined.

I also checked the helper method and console.log(JSON.stringify(combat.flags[MAESTRO.MODULE_NAME])) also gets undefined

BernhardPosselt commented 2 years ago

Same issue here. Not compatible with v10 I suppose?

eclarke12 commented 2 years ago

@jshank @BernhardPosselt can you confirm you selected a Combat Track playlist in the Combat Tracker settings? Click the "gear" icon in the Combat Tracker, then the Music Note button in the header. Please note: as per issue #182 I will investigate defaulting the Combat Track playlist to the module-created playlist in the next update.

BernhardPosselt commented 2 years ago

Oh, that's how you configure it? I thought having the default Combat Tracks playlist would be enough and I completely glanced over the Music Note Icon. Works when configured that way.

Can we move that setting into the module settings perhaps?

eclarke12 commented 2 years ago

Oh, that's how you configure it? I thought having the default Combat Tracks playlist would be enough and I completely glanced over the Music Note Icon. Works when configured that way.

Can we move that setting into the module settings perhaps?

Will be addressed #182

jshank commented 2 years ago

It works. I completely missed gear - music icon setting in the combat tracker. Like @BernhardPosselt, I thought configuration in settings was enough. Seems like #182 will help.