Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I made a new item feature and added the macro action. That makes it so that when you drop the new feature item on a token it becomes available through the module Token Action HUD D&D 5e. This should work the same with any module you use that displays token feature abilities. The macro just references the token and the item. It also works as a standalone macro; the roll just happens automatically and isn’t displayed in chat. Simply select the token with the item you made the macro update and click the macro.
This macro finds the item in a tokens inventory and then updates the items uses based on the roll and skill/attribute you pick. I made a custom weapon (Throwing Cards) with 52 uses (the number of cards in a deck) and then made a feature that runs this macro. I added the perception bonus because it’s flavored like the player has looked around and found undamaged cards to put back in the deck.
This macro needs some personalization for it to be usable. You need to update the name of the item, max uses, what roll you want to happen, and what skill or ability you want to add. All of that can be customized. You can remove the parts about adding the skill or ability. The most important part is to make sure the array for const config is correct. You’ll need to export the json file for the item you want to reference. Right click on the item and select export data and open the file with any writing program. I recommend using Notepad++ because it will display the code properly and it’s easier to see the details for the array. From there you simply define what path the macro needs to take to find the uses / charges / whatever you want to update.