I'm trying to setup a macro to roll all a character's knowledge and lore skills with a single button press, and I can't seem to get the roll templates to behave in a way I think they should (I'm referring to the documentation here: https://wiki.roll20.net/Roll_Templates )
Basically, it needs to only roll knowledge skills that a character has ranks in, so I need to check to see if the character has more than 0 ranks in a skill, and if so output a roll for it. I'm trying something like the following (newlines added for readability, plus the final macro would have all the knowledge skills listed in it):
My understanding is that {{#<something>}} ... {{/<something>}} should act like a conditional. I've tried it both with and without the rollGreater() part, but it just outputs the two conditional lines as text, e.g.:
If I leave out the rollGreater() helper function, then I get "#0" and "/0" output instead. Could someone point out where I'm going wrong?
Thanks,
Sam.
Basically, it needs to only roll knowledge skills that a character has ranks in, so I need to check to see if the character has more than 0 ranks in a skill, and if so output a roll for it. I'm trying something like the following (newlines added for readability, plus the final macro would have all the knowledge skills listed in it):
&{template:pf_generic} {{character_name= @{selected|character_name} }} {{name= Knowledge Checks }} {{#rollGreater() @{selected|Knowledge-Dungeoneering-ranks} }} {{Knowledge (Dungeoneering)= [[ 1d20 + @{selected|Knowledge-Dungeoneering} ]] }} {{/rollGreater() @{selected|Knowledge-Dungeoneering-ranks} }}
My understanding is that {{#<something>}} ... {{/<something>}} should act like a conditional. I've tried it both with and without the rollGreater() part, but it just outputs the two conditional lines as text, e.g.:
If I leave out the rollGreater() helper function, then I get "#0" and "/0" output instead. Could someone point out where I'm going wrong?
Thanks,
Sam.