WBHarry / pf2e-bestiary-tracking

A Foundry VTT Module to let players keep track monster information and statistics for the PF2E system
MIT License
5 stars 4 forks source link

[Bug] Entry duplication #119

Closed Byakkl closed 1 month ago

Byakkl commented 1 month ago

Using the automatic registration or the actor sheet button will add a new entry for a creature if it isn't the same token/actor. Entries are being added per token/actor instead of being based on the compendium source. Eg having 3 Water Mephits in the encounter will result in 3 separate Water Mephit entries in the bestiary. This also means that I can't use the double click shortcuts on different instances if only one has been added to the bestiary as one will exist and the others will be missing

Foundry v12.331 PF2E BT v1.1.2

WBHarry commented 1 month ago

The only way you get duplicates is if you have created multiple different actors from the same compendium source, and in that instance it is completly intended behavior to creature multiple entries.

When you drag a Compendium actor into the world it creates a new Actor in the world and it is completly distinct from the compendium source at that point. It can be modified in any way, as can other copies of that compendium actor. Therefore they cannot logically be linked since they can be different.

If you're having 3 water mephit's in a combat, then you would just drag out a water memphit actor into your world - then from the Actor's menu drag out more of it. All will be linked to the same Bestiary entry.

https://github.com/user-attachments/assets/e7f473fe-3d0e-4152-ae07-3e6cd9413816

Dragging a compendium actor directly into the Bestiary will also creature a new actor in the world, linking that to the Bestiary.

Byakkl commented 1 month ago

Ahh, I see. That's my fault for not creating an actor from the compendium first and referencing that. I've followed what you've done in the video and the combat entry creation and double click to open works as expected, though the sheet button for unlinked tokens created from the actor do still prompt for a new entry

WBHarry commented 1 month ago

Ah, I see. Yup, that is a bug. I'll fix that 😄

WBHarry commented 1 month ago

I went ahead and released v1.1.3 which includes the bugfix 🤖 👍