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

Using Attributes to determine how many dice to roll?

I'm trying to use Attributes from a character sheet to roll a number of dice equal to the Attributes: /roll @{max_hits}d100 However, this only outputs @{max_hits}. How can I format the roll so I can roll the d100 a times equal to @{max_hits}?
1473038461
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Try it with inline roll syntax: /r [[@{max_hits}]]d100 or [[ [[@{max_hits}]]d100]] Technically those two should be identical (just inline roll output versus normal roll command output), but sometimes it seems like inline rolls play funnily with other things.
Ah, so I needed to finalize the attribute before trying to roll. Got it. Thanks
1473047851
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
I would have thought your syntax would work, but glad those ideas worked. If max hits isn't just a number that would explain it.
1473053555

Edited 1473053579
Lithl
Pro
Sheet Author
API Scripter
Scott C. said: I would have thought your syntax would work, but glad those ideas worked. If max hits isn't just a number that would explain it. Depending on the calculation, (@{max_hits})d100 would also work.