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

Skill query macro for players using DnD 5e character sheet

1590667888

Edited 1590868063
****EDIT*** Some things were wrong in the original macro, so I corrected it. Just to be clear, this macro is intended FOR PLAYERS, not for NPCs. I made an other one for monsters and NPCs, here is the link to it : <a href="https://app.roll20.net/forum/post/8747010/slug%7D" rel="nofollow">https://app.roll20.net/forum/post/8747010/slug%7D</a> You have to consider that I create every player character from a template with all the macros they need. This is with the 5e DnD sheet. Special thanks to Oosh for suggesting the corrections and Scott M. for spotting errors. : @{selected|wtype}&amp;{template:npc} @{selected|rtype}+?{Skills|Acrobatics,[[@{selected|acrobatics_bonus}]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+@{selected|acrobatics_bonus}]]&amp;#125;&amp;#125;{{rname=Acrobatics Check&amp;#125;&amp;#125;{{name=@{selected|character_name}&amp;#125;&amp;#125;{{type=Roll&amp;#125;&amp;#125; |Animal Handling,[[@{selected|animal_handling_bonus}]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+@{selected|animal_handling_bonus}]]&amp;#125;&amp;#125;{{rname=Animal Handling Check&amp;#125;&amp;#125;{{name=@{selected|character_name}&amp;#125;&amp;#125; {{type=Roll&amp;#125;&amp;#125; |Arcana,[[@{selected|arcana_bonus}]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+@{selected|arcana_bonus}]]&amp;#125;&amp;#125;{{rname=Arcana Check&amp;#125;&amp;#125;{{name=@{selected|character_name}&amp;#125;&amp;#125; {{type=Roll&amp;#125;&amp;#125; |Athletics,[[@{selected|athletics_bonus}]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+@{selected|athletics_bonus}]]&amp;#125;&amp;#125;{{rname=Athletics Check&amp;#125;&amp;#125;{{name=@{selected|character_name}&amp;#125;&amp;#125; {{type=Roll&amp;#125;&amp;#125; |Deception,[[@{selected|deception_bonus}]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+@{selected|deception_bonus}]]&amp;#125;&amp;#125;{{rname=Deception Check&amp;#125;&amp;#125;{{name=@{selected|character_name}&amp;#125;&amp;#125; {{type=Roll&amp;#125;&amp;#125; |History,[[@{selected|history_bonus}]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+@{selected|history_bonus}]]&amp;#125;&amp;#125;{{rname=History Check&amp;#125;&amp;#125;{{name=@{selected|character_name}&amp;#125;&amp;#125; {{type=Roll&amp;#125;&amp;#125; |Insight,[[@{selected|insight_bonus}]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+@{selected|insight_bonus}]]&amp;#125;&amp;#125;{{rname=Insight Check&amp;#125;&amp;#125;{{name=@{selected|character_name}&amp;#125;&amp;#125; {{type=Roll&amp;#125;&amp;#125; |Intimidation,[[@{selected|intimidation_bonus}]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+@{selected|intimidation_bonus}]]&amp;#125;&amp;#125;{{rname=Intimidation Check&amp;#125;&amp;#125;{{name=@{selected|character_name}&amp;#125;&amp;#125; {{type=Roll&amp;#125;&amp;#125; |Investigation,[[@{selected|investigation_bonus}]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+@{selected|investigation_bonus}]]&amp;#125;&amp;#125;{{rname=Investigation Check&amp;#125;&amp;#125;{{name=@{selected|character_name}&amp;#125;&amp;#125; {{type=Roll&amp;#125;&amp;#125; |Medicine,[[@{selected|medicine_bonus}]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+@{selected|medicine_bonus}]]&amp;#125;&amp;#125;{{rname=Medicine Check&amp;#125;&amp;#125;{{name=@{selected|character_name}&amp;#125;&amp;#125; {{type=Roll&amp;#125;&amp;#125; |Nature,[[@{selected|nature_bonus}]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+@{selected|nature_bonus}]]&amp;#125;&amp;#125;{{rname=Nature Check&amp;#125;&amp;#125;{{name=@{selected|character_name}&amp;#125;&amp;#125; {{type=Roll&amp;#125;&amp;#125; |Perception,[[@{selected|perception_bonus}]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+@{selected|perception_bonus}]]&amp;#125;&amp;#125;{{rname=Perception Check&amp;#125;&amp;#125;{{name=@{selected|character_name}&amp;#125;&amp;#125; {{type=Roll&amp;#125;&amp;#125; |Performance,[[@{selected|performance_bonus}]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+@{selected|performance_bonus}]]&amp;#125;&amp;#125;{{rname=Performance Check&amp;#125;&amp;#125;{{name=@{selected|character_name}&amp;#125;&amp;#125; {{type=Roll&amp;#125;&amp;#125; |Persuasion,[[@{selected|persuasion_bonus}]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+@{selected|persuasion_bonus}]]&amp;#125;&amp;#125;{{rname=Persuasion Check&amp;#125;&amp;#125;{{name=@{selected|character_name}&amp;#125;&amp;#125; {{type=Roll&amp;#125;&amp;#125; |Religion,[[@{selected|religion_bonus}]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+@{selected|religion_bonus}]]&amp;#125;&amp;#125;{{rname=Religion Check&amp;#125;&amp;#125;{{name=@{selected|character_name}&amp;#125;&amp;#125; {{type=Roll&amp;#125;&amp;#125; |Sleight Of Hand,[[@{selected|sleight_of_hand_bonus}]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+@{selected|sleight_of_hand_bonus}]]&amp;#125;&amp;#125;{{rname=Sleight Of Hand Check&amp;#125;&amp;#125;{{name=@{selected|character_name}&amp;#125;&amp;#125; {{type=Roll&amp;#125;&amp;#125; |Stealth,[[@{selected|stealth_bonus}]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+@{selected|stealth_bonus}]]&amp;#125;&amp;#125;{{rname=Stealth Check&amp;#125;&amp;#125;{{name=@{selected|character_name}&amp;#125;&amp;#125; {{type=Roll&amp;#125;&amp;#125; |Survival,[[@{selected|survival_bonus}]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+@{selected|survival_bonus}]]&amp;#125;&amp;#125;{{rname=Survival Check&amp;#125;&amp;#125;{{name=@{selected|character_name}&amp;#125;&amp;#125; {{type=Roll&amp;#125;&amp;#125;}
Just tried this and got a `TypeError: c is undefined` error. :( Anyone have luck?
1590797964

Edited 1590798043
Oosh
Sheet Author
API Scripter
The @{character_name} calls are all missing the selected| You can use it as is, pasting it into every single character sheet under Abilities (which seems to be how Ozzy uses it), in which case it doesn't really need the selected| under all the other template fields. A better way would be to use Notepad or something to replace all instances of "character" with "selected|character". So the second last template field under each skill should be: {{name=@{ selected| character_name}&amp;#125;&amp;#125; It will then work as a universal macro for whatever token you have selected, either saved under a macro mule and on the main macro bar, or saved in Collections and used as a token action. Obviously it's calling npc_ Attributes so it isn't going to work for PCs.
Thanks&nbsp; OOsh! That's *almost* working properly. But it's not applying the bonus properly. I tried applying it to a goblin which has a +6 to stealth, but it only applied it to the second roll. The actual rolls were `1d20+2` and `1d20+6`.
1590836150
Oosh
Sheet Author
API Scripter
Oh, interesting. I didn't notice that sorry. It's calling on two different Attributes for r1 and r2. If you look at Acrobatics: Acrobatics,[[ @{selected|npc_acrobatics} ]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+ @{selected|acrobatics_bonus} ]]&amp;#125;&amp;#125;{{rname=Acrobatics Check&amp;#125;&amp;#125;{{name=@{character_name}&amp;#125;&amp;#125;{{type=Roll&amp;#125;&amp;#125; The first call in bold is the correct one for an NPC which goes to r2 via the {rtype} call outside the query, right at the start. The second one is a Player Character skill bonus call. Essentially you will need to replace all the &lt; skillname&gt;_bonus instances with npc_&lt;skillname&gt; to get this to work properly for NPCs.
1590865859

Edited 1590868085
Scott M. said: Thanks&nbsp; OOsh! That's *almost* working properly. But it's not applying the bonus properly. I tried applying it to a goblin which has a +6 to stealth, but it only applied it to the second roll. The actual rolls were `1d20+2` and `1d20+6`. This macro is for the players. I corrected the macro in the original post. I am using an other one for monsters, here is the link to it : <a href="https://app.roll20.net/forum/post/8747010/slug%7D" rel="nofollow">https://app.roll20.net/forum/post/8747010/slug%7D</a>
1590866105

Edited 1590866425
Thanks Ozzy! I originally was going to post the NPC version, but it looks like you took care of that. Great work
Scott M. said: That was it! Here is the final macro with all the changes @{selected|wtype}&amp;{template:npc} @{selected|rtype}+?{Skills|Acrobatics,[[@{selected|npc_acrobatics}]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+@{selected|npc_acrobatics}]]&amp;#125;&amp;#125;{{rname=Acrobatics Check&amp;#125;&amp;#125;{{name=@{selected|character_name}&amp;#125;&amp;#125;{{type=Roll&amp;#125;&amp;#125; |Animal Handling,[[@{selected|npc_animal_handling}]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+@{selected|animal_handling_bonus}]]&amp;#125;&amp;#125;{{rname=Animal Handling Check&amp;#125;&amp;#125;{{name=@{selected|character_name}&amp;#125;&amp;#125; {{type=Roll&amp;#125;&amp;#125; |Arcana,[[@{selected|npc_arcana}]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+@{selected|npc_arcana}]]&amp;#125;&amp;#125;{{rname=Arcana Check&amp;#125;&amp;#125;{{name=@{selected|character_name}&amp;#125;&amp;#125; {{type=Roll&amp;#125;&amp;#125; |Athletics,[[@{selected|npc_athletics}]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+@{selected|npc_athletics}]]&amp;#125;&amp;#125;{{rname=Athletics Check&amp;#125;&amp;#125;{{name=@{selected|character_name}&amp;#125;&amp;#125; {{type=Roll&amp;#125;&amp;#125; |Deception,[[@{selected|npc_deception}]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+@{selected|npc_deception}]]&amp;#125;&amp;#125;{{rname=Deception Check&amp;#125;&amp;#125;{{name=@{selected|character_name}&amp;#125;&amp;#125; {{type=Roll&amp;#125;&amp;#125; |History,[[@{selected|npc_history}]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+@{selected|npc_history}]]&amp;#125;&amp;#125;{{rname=History Check&amp;#125;&amp;#125;{{name=@{selected|character_name}&amp;#125;&amp;#125; {{type=Roll&amp;#125;&amp;#125; |Insight,[[@{selected|npc_insight}]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+@{selected|npc_insight}]]&amp;#125;&amp;#125;{{rname=Insight Check&amp;#125;&amp;#125;{{name=@{selected|character_name}&amp;#125;&amp;#125; {{type=Roll&amp;#125;&amp;#125; |Intimidation,[[@{selected|npc_intimidation}]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+@{selected|npc_intimidation}]]&amp;#125;&amp;#125;{{rname=Intimidation Check&amp;#125;&amp;#125;{{name=@{selected|character_name}&amp;#125;&amp;#125; {{type=Roll&amp;#125;&amp;#125; |Investigation,[[@{selected|npc_investigation}]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+@{selected|npc_investigation}]]&amp;#125;&amp;#125;{{rname=Investigation Check&amp;#125;&amp;#125;{{name=@{selected|character_name}&amp;#125;&amp;#125; {{type=Roll&amp;#125;&amp;#125; |Medicine,[[@{selected|npc_medicine}]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+@{selected|npc_medicine}]]&amp;#125;&amp;#125;{{rname=Medicine Check&amp;#125;&amp;#125;{{name=@{selected|character_name}&amp;#125;&amp;#125; {{type=Roll&amp;#125;&amp;#125; |Nature,[[@{selected|npc_nature}]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+@{selected|npc_nature}]]&amp;#125;&amp;#125;{{rname=Nature Check&amp;#125;&amp;#125;{{name=@{selected|character_name}&amp;#125;&amp;#125; {{type=Roll&amp;#125;&amp;#125; |Perception,[[@{selected|npc_perception}]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+@{selected|npc_perception}]]&amp;#125;&amp;#125;{{rname=Perception Check&amp;#125;&amp;#125;{{name=@{selected|character_name}&amp;#125;&amp;#125; {{type=Roll&amp;#125;&amp;#125; |Performance,[[@{selected|npc_performance}]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+@{selected|npc_performance}]]&amp;#125;&amp;#125;{{rname=Performance Check&amp;#125;&amp;#125;{{name=@{selected|character_name}&amp;#125;&amp;#125; {{type=Roll&amp;#125;&amp;#125; |Persuasion,[[@{selected|npc_persuasion}]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+@{selected|npc_persuasion}]]&amp;#125;&amp;#125;{{rname=Persuasion Check&amp;#125;&amp;#125;{{name=@{selected|character_name}&amp;#125;&amp;#125; {{type=Roll&amp;#125;&amp;#125; |Religion,[[@{selected|npc_religion}]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+@{selected|npc_religion}]]&amp;#125;&amp;#125;{{rname=Religion Check&amp;#125;&amp;#125;{{name=@{selected|character_name}&amp;#125;&amp;#125; {{type=Roll&amp;#125;&amp;#125; |Sleight Of Hand,[[@{selected|npc_sleight_of_hand}]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+@{selected|sleight_of_hand_bonus}]]&amp;#125;&amp;#125;{{rname=Sleight Of Hand Check&amp;#125;&amp;#125;{{name=@{selected|character_name}&amp;#125;&amp;#125; {{type=Roll&amp;#125;&amp;#125; |Stealth,[[@{selected|npc_stealth}]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+@{selected|npc_stealth}]]&amp;#125;&amp;#125;{{rname=Stealth Check&amp;#125;&amp;#125;{{name=@{selected|character_name}&amp;#125;&amp;#125; {{type=Roll&amp;#125;&amp;#125; |Survival,[[@{selected|npc_survival}]]]]&amp;#125;&amp;#125;{{r1=[[@{selected|d20}+@{selected|npc_survival}]]&amp;#125;&amp;#125;{{rname=Survival Check&amp;#125;&amp;#125;{{name=@{selected|character_name}&amp;#125;&amp;#125; {{type=Roll&amp;#125;&amp;#125 The version you posted with corrections is indeed for monsters. If you want the version for your players, go see original post, I modified it. Also, Scott M., can you tell me if you are able to use this macro (the one you posted) as a general one or did you include it directly in the monster sheet. Thank you !
I added that macro directly to my monster template sheet