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

[BUG] Requests for rolls with PF2e lore skills give an error #540

Open
osmosis1671 opened this issue Nov 16, 2024 · 2 comments
Open

[BUG] Requests for rolls with PF2e lore skills give an error #540

osmosis1671 opened this issue Nov 16, 2024 · 2 comments

Comments

@osmosis1671
Copy link

Describe the bug
When I request skill rolls with Monk's Token Bar the core PF2e skills (e.g. Society) work correctly but the lore skills (e.g. Warfare Lore) do not.

To Reproduce
Steps to reproduce the behavior:

  1. Request a roll of a lore skill using the tokenbar.
  2. The request appears properly in chat
  3. Cursor over the gray dice in chat message and it changes to orange (expected)
  4. Click on gray dice to roll, nothing happens (see console log error code below).

Expected behavior
For a normal skill clicking on the gray dice in the chat message opens a dialog to roll the skill check.

Screenshots
nothing happens, so no useful screen shot, see console log

Please complete as much of the following information as possible:

  • Foundry VTT Server or Chrome 131.0.6778.69
  • Foundry Version 12 build 331
  • Pathfidner 2nd ed 6.6.2
  • Monk's TokenBar 12.04
  • I have tried deactivating all other modules and see the same behavior

Foundry VTT | Rendering SavingThrowApp
foundry.js:7845 Foundry VTT | Retrieved and compiled template ./modules/monks-tokenbar/templates/savingthrow.html
foundry.js:7845 Foundry VTT | Retrieved and compiled template ./modules/monks-tokenbar/templates/svgthrowchatmsg.html
monks-tokenbar.js:29 monks-tokenbar | create chat request
index.js:1 ChatTimestamp.addGameTimeToMessage
monks-tokenbar.js:29 monks-tokenbar | Rendering chat message ChatMessagePF2e {type: 'base', system: {…}, style: 0, timestamp: 1731784053778, #validationFailures: {…}, …}
pf2e-rolls.js:214 Uncaught (in promise) TypeError: undefined. Cannot read properties of undefined (reading 'check')
[Detected 1 package: monks-tokenbar(12.04)]
at PF2eRolls.roll (pf2e-rolls.js:214:45)
at SavingThrow._rollAbility (savingthrow.js:664:49)
at async Promise.all (index 0)

  • Are there any errors in the console [e.g. press F12 and look for red text]
  • Have you tried using Find the Culprit to make sure it isn't a module interaction.

Additional Context
The above console log was generated requesting a Warfare Lore check from a character with trained proficiency. I see the same behavior with other lore skill and other characters. All of the core skills and checks (e.g. perception or society) appear to work fine.

@kjhinds
Copy link

kjhinds commented Nov 26, 2024

I was able to resolve this by naming all my lore skills as “X Lore”

For example, “Engineering Lore” and “Music Lore”. It seems the code checks the skill, if it’s a lore then when it slugifies the lore name, it adds “-lore” to the end of it before it rolls the skill. So if the name in the character sheet is missing the “-lore” at the end of the name, it fails to find the appropriate skill to roll.

@osmosis1671
Copy link
Author

That does it, changed the names to add space "Lore" and they now work. Thank you.

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

2 participants