League-of-Foundry-Developers / fvtt-module-theatre

GNU General Public License v3.0
30 stars 39 forks source link

Module breaks PF2e system's chat card buttons #120

Open Just-Finn opened 1 year ago

Just-Finn commented 1 year ago

Foundry Version 10 Build 291 PF2e Version 4.11.1 No other modules installed. No other systems tested.

When Theatre Inserts is active, PF2e's in-built chat card buttons no longer function (such as for rolling damage). The problem persists so long as Theatre Inserts was active when the chat card was created, even when disabled the chat card will remain broken. Likewise chat cards created before the module is activated will continue to work once the module is active.

AMERICAN-DM commented 1 year ago

Foundry Version 10 Build 291 PF2e Version 4.11.1 Many other modules installed (But have tested with no others on). Same issue as the person above, and it's a shame too my player LOVE this module.

ramonev commented 1 year ago

yes same Issue, after deactivating the PF2e Buttons work again.

runaway-char commented 1 year ago

I don't know if anyone is even still updating this, but in the off chance people are running into this issue, I've managed to fix it myself by going into the theatre_main.js file and removing line 225: "actor: null" I don't know if this breaks anything else, but the problem was that p2e relies on the actor data linked to the chat message to make the buttons work. I hope someone with better coding skills and experience can fix this for real.

I've got Theatre ignoring chat messages for now in settings, and primarily use it for presentation of NPCs, so ymmv.

farling42 commented 1 year ago

The fix needs to be made in theatre_main.js at line 232. In the hook for preCreateChatMessage, add one extra line after

    if (!Theatre.instance) return;

so that it looks like

    if (!Theatre.instance) return;
    if (chatMessage.rolls.length) return;

Additional optimisation is to remove the test for !chatMessage.rolls.length which occurs in each of the subsequent if statements.

megahead11 commented 1 year ago

The fix needs to be made in theatre_main.js at line 232. In the hook for preCreateChatMessage, add one extra line after

  if (!Theatre.instance) return;

so that it looks like

  if (!Theatre.instance) return;
  if (chatMessage.rolls.length) return;

Additional optimisation is to remove the test for !chatMessage.rolls.length which occurs in each of the subsequent if statements.

This appears to fix the issue. Woohoo! Thanks again!

megahead11 commented 1 year ago

It looks like some other systems break unless you do the fix for line 225. For example, the new crucible system occassionally has chat button issues. It seems like this is the case with 5e as well. I'll be pushing an update soon with the line 225 fix, but if runs into issues, I'll un-comment it.

blueyedjay1 commented 9 months ago

It looks like some other systems break unless you do the fix for line 225. For example, the new crucible system occassionally has chat button issues. It seems like this is the case with 5e as well. I'll be pushing an update soon with the line 225 fix, but if runs into issues, I'll un-comment it.

Any updates on this? Running into this issue at the moment, so I'm guessing it hasn't gone through yet.

megahead11 commented 9 months ago

It looks like some other systems break unless you do the fix for line 225. For example, the new crucible system occassionally has chat button issues. It seems like this is the case with 5e as well. I'll be pushing an update soon with the line 225 fix, but if runs into issues, I'll un-comment it.

Any updates on this? Running into this issue at the moment, so I'm guessing it hasn't gone through yet.

Are you on v2.8.0? If you are on forge, theres a chance it might not have pulled the updates.