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

Ammo tracking doesn't work in newer Foundry versions #185

Open
MajsterEmski opened this issue Sep 10, 2024 · 3 comments
Open

Ammo tracking doesn't work in newer Foundry versions #185

MajsterEmski opened this issue Sep 10, 2024 · 3 comments

Comments

@MajsterEmski
Copy link

In Foundry v.12, with ammo tracking enabled and an appropriate ammo item linked in the Violence tab, an error occurs: upon attacking, dice are rolled for hit (and damage in the case of a succesful hit, so underlying logic works fine), however, no Ranged Attack message is sent to the chat and linked ammo count is not reduced. The console logs the following error:
Error: You are accessing the MBItem "data" field of which was deprecated in v10 and replaced with "system". Continued usage of pre-v10 ".data" paths is no longer supported"
Everything works as intended when no ammo item is linked in the Violence tab — it's probably only the decrementWeaponAmmo function in attack.js that's affected.

@ElderRune75
Copy link

No result messages are showing in the chat when attacking with ranged weapons when "track ammo is turned on in Settings".
This goes for Bow, short bow and crossbow with bolts and arrow items as "ammo".
What can i do to make this work again?
Foundry VTT v.12 b.330
Mörk Borg Module v 4.0.1
The messages work with the "track ammo" turned off with "Hit automation" on and off.
As soon as the ranged weapon has a specific ammo-type selected or "track ammo" is selected in the settings - the messages stop working.
ammo

1/3 is attacking with no ammo selected and "Hit automation" turned off.
2/3 is selecting bolts-ammo for equipped crossbow and "Hit automation" turned off.
3/3 is attacking with bolts-ammo selected for equipped crossbow and "Hit automation" turned off.

@ElderRune75
Copy link

MajsterEmski did you get this fixed?

@MajsterEmski
Copy link
Author

No, sorry—I'm not sufficiently savvy when it comes to Foundry & JavaScript, yet. I might get to it once some life stuff gets sorted out. For the time being, I merely reported the bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants