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 .
×
May your rolls be merry + bright! 🎄
Create a free account

Struggle with template:roll

1591947076

Edited 1591947777
Hello y'all, Pathfinder 2e game, This macro is made to combine all saving throws into one button, which ask you which saving throw you want to use.  &{template:default} {{name=Saving Throw}} {{?{Saving Throw|Fortitude, Fortitude [[1d20cs20cf1+@{saving_throws_fortitude}]]|Reflex, Reflex [[1d20cs20cf1+@{saving_throws_reflex}]]|Will, Will [[1d20cs20cf1+@{saving_throws_will}]]}}} It works well, but it's ugly, so I would like to use the template:rolls. I made this: &{template:rolls}{{charactername=@{character_name}}} {{header=Saving Throw}}{{?{Saving Throw|Fortitude, Fortitude [[1d20cs20cf1+@{saving_throws_fortitude}]]|Reflex, Reflex [[1d20cs20cf1+@{saving_throws_reflex}]]|Will, Will [[1d20cs20cf1+@{saving_throws_will}]]}}} Problem, nothing appears in the chat. I have to delete the text before the throw for it to work, but then we don't know which Saving Throw was chosen... Do you have an idea how to correct this? I'm still very new with macros (I started yesterday).
1591947428
GiGs
Pro
Sheet Author
API Scripter
Is template:rolls  in the character sheet you are using?  rolltemplates only work if the sheet is programmed to include them, and each sheet has its own templates. The default  template is a special one, it cane be used on any campaign. But none of the others are like that.
GiGs said: Is template:rolls  in the character sheet you are using?  rolltemplates only work if the sheet is programmed to include them, and each sheet has its own templates. The default  template is a special one, it cane be used on any campaign. But none of the others are like that. I edited my original post: we play in Pathfinder 2, and template:rolls  is the default template for it :)
1591948753
GiGs
Pro
Sheet Author
API Scripter
Okay :) The problem is likely to be the lack of a key on the saving throw section. Each part of a rolltemplate usually needs or key of label, like {{key = value}} Looking at the code on github, the template seems to be quite complex, needing multiple keys for each entry. You might need to examine a roll made in the sheet to see how to arrange the template. One thing that should work, if not the greatest, is using subheader, like &{template:rolls}{{charactername=@{character_name}}} {{header=Saving Throw}}{{subheader=?{Saving Throw|Fortitude, Fortitude [[1d20cs20cf1+@{saving_throws_fortitude}]]|Reflex, Reflex [[1d20cs20cf1+@{saving_throws_reflex}]]|Will, Will [[1d20cs20cf1+@{saving_throws_will}]]}}} You could try that just to confirm it works, and then figure out the template from existing rolls to see how best to arrange it. You can find previous rolls by clicking your mouse in the chat box, and clicking the up arrow. This will take you to the last roll made, so you can see what its details are.
Thanks ! Your subheader solution works. True, it's not perfect (we don't get the brown body), but it's much better than with the template:default. I'll play around with it and see if I can come up with something better.
1591955741
GiGs
Pro
Sheet Author
API Scripter
great :)
Here is my final version. I find that using only the header makes it clean and easy to read, especially when all players rol together. I've done the same for skills. &{template:rolls}{{charactername=@{character_name}}} {{header=?{Jet de Sauvegarde|Vigueur, Vigueur [[1d20cs20cf1+@{saving_throws_fortitude}]]|Réflexe, Réflexe [[1d20cs20cf1+@{saving_throws_reflex}]]|Volonté, Volonté [[1d20cs20cf1+@{saving_throws_will}]]}}}
1591980023
GiGs
Pro
Sheet Author
API Scripter
Makes sense/ You might be able to put the type of roll in the charactername section, e.g.  {{charactername=@{character_name}'s Saving Throw}} 
1593793410

Edited 1593793505
Mogans Le Myope said: Thanks ! Your subheader solution works. True, it's not perfect (we don't get the brown body), but it's much better than with the template:default. I'll play around with it and see if I can come up with something better. In the above example from GiGs, if you want the roll to be in the brown body, replace "subheader" with "roll01" or "roll02" etc... You can use the following keys together: {{roll01_name=roll name}}{{roll01=rolls will always be above info and desc}} {{info01_name=text}}{{info01=info}} {{desc=use description for lightest background}} The below example can be used as a token action macro if there's a character sheet associated with the selected token... &{template:rolls}{{charactername=@{selected|character_name}}} {{header=Saving Throw}}{{roll01=?{Which Saving Throw?|Fortitude, Fortitude [[1d20cs20cf1+@{selected|saving_throws_fortitude}]]|Reflex, Reflex [[1d20cs20cf1+@{selected|saving_throws_reflex}]]|Will, Will [[1d20cs20cf1+@{selected|saving_throws_will}]]}}}