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

Adding A Flat Bonus To Multiple Rolls

I want to give the user a prompt to put in a flat number for a bonus to be added to multiple rolls, but I am doing it wrong or I am trying to do something that cannot be done. Please help? &{template:default} {{name=Rolling Traits}} {{{{Bravery=[[2d6+2]]}} {{Cunning=[[2d6-1]]}} {{Intellect=[[2d6+1]]}} {{Loyalty=[[2d6+0]]}} {{Magic=[[2d6+1]]}} + ?{Any Bonus?|0} ]]}} 
1703831321

Edited 1703831465
vÍnce
Pro
Sheet Author
Hi OneMix, Looks like you had some errant/extra curly {{ }} and square [[ ]].  Also the query should be included wherever you want to use it. try this; &{template:default} {{name=Rolling Traits}} {{Bravery=[[2d6+2+?{Any Bonus?|0}[bon]]]}} {{Cunning=[[2d6-1+?{Any Bonus?}[bon]]]}} {{Intellect=[[2d6+1+?{Any Bonus?}[bon]]]}} {{Loyalty=[[2d6+0+?{Any Bonus?}[bon]]]}} {{Magic=[[2d6+1+?{Any Bonus?}[bon]]]}}
1703831352

Edited 1703831427
Gauss
Forum Champion
Hi OneMix,  To explain what Vince did, if a query is identical in multiple locations then the result of that query will be the same in all those locations.  So the query "Any Bonus" will be asked once, and answered multiple times in his example. 
1703831603

Edited 1703831679
vÍnce
Pro
Sheet Author
and I should have mentioned that you can drop the extra options in the query when it's used in other places.  ie ?{Any Bonus?|0} can then be re-used as ?{Any Bonus?} Just make sure to include the full query the first time it's called. Saves a little space. Not a big deal here, but some queries can be huge...