Larkinabout / fvtt-token-action-hud-core

Token Action HUD is a repositionable HUD of actions for a selected token.
14 stars 21 forks source link

[BUG] Each element in an element is repeated 4 times #64

Closed cgplayer2000 closed 1 year ago

cgplayer2000 commented 1 year ago

image

image

I click on each of the categories. Whatever drops down is repeated 4 times, which gets pretty massive on the Conditions category. It happens with PCs or NPCs. I've tested it with my normal module load, and with only Token Action HUD Core and Token Action HUD 5e installed. The problem persists. I thought that this might have been directly related to https://github.com/Larkinabout/fvtt-token-action-hud-core/issues/66 but the difference is that I get multiples of everything in the HUD, not just the spells.

Versions:

I attempted to clear up the token with the macro from Larkinabout/fvtt-token-action-hud-core#66 but no joy. I uninstalled both modules and re-installed them. No change. But, as far as I can tell, it has only happened on actors that I had placed an item modified with Items with Spells 5e.

Larkinabout commented 1 year ago

I'm still investigating, but if you open up the dialog for the subcategory and click Accept, it should clear out the duplicates. You might not have seen any change after disabling modules, as once the duplicate actions are on the HUD, they will stay there unless manually removed.

cgplayer2000 commented 1 year ago

I'm still investigating, but if you open up the dialog for the subcategory and click Accept, it should clear out the duplicates. You might not have seen any change after disabling modules, as once the duplicate actions are on the HUD, they will stay there unless manually removed.

That worked perfectly. Thanks. I'm still curious what is going on with the interaction with 'Items with Spells 5e'.

That said, when I use a token's capabilities, such as Hunter's Mark, I see four copies of it in the HUD. Now that I know how to remove them, it's not a big deal, However, it does look like a somewhat persistent issue.

Larkinabout commented 1 year ago

I think I've discovered the cause: it's any process that adds multiple items in one go, or at least triggers multiple actor updates. Each one causes the HUD update to be triggered and as they're running almost concurrently, they're all adding the same actions to the HUD at once. I'll need to add some sort of check that waits for the very last iteration to finish before triggering a HUD update.

Larkinabout commented 1 year ago

Moving to the Token Action HUD Core repos as the issue needs to be resolved there.

Larkinabout commented 1 year ago

This should now be fixed in Token Action HUD Core 1.2.2. I'll leave this issue open for a little while for feedback.

Aragith commented 1 year ago

It looks like, so far, the element replication has been addressed. However, now I cannot seem to add a ranged option for thrown weapons.

Larkinabout commented 1 year ago

Fixed in Token Action HUD Core 1.3.0.