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

How to add proficiency to my macro

So I've been trying my hand at creating macro's and I quite enjoy it. I have encountered 1 problem though. When writing my macro, I can't figure out how to call on the player's proficiency bonus. My current code is &{template:default} {{name=Shortbow}} {{attack=[[1d20+@{selected|npcd_dex_mod}+@{selected|Proficiency}]]}} {{AC=@{target|AC}}} {{damage=[[1d6+@{selected|npcd_dex_mod}]]}} I also tried it with PB, I get the same results. Does anyone know how I can fix this, or alternatively, create a global variable to store the proficiency bonus in?
1497166567

Edited 1497166616
Update: I have found 2 workarounds for this. 1) I created a hidden NPC called Global. I then gave it an attribute called prof and set that to 2 (my players are level 2 atm, so as long as I keep that updated, it should work.) and added this to my code: + @{Global|prof} 2) I simply ask for the player's input about their profiency: Non-proficient is 0, proficient is 2.  So unless there's a code that can check proficiency for me, I think this might be the best fix, no?
Hi Jens, @{selected|pb} works for me. (5OGL)
Thanks Ravenknight. Works fine now, it seems I tried every combo except that one. :-)