You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I searched for existing Bug Reports and found no similar reports.
Expected Behavior
Encounter XP should be non-zero (affects both inline encounter builder and side panel)
Current behaviour
Encounter XP is missing, summarised as "Trivial"
Reproduction
Using a vault with Initiative Tracker set up (I found the bug using Pathfinder settings, but get the same with D&D settings)
Set a default party with at least two characters (alternatively, add the characters directly to the encounter)
Create an encounter with any number of enemies
View the encounter inline - XP is missing
Start the encounter - XP gauge is empty
Which Operating Systems are you using?
Android
iPhone/iPad
Linux
macOS
Windows
Obsidian Version Check
1.6.7 and 1.5.3
Plugin Version
13.0.12
Confirmation
I have disabled all other plugins and the issue still persists.
Possible solution
I debugged the plugin and found that the playerLevels parameter being passed to getCreatureDifficulty() in src/utils/rpg-system/pf2e.ts is an array of strings, so line 89 concatenates instead of adding, so after dividing by the number of PCs we get an invalid array index for return XP_CREATURE_DIFFERENCES[creature_differences] ?? 0;.
I made a quick fix to get it working for me (only for Pathfinder), but I think the root cause will be a change that's caused the playerLevels to be an array of strings, because I think this worked some time before. I haven't looked into where that array is coming from, or which version introduced the issue. Therefore I'm considering this commit a proof of concept rather than a pull request, though I might be able to investigate more later on.
The text was updated successfully, but these errors were encountered:
This bug is caused because one of my characters (and the first one alphabetically, so the most likely to be included when I tested it) had all the frontmatter in the PC's note defined as text instead of numbers as they should be. Fixing the note fixes the issue, but I'm trying out a patch to add parseInt() when reading the player's note to save anyone this trouble in future. It will only work when the note is parsed, so for existing characters you'll need to delete and recreate the character in the initiative tracker settings.
Check for existing bug reports before submitting.
Expected Behavior
Encounter XP should be non-zero (affects both inline encounter builder and side panel)
Current behaviour
Encounter XP is missing, summarised as "Trivial"
Reproduction
Which Operating Systems are you using?
Obsidian Version Check
1.6.7 and 1.5.3
Plugin Version
13.0.12
Confirmation
Possible solution
I debugged the plugin and found that the
playerLevels
parameter being passed togetCreatureDifficulty()
insrc/utils/rpg-system/pf2e.ts
is an array of strings, so line 89 concatenates instead of adding, so after dividing by the number of PCs we get an invalid array index forreturn XP_CREATURE_DIFFERENCES[creature_differences] ?? 0;
.I made a quick fix to get it working for me (only for Pathfinder), but I think the root cause will be a change that's caused the
playerLevels
to be an array of strings, because I think this worked some time before. I haven't looked into where that array is coming from, or which version introduced the issue. Therefore I'm considering this commit a proof of concept rather than a pull request, though I might be able to investigate more later on.The text was updated successfully, but these errors were encountered: