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

Knowledge Skill Macro with the Pathfinder Character Sheet

I'm running Pathfinder and creating some token actions for my players. I'd like to create on to allow them to roll knowledge skills easily and wanted to do something like the following:

When the token action is activated a roll for each skill would be done and all the skills would be displayed in the chat scroll. In Pathfinder, almost in all cases, knowledge skills require training, meaning they must have one rank in the skill to be able to roll that skill (and then can add knowledge bonus). So I wanted the macro to just display a 0 for any skill roll for a a knowledge skill that requires training and the player doesn't have any ranks in that skill. 

Any ideas on how this could be done?













June 17 (9 years ago)

Edited June 17 (9 years ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
There was a post that this came up in, but I can't seem to find it now. But roughly you would do this for each knowledge roll:

[[[[{@{SKILLNAME-ranks}+1d1}>2]]*[[1d20+@{SKILLNAME}]]]]

EDIT: If you wanted it to dynamically change behavior based on whether or not the skill required training you could do this:
[[[[{@{SKILLNAME-ranks}+1d1}>[[1+@{SKILLNAME-ReqTrain}]]]]*[[1d20+@{SKILLNAME}]]]]

You would have to make sure that you went through and toggled ALL skills that you plan on using this macro for back and forth from requiring training to not so that the character sheet will generate the appropriate -reqTrain for those skills that do not require it. This would be useful if there was a bard in your party.
June 17 (9 years ago)

Edited June 17 (9 years ago)

humannumber1 said:

I'm running Pathfinder and creating some token actions for my players. I'd like to create on to allow them to roll knowledge skills easily and wanted to do something like the following:

I while back I made a Wiki page for Pathfinder macros.
Check out the wiki under  "Macros/Pathfinder Examples": https://wiki.roll20.net/Macros_-_Pathfinder_Exampl...

Towards  the bottom of that page are some Pathfinder Character Sheet examples.
The token action I made that I think you want is :
Skill Checks(Alternate)(Provides a drop-down for ALL skill checks, and reports a "0" for any untrained skills that require training, like Knowledges.)
@Scott, this is perfect. I even wanted to figure out how incorporate the Require Training flag precisely for bards. I have to remember the Boolean compare technique to act as an if statement.

@Mark, thanks for the reply. I think what Scott posted better fit for What I was looking for. I really wanted to consider the require training flag also. 

This is what I ended up with (and will add the other skills in) and it works exactly how I wanted it to.

@{selected|PC-whisper} &{template:pf_generic} @{selected|toggle_accessible_flag} @{selected|toggle_rounded_flag}{{color=@{selected|rolltemplate_color}}} {{header_image=@{selected|header_image-pf_generic}}} {{character_name=@{selected|character_name}}} {{character_id=@{selected|character_id}}} {{subtitle}} {{name=Knowledge Skills}} {{Arcana=[[[[{@{selected|Knowledge-Arcana-ranks}+1d1}>[[1+@{selected|Knowledge-Arcana-ReqTrain}]]]]*[[1d20+@{selected|Knowledge-Arcana}]]]] }} {{Dungeoneering=[[[[{@{selected|Knowledge-Dungeoneering-ranks}+1d1}>[[1+@{selected|Knowledge-Dungeoneering-ReqTrain}]]]]*[[1d20+@{selected|Knowledge-Dungeoneering}]]]] }}

Thanks!
Looks like there is a max number of calculations that can be included in a macro. After handling more than 4 skills using the method I show in my example the 5th skill doesn't render the calculation. It ends up something like:

Arcana    
Dungeoneering    21
Engineering    0
Geography    0
History    [[0*4]] 

So, a bit of a damper, but I guess the drop-down method Mark mention could also be leveraged to limit the number of calculation.

June 17 (9 years ago)

Edited June 17 (9 years ago)
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Yep, or my favorite: ability command buttons as I personally think they are easier to set up than the dropdown menus.

Edit, also not sure why that would be, I've got attack macros that have way more calculations in them than that.

2nd EDIT: If you add another layer of outer [[Inline Roll Brackets]] it seems to solve the problem
Adding the outer layer [[ ]]  helps, but doesn't fix everything, and I end up with strange behavior
Arcana Dungeoneering 15 
Engineering 0
Geography 0
History 0
Local 0
Nature 0
Nobility [[4]]
Planes 4
Religion [[[[1*13]]]] 

Everything calculates and renders for the first 7. Nobility looks to calculate correctly, but renders some extra brackets. If I remove the out brackets that I added then it doesn't calculate (it looks like religion).

Then for some odd reason Planes calculates and renders correctly and Religion doesn't calculate or render. I thought I might have a syntax error, but I use the same line as a template and just replaced the skill name.

If you are curios here is what I have, both in code for single line, and quote for "human readable".

@{selected|PC-whisper} &{template:pf_generic} @{selected|toggle_accessible_flag} @{selected|toggle_rounded_flag}{{color=@{selected|rolltemplate_color}}} {{header_image=@{selected|header_image-pf_generic}}} {{character_name=@{selected|character_name}}} {{character_id=@{selected|character_id}}}  {{subtitle}} {{name=Knowledge Skills}} {{Arcana=[[[[[[{@{selected|Knowledge-Arcana-ranks}+1d1}>[[1+@{selected|Knowledge-Arcana-ReqTrain}]]]]*[[1d20+@{selected|Knowledge-Arcana}]]]]]] }} {{Dungeoneering=[[[[[[{@{selected|Knowledge-Dungeoneering-ranks}+1d1}>[[1+@{selected|Knowledge-Dungeoneering-ReqTrain}]]]]*[[1d20+@{selected|Knowledge-Dungeoneering}]]]]]] }} {{Engineering=[[[[[[{@{selected|Knowledge-Engineering-ranks}+1d1}>[[1+@{selected|Knowledge-Engineering-ReqTrain}]]]]*[[1d20+@{selected|Knowledge-Engineering}]]]]]] }} {{Geography=[[[[[[{@{selected|Knowledge-Geography-ranks}+1d1}>[[1+@{selected|Knowledge-Geography-ReqTrain}]]]]*[[1d20+@{selected|Knowledge-Geography}]]]]]] }} {{History=[[[[[[{@{selected|Knowledge-History-ranks}+1d1}>[[1+@{selected|Knowledge-History-ReqTrain}]]]]*[[1d20+@{selected|Knowledge-History}]]]]]] }} {{Local=[[[[[[{@{selected|Knowledge-Local-ranks}+1d1}>[[1+@{selected|Knowledge-Local-ReqTrain}]]]]*[[1d20+@{selected|Knowledge-Local}]]]]]] }} {{Nature=[[[[[[{@{selected|Knowledge-Nature-ranks}+1d1}>[[1+@{selected|Knowledge-Nature-ReqTrain}]]]]*[[1d20+@{selected|Knowledge-Nature}]]]]]] }} {{Nobility=[[[[[[{@{selected|Knowledge-Nobility-ranks}+1d1}>[[1+@{selected|Knowledge-Nobility-ReqTrain}]]]]*[[1d20+@{selected|Knowledge-Nobility}]]]]]] }} {{Planes=[[[[[[{@{selected|Knowledge-Planes-ranks}+1d1}>[[1+@{selected|Knowledge-Planes-ReqTrain}]]]]*[[1d20+@{selected|Knowledge-Planes}]]]]]] }}{{Religion=[[[[[[{@{selected|Knowledge-Religion-ranks}+1d1}>[[1+@{selected|Knowledge-Religion-ReqTrain}]]]]*[[1d20+@{selected|Knowledge-Religion}]]]]]] }}

@{selected|PC-whisper} &{template:pf_generic} @{selected|toggle_accessible_flag} @{selected|toggle_rounded_flag}{{color=@{selected|rolltemplate_color}}} {{header_image=@{selected|header_image-pf_generic}}} {{character_name=@{selected|character_name}}} {{character_id=@{selected|character_id}}} {{subtitle}} {{name=Knowledge Skills}} {{Arcana=[[[[[[{@{selected|Knowledge-Arcana-ranks}+1d1}>[[1+@{selected|Knowledge-Arcana-ReqTrain}]]]]*[[1d20+@{selected|Knowledge-Arcana}]]]]]] }} {{Dungeoneering=[[[[[[{@{selected|Knowledge-Dungeoneering-ranks}+1d1}>[[1+@{selected|Knowledge-Dungeoneering-ReqTrain}]]]]*[[1d20+@{selected|Knowledge-Dungeoneering}]]]]]] }} {{Engineering=[[[[[[{@{selected|Knowledge-Engineering-ranks}+1d1}>[[1+@{selected|Knowledge-Engineering-ReqTrain}]]]]*[[1d20+@{selected|Knowledge-Engineering}]]]]]] }} {{Geography=[[[[[[{@{selected|Knowledge-Geography-ranks}+1d1}>[[1+@{selected|Knowledge-Geography-ReqTrain}]]]]*[[1d20+@{selected|Knowledge-Geography}]]]]]] }} {{History=[[[[[[{@{selected|Knowledge-History-ranks}+1d1}>[[1+@{selected|Knowledge-History-ReqTrain}]]]]*[[1d20+@{selected|Knowledge-History}]]]]]] }} {{Local=[[[[[[{@{selected|Knowledge-Local-ranks}+1d1}>[[1+@{selected|Knowledge-Local-ReqTrain}]]]]*[[1d20+@{selected|Knowledge-Local}]]]]]] }} {{Nature=[[[[[[{@{selected|Knowledge-Nature-ranks}+1d1}>[[1+@{selected|Knowledge-Nature-ReqTrain}]]]]*[[1d20+@{selected|Knowledge-Nature}]]]]]] }} {{Nobility=[[[[[[{@{selected|Knowledge-Nobility-ranks}+1d1}>[[1+@{selected|Knowledge-Nobility-ReqTrain}]]]]*[[1d20+@{selected|Knowledge-Nobility}]]]]]] }} {{Planes=[[[[[[{@{selected|Knowledge-Planes-ranks}+1d1}>[[1+@{selected|Knowledge-Planes-ReqTrain}]]]]*[[1d20+@{selected|Knowledge-Planes}]]]]]] }}{{Religion=[[[[[[{@{selected|Knowledge-Religion-ranks}+1d1}>[[1+@{selected|Knowledge-Religion-ReqTrain}]]]]*[[1d20+@{selected|Knowledge-Religion}]]]]]] }}

I check out the ability command buttons and it's good to know about another capability. I think the user experience in this case would be a little odd, you'd hit a button for the token action that would put 10 buttons in the chat which you would then select. I think i'll just leave the players using sheet roll buttons. It's not too much to ask for players to have their character sheets open and handy to make these rolls :-)

Another drawback on the ability command button is that it doesn't take in the account the Required Training and if the player has a skill rank. I wonder if that intelligence can be built into the character sheet. Maybe I should up to a pro account and see if I can figure out how to do that and submit a pull request.

Thanks again for the replies. Even if I wasn't able to get this to work, still learned a bunch.
June 18 (9 years ago)
Try padding the interiors of the outwardmost inline roll brackets with spaces (e.g. Damage=[[foo]] → Damage=[[ foo ]]).
@Silvyre, that worked!!! Awesome!

I wasn't quite sure which brackets you were referring to, but I put a space after every opening pair and before every closing pair and it did the trick.

I'm surprised white space matters and lead to such odd results. Do you have any idea that would be the case. No real relevance to this specific case, just curious as a tech nerd.
 




June 18 (9 years ago)
Glad it worked, but I can't say exactly why it does. :)
June 18 (9 years ago)

Edited June 18 (9 years ago)
vÍnce
Pro
Sheet Author
If the system was perfect we wouldn't have anything to post about.  ;-)
The issue I found for this is that with Knowledge Skill checks you can make them untrained if the DC is 10 or less. (Page 100 Pathfinder RPG Core Rulebook). I managed to get it to work with this macro.

@{selected|PC-whisper} &{template:pf_generic} @{selected|toggle_accessible_flag} @{selected|toggle_rounded_flag}{{color=@{selected|rolltemplate_color}}} {{header_image=@{selected|header_image-pf_generic}}} {{name=Knowledge Check}} {{subtitle=@{selected|token_name} }} {{ [[-1*floor((0-@{selected|Knowledge-Arcana-ranks}+0.1)/(abs(0-@{selected|Knowledge-Arcana-ranks}+0.1)+0.001))*(1d20 + @{selected|Knowledge-Arcana}) - floor((@{selected|Knowledge-Arcana-ranks}-0.1-0)/(abs(@{selected|Knowledge-Arcana-ranks}-0.1-0)+0.001))*(-1*floor((10-9+0.1)/(abs(10-9+0.1)+0.001))*10 - floor((9-0.1-10)/(abs(9-0.1-10)+0.001))*{(1d20 + @{selected|Knowledge-Arcana}),0d0+10}kl1)]] **Arcana=Dungeoneering [[-1*floor((0-@{selected|Knowledge-Dungeoneering-ranks}+0.1)/(abs(0-@{selected|Knowledge-Dungeoneering-ranks}+0.1)+0.001))*(1d20 + @{selected|Knowledge-Dungeoneering}) - floor((@{selected|Knowledge-Dungeoneering-ranks}-0.1-0)/(abs(@{selected|Knowledge-Dungeoneering-ranks}-0.1-0)+0.001))*(-1*floor((10-9+0.1)/(abs(10-9+0.1)+0.001))*10 - floor((9-0.1-10)/(abs(9-0.1-10)+0.001))*{(1d20 + @{selected|Knowledge-Dungeoneering}),0d0+10}kl1)]] }} {{ [[-1*floor((0-@{selected|Knowledge-Engineering-ranks}+0.1)/(abs(0-@{selected|Knowledge-Engineering-ranks}+0.1)+0.001))*(1d20 + @{selected|Knowledge-Engineering}) - floor((@{selected|Knowledge-Engineering-ranks}-0.1-0)/(abs(@{selected|Knowledge-Engineering-ranks}-0.1-0)+0.001))*(-1*floor((10-9+0.1)/(abs(10-9+0.1)+0.001))*10 - floor((9-0.1-10)/(abs(9-0.1-10)+0.001))*{(1d20 + @{selected|Knowledge-Engineering}),0d0+10}kl1)]] **Engineering=Geography [[-1*floor((0-@{selected|Knowledge-Geography-ranks}+0.1)/(abs(0-@{selected|Knowledge-Geography-ranks}+0.1)+0.001))*(1d20 + @{selected|Knowledge-Geography}) - floor((@{selected|Knowledge-Geography-ranks}-0.1-0)/(abs(@{selected|Knowledge-Geography-ranks}-0.1-0)+0.001))*(-1*floor((10-9+0.1)/(abs(10-9+0.1)+0.001))*10 - floor((9-0.1-10)/(abs(9-0.1-10)+0.001))*{(1d20 + @{selected|Knowledge-Geography}),0d0+10}kl1)]] }} {{ [[-1*floor((0-@{selected|Knowledge-History-ranks}+0.1)/(abs(0-@{selected|Knowledge-History-ranks}+0.1)+0.001))*(1d20 + @{selected|Knowledge-History}) - floor((@{selected|Knowledge-History-ranks}-0.1-0)/(abs(@{selected|Knowledge-History-ranks}-0.1-0)+0.001))*(-1*floor((10-9+0.1)/(abs(10-9+0.1)+0.001))*10 - floor((9-0.1-10)/(abs(9-0.1-10)+0.001))*{(1d20 + @{selected|Knowledge-History}),0d0+10}kl1)]] **History=Local [[-1*floor((0-@{selected|Knowledge-Local-ranks}+0.1)/(abs(0-@{selected|Knowledge-Local-ranks}+0.1)+0.001))*(1d20 + @{selected|Knowledge-Local}) - floor((@{selected|Knowledge-Local-ranks}-0.1-0)/(abs(@{selected|Knowledge-Local-ranks}-0.1-0)+0.001))*(-1*floor((10-9+0.1)/(abs(10-9+0.1)+0.001))*10 - floor((9-0.1-10)/(abs(9-0.1-10)+0.001))*{(1d20 + @{selected|Knowledge-Local}),0d0+10}kl1)]] }} {{ [[-1*floor((0-@{selected|Knowledge-Nature-ranks}+0.1)/(abs(0-@{selected|Knowledge-Nature-ranks}+0.1)+0.001))*(1d20 + @{selected|Knowledge-Nature}) - floor((@{selected|Knowledge-Nature-ranks}-0.1-0)/(abs(@{selected|Knowledge-Nature-ranks}-0.1-0)+0.001))*(-1*floor((10-9+0.1)/(abs(10-9+0.1)+0.001))*10 - floor((9-0.1-10)/(abs(9-0.1-10)+0.001))*{(1d20 + @{selected|Knowledge-Nature}),0d0+10}kl1)]] **Nature=Nobility [[-1*floor((0-@{selected|Knowledge-Nobility-ranks}+0.1)/(abs(0-@{selected|Knowledge-Nobility-ranks}+0.1)+0.001))*(1d20 + @{selected|Knowledge-Nobility}) - floor((@{selected|Knowledge-Nobility-ranks}-0.1-0)/(abs(@{selected|Knowledge-Nobility-ranks}-0.1-0)+0.001))*(-1*floor((10-9+0.1)/(abs(10-9+0.1)+0.001))*10 - floor((9-0.1-10)/(abs(9-0.1-10)+0.001))*{(1d20 + @{selected|Knowledge-Nobility}),0d0+10}kl1)]] }} {{ [[-1*floor((0-@{selected|Knowledge-Planes-ranks}+0.1)/(abs(0-@{selected|Knowledge-Planes-ranks}+0.1)+0.001))*(1d20 + @{selected|Knowledge-Planes}) - floor((@{selected|Knowledge-Planes-ranks}-0.1-0)/(abs(@{selected|Knowledge-Planes-ranks}-0.1-0)+0.001))*(-1*floor((10-9+0.1)/(abs(10-9+0.1)+0.001))*10 - floor((9-0.1-10)/(abs(9-0.1-10)+0.001))*{(1d20 + @{selected|Knowledge-Planes}),0d0+10}kl1)]] **Planes=Religion [[-1*floor((0-@{selected|Knowledge-Religion-ranks}+0.1)/(abs(0-@{selected|Knowledge-Religion-ranks}+0.1)+0.001))*(1d20 + @{selected|Knowledge-Religion}) - floor((@{selected|Knowledge-Religion-ranks}-0.1-0)/(abs(@{selected|Knowledge-Religion-ranks}-0.1-0)+0.001))*(-1*floor((10-9+0.1)/(abs(10-9+0.1)+0.001))*10 - floor((9-0.1-10)/(abs(9-0.1-10)+0.001))*{(1d20 + @{selected|Knowledge-Religion}),0d0+10}kl1)]] }}
July 31 (9 years ago)
vÍnce
Pro
Sheet Author
Very nice.  Thanks d100GM