Skip to content

With pathbuilder characters, the party is duplicated each time an encounter is launched. #326

@aethertap

Description

@aethertap

Check for existing bug reports before submitting.

  • I searched for existing Bug Reports and found no similar reports.

Expected Behavior

This is an interaction between Fantasy Statblocks pathbuilder importer and this plugin, I wasn't sure which one to submit the report to but this is where the issue becomes visible so hopefully that's alright.

When I launch an encounter with characters imported from pathbuilder2e data, all of the party members are duplicated. I traced the code and found that the pathbuilder2e data doesn't include an id field, which I think causes Creature.from to use a freshly-generated one each time (Link to the line is below). Since the encounter creatures are filtered down by reinserting into a map keyed by id at tracker/stores/tracker.ts:785, the player characters get inserted again each time the encounter is launched.

].map((c) => [c.id, c])

return new Creature({

Current behaviour

Player characters are added multiple times when launching encounters if the source data doesn't include an id

Reproduction

  1. Create a character on pathbuilder2e.com
  2. Download the JSON data
  3. Import the character from the Fantasy Statblocks > Import Pathbuilder Data option
  4. Add the character to a party and make the party default
  5. Launch an encounter.
  6. Launch another encounter. The party will be duplicated in the encounter.

Which Operating Systems are you using?

  • Android
  • iPhone/iPad
  • Linux
  • macOS
  • Windows

Obsidian Version Check

1.8.10

Plugin Version

13.0.17

Confirmation

  • I have disabled all other plugins and the issue still persists.

Possible solution

I think the solution is probably to explicitly create a unique id in the Fantasty Statblocks pathbuilder2e importer, maybe by hashing the character data or absolute path to the JSON file or something? Alternatively, maybe add a field to the party builder to ask the user for a unique id like the form for a standard character does.

Here's an example of the character JSON from pathbuilder for convenience: circe-cailleach.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions