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

Create Recover Item Uses Macro #346

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

BadNerdCreating
Copy link

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.

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.
@AnthonyVadala AnthonyVadala self-requested a review November 10, 2024 16:39
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

Successfully merging this pull request may close these issues.

1 participant