Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drawing a weapon with multiples (like a javelin) adds multiple buttons when PF2E Ranged Combat is enabled #67

Closed
tehguitarist opened this issue Feb 13, 2023 · 13 comments
Labels
bug Something isn't working
Milestone

Comments

@tehguitarist
Copy link

tehguitarist commented Feb 13, 2023

First off, I dig the customisability. Was there any refactoring for performance in there too out of curiosity?

Disovered this while playing around. To replicate, add a weapon (I had javelin which is pretty common to have multiples of, but daggers would be similar). Hit the draw button on the HUD.

Screenshot 2023-02-13 at 8 24 30 pm

Screenshot 2023-02-13 at 8 24 23 pm

@Larkinabout
Copy link
Owner

That's an interesting interaction. Can you export and send me the actor with the multiple javelins please? I've added a bunch of javelins to an actor, but I only ever get one javelin, which admittedly isn't great for dual wielders.

@tehguitarist
Copy link
Author

Hmm odd. It's the Amiri actor from the Iconics compendium that comes with the system. I'll upload here too. Admittedly, I'm not running a clean world. I only just thought of that.

Happy to add a separate issue to track the number of buttons per row issue too if that's easier.

fvtt-Actor-amiri-(level-1).json.zip

@tehguitarist
Copy link
Author

Just found the interaction. PF2E Ranged Combat module is the culprit for the weird interaction.

@roi007leaf
Copy link

roi007leaf commented Feb 13, 2023

Heres another interesting one, two weapons, differnt names, but for some reason the HUD shows them as one(using the weapon id perhaps?) happens with ranged combat module, also happens without the module
image
image

@tehguitarist tehguitarist changed the title Drawing a weapon with multiples (like a javelin) adds multiple buttons & Inconsistency on number of buttons. Drawing a weapon with multiples (like a javelin) adds multiple buttons when PF2E Ranged Combat is enabled Feb 13, 2023
@Larkinabout
Copy link
Owner

Heres another interesting one, two weapons, different names, but for some reason the HUD shows them as one(using the weapon id perhaps?) happens with ranged combat module, also happens without the module

It uses the slug currently, which I suspect is the same for these two items? Perhaps that happens when an item is added to an actor and then renamed. I should be able to change it to the name instead without too much issue. It can't use the item id as otherwise the GM's HUD gets filled up with empty groups of weapons for every monster they've clicked on.

@roi007leaf
Copy link

Heres another interesting one, two weapons, different names, but for some reason the HUD shows them as one(using the weapon id perhaps?) happens with ranged combat module, also happens without the module

It uses the slug currently, which I suspect is the same for these two items? Perhaps that happens when an item is added to an actor and then renamed. I should be able to change it to the name instead without too much issue. It can't use the item id as otherwise the GM's HUD gets filled up with empty groups of weapons for every monster they've clicked on.

changing to name will help a lot

@Larkinabout
Copy link
Owner

Larkinabout commented Feb 20, 2023

Moving to Token Action HUD Core as duplication issue will need to be resolved there.

@Larkinabout Larkinabout transferred this issue from Larkinabout/fvtt-token-action-hud-pf2e Feb 20, 2023
Larkinabout added a commit that referenced this issue Feb 20, 2023
- #64. #65, #67: Add timer and flags to avoid HUD updating multiple
  times at once and creating duplicate actions.
@Larkinabout
Copy link
Owner

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.

@tehguitarist
Copy link
Author

Actions list is now fixed (I did need to draw one first to make it go down to one instead of three). But I'm currently seeing more javelins than there should be in the inventory (3 in inventory, 6 show up in the HUD).
Screenshot 2023-02-21 at 5 18 20 pm

@Larkinabout
Copy link
Owner

Larkinabout commented Feb 21, 2023

Were those duplicate javelins there before you updated to 1.2.2? If so, you'll probably need to open up the dialog for the Weapons subcategory and click Accept. I haven't added anything to the code to remove previously duplicated items.

@tehguitarist
Copy link
Author

Alrighty, yeah they were all there before. I only tried making a new token from the actor. I made a new actor from the compendium and all looks ok. Also confirmed that opening the subcategory cleared things out.

Not an urgent one, but maybe a refresh button could be a good thing for these situations? Though I suppose once the bugs are fixed, it only really affects old tokens.

@Larkinabout
Copy link
Owner

There is a function to reset actor flags where all the action data is held, but it's an all or nothing currently: game.tokenActionHud.resetActorFlags(). I'll probably add a button to the main dialog to allow users to run that function for the selected token.

@Larkinabout Larkinabout added the bug Something isn't working label Apr 6, 2023
@Larkinabout Larkinabout added this to the 1.3.0 milestone Apr 6, 2023
@Larkinabout
Copy link
Owner

Fixed in Token Action HUD Core 1.3.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants