Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Loot Button on Enemy Tokens

I am trying to find out if anyone has a macro that i can change into a token action to roll loot from a rollable table. I want to connect my various tables to different monsters so i do not have to go hunting for them each time. Thanks for any help :)
Do you want a token action to only be listed on a specific token, or do you want the token action to pop up for all tokens? If you only want the token action to pop up for a specific token (or specific tokens), then you would have to put the macro on the related character sheets for those tokens. If you want the token action to pop up for all tokens, then you simply need to put it in your Collections Macros. To roll on a rollable table, you just need to use something like this: [[1t[TableName]]].  Replace the '1' with the number of times you want to roll on the table, and the 'TableName' with the name of the table. You can add additional features, such as: Putting '/w gm' at the beginning so that it is only whispered to yourself and not visible to players You can add a roll template, either the default that is available to all games, or any that are included with the character sheet that you are using for your game. Here's an example for D&D 5th Edition using the 'D&D 5E by Roll20' character sheet: /w gm &{template:npcaction} {{rname=Random Loot}} {{description=[[1t[LootTable]]]}} Since you have a Pro subscription and access to Mod scripts, and if you're playing D&D 5th Edition, you might be interested in this post .
1674343476

Edited 1674343625
What I like to do is create an attribute on the NPC called "reward" and then, using Jarren's example, would put the "description" contents into that attribute and then create a token action macro with the roll template stuff. Something like this: /w gm &{template:npcaction} {{rname=Random Loot}} {{description=@{selected|reward}}} This would make it so you only need one button and can define loot on a per NPC basis. If you want to go a step further, you can use the Recursive Table Mod script that will allow you to roll tables within tables. So I have setup, for example, the Individual-Treasure-CR-0-4 table from the DMG, which rolls a d100 and then rolls a random amount of currency based on the previous roll. It looks like this: Using an Orc as an example, their reward attribute would have the following: Hide Armor, a Greataxe, a Javelin and [[1t[Individual-Treasure-CR-0-4]]] And the roll template macro would look like this: !rt /w gm &{template:npcaction} {{rname=Random Loot}} {{description=@{selected|reward}}}