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

Several types of rolls with roll modifiers?

Sheet Author
Hi! I'm working on my first character sheet. In the given RPG there are three possible rolls that a player can choose from. Currently I'm trying to match these rolls with the roll20 roll-logic, but I'm not sure if it is possible in general to do what I want to do. I want to build a template roll where the player can choose one of the three different types of rolls: Standard roll: /roll 2d10cs>9cf<2 + ?{modifier|0} Safety roll: /roll 2d10d1 + ?{modifier|0} Risk roll: /roll 4d10k2cs>9cf<2 + ?{modifier|0 After reading the wiki and some posts in this forum I've come up with something like this: {{skill=?{rolltype| [[2d10+@{acrobatics}+?{modifier|0}+@{acrobaticsbonus}-@{handicap}]]| [[2d10d1+@{acrobatics}+?{modifier|0}+@{acrobaticsbonus}-@{handicap}]]| [[4d10k2cs>9cf<2+@{acrobatics}+?{modifier|0}+@{acrobaticsbonus}-@{handicap}]]}}} But this code doesn't work properly. The box from which the player chooses the roll doesn't have all three options. Am I missing something here? Cheers, Loki
So for this query you are going to need to utilize  HTML equivalents because you are trying to nest macro queries. Queries end at the first '}' that they encounter, which  in this case is the '}' in '?{modifier|0}'. To overcome this, you will need to change each ',', '|', and '}' in the query to their HTML equivalent. (See the link for more information.) You should also consider using  Labels and Values for your macros when you are wanting to allow a list of options in the query. You already have the limited options, but those options would already tell the user what they are going to roll with the macro. {{skill=?{rolltype| Standard,[[2d10+@{acrobatics}+?{modifier | 0 } +@{acrobaticsbonus}-@{handicap}]]| Safety,[[2d10d1+@{acrobatics}+?{modifier | 0 } +@{acrobaticsbonus}-@{handicap}]]| Risk,[[4d10k2cs>9cf<2+@{acrobatics}+?{modifier | 0 } +@{acrobaticsbonus}-@{handicap}]]}}}
Sheet Author
Thank you very much! I'll have a look into that topic.

Edited 1492006368
Forum Champion
Great intro to advanced Roll Queries! I personally like to suggest avoiding delving into the complexities of advanced Roll Queries if and when possible: {{skill=[[ ?{rolltype|    Standard, 2d10cs>9cf<2 |    Safety, 2d10d1 |    Risk, 4d10k2cs>9cf<2 } + ?{modifier|0} + @{acrobaticsbonus} - @{handicap} ]]}}
Sheet Author
@Silvyre Thanks a lot, that works like a charm! It's indeed very plausible to choose from the rolls and do the math afterwards! Great! Greetings, Loki