Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module breaks PF2e system's chat card buttons #120

Open
Just-Finn opened this issue May 1, 2023 · 8 comments
Open

Module breaks PF2e system's chat card buttons #120

Just-Finn opened this issue May 1, 2023 · 8 comments

Comments

@Just-Finn
Copy link

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
Copy link

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
Copy link

ramonev commented May 21, 2023

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

@runaway-char
Copy link

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

megahead11 commented Jun 22, 2023

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
Copy link

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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants