fvtt-fria-ligan / twilight2000-foundry-vtt

Official Foundry VTT game system for the Twilight: 2000 (4th Edition) roleplaying game (Free League Publishing)
https://foundryvtt.com/packages/t2k4e
GNU General Public License v3.0
25 stars 9 forks source link

Add "data-item-id" data attribute in chat messages for rolled items for compatibility with Maestro and other modules #113

Closed Stefouch closed 4 months ago

Stefouch commented 2 years ago

Discussed in https://github.com/fvtt-fria-ligan/twilight2000-foundry-vtt/discussions/112

Originally posted by **FatherJ-ct** October 8, 2022 I was trying to get Maestro to work to play sounds for items when rolled. https://foundryvtt.com/packages/maestro Maestro Version 0.9.0 says it is compatible with Foundry v10 that I am using and the current t2k core system 2.0.0. Specifically setting a M4 gun burst sound for the M4 gun item so that when it is rolled it plays the sound. I was unable to get it to work. I tried disabling all other modules (leaving just the t2k core and maestro) and it still did not work. The gun sound plays fine from the playlists tab if played manually, the item (m4) has the sound assigned to it, but does not play when a successful hit is rolled. I also noticed that the Maestro option to disable the dice roll sound was not working either. The dice roll sound was still happening. t2k discord user, Daniel@Spelkult.se mentioned using it a YT video https://www.youtube.com/watch?v=z76QQLFu8pg&t=307s though he didn't show it making the sound on a roll. It is May 15 2022 vid so I believe he is on v9 for foundry on that vid. And I have heard that v10 was pretty big update and broke a lot of modules. Maestro's configure game settings for the module has an "Item ID attribute" prefilled with "data-item-id" and it says it is used to look for matching item id in chat messages. Maestro's change log specifically states " GAME SYSTEMS THAT DO NOT INCLUDE AN ITEM ID REFERENCE IN THEIR ITEM ROLL CHAT MESSAGES CANNOT BE USED WITH ITEM TRACKS" Does the T2k core use the that item id reference? Thanks and regards,
Stefouch commented 1 year ago

Solution proposed: https://github.com/death-save/maestro/issues/189

FatherJ-ct commented 12 months ago

I tried to set up this module again to use with T2k world and it still seems to be same issue. I see back in april you had recommended a code adjustment, the item-track.js is a bit different than your example (so updated since?). What can we set the item Id Attribute to? or do we need to manually alter the item-track.js code in the maestro module?

Stefouch commented 12 months ago

Hi @FatherJ-ct,

Unfortunately, supporting Maestro on my side requires too much work that I won't do for a module that seems dead (no update since >1 year, no compatibility with V11).

I proposed a very simple solution (just 1 line of code) to the dev of Maestro in https://github.com/death-save/maestro/issues/189