combat-utility-belt
combat-utility-belt copied to clipboard
Award XP not working with PF2e
Hey there,
I have 0.8.9 installed and the latest version of CUB and award XP is no longer working with the following error in the inpsector:
give-xp.js:169 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'data')
at give-xp.js:169
at Array.reduce (
I tried this with all other modules disabled
Hey @geoidesic once you update to Foundry v9 please let me know if this continues to occur as I'm no longer working on 0.8.9 releases.
I'm not 100% sure it's the same issue, but it's similar enough that it might as well be a dupe (given how vague the original report was about resulting behavior, other than it didn't work. Maybe they changed a null to undefined in 0.8.9 and then renamed data to value in 0.9?). This seems the most relevant place to report it.
It seems to be showing players/monsters at the award xp screen like expected, but nothing really happens because it thinks all monsters are 0xp.
If I start a mock encounter, mark an enemy as defeated, end combat, and go to award xp, and then make sure both players and enemies were properly toggled, it shows 0xp total, and i click end combat, and then the encounter won't properly end. Then I see this in the console:
give-xp.js:169 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'value')
at give-xp.js:169:117
at Array.reduce (<anonymous>)
at GiveXP._distributeXP (give-xp.js:169:51)
at Object.callback (give-xp.js:87:44)
at Dialog.submit (foundry.js:44156:35)
at Dialog._onClickButton (foundry.js:44119:10)
at HTMLButtonElement.dispatch (jquery.min.js:2:43064)
at v.handle (jquery.min.js:2:41048)
Tested in a fresh Pathfinder 2E world with no other modules enabled and default settings except for ones related to awarding XP. Couldn't find a way to override the xp values (i.e. a text box, etc)
@dhorkin most likely the PF2e system changed where XP values are stored. I will review during the next CUB update.