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

inline roll with 1d@{attribute}

is it possible to use an attribute for the number of sides in an inline roll?
1434379772
Ziechael
Forum Champion
Sheet Author
API Scripter
Yes... yes you can: Gives good rolls too lol =D
Good, trying to work Proficiency dice into a character sheet.
1434389858
Lithl
Pro
Sheet Author
API Scripter
If the attribute in question is a calculation, you can also use nested inline rolls to make it work. [[1d[[@{selected|roll}]]]]
1434395629
Ziechael
Forum Champion
Sheet Author
API Scripter
Brian said: If the attribute in question is a calculation, you can also use nested inline rolls to make it work. [[1d[[@{selected|roll}]]]] Great tip, thanks Brian... will have to remember that!
you can actually use an attribute for both parts of the roll if needed. @{number}d@{sides} is a valid roll
1434444916
Ziechael
Forum Champion
Sheet Author
API Scripter
Chell said: you can actually use an attribute for both parts of the roll if needed. @{number}d@{sides} is a valid roll which suggests that you could also use nesting to have calculations be both parts of the roll too [[ [[@number]]d[[@sides]] ]] =D
You can do the nesting in the attribute too, if you want to clean up the roll itself.
1434509769
vÍnce
Pro
Sheet Author
I need to impliment this into the character sheet. Specificlly I need to insert one attribute inside another attribute. On phone now, need to test this out.
1434519604
vÍnce
Pro
Sheet Author
Is this possible? Take this {{DC=[[ @{spellclass-0-level-0-savedc} ]] }} and substitute a number within another attribute with another attribute? {{DC=[[ @{spellclass-[[@{foo}]]-level-0-savedc} ]] }}
1434519988
The Aaron
Roll20 Production Team
API Scripter
No. Expansion of attributes happens before nested inline rolls. See Order of Operations: <a href="https://wiki.roll20.net/Dice_Reference#Order_of_Op" rel="nofollow">https://wiki.roll20.net/Dice_Reference#Order_of_Op</a>... Step 1: is attribute expansion Step 6: is nested inline rolls
1434520095

Edited 1434520191
Vince said: Is this possible? Take this {{DC=[[ @{spellclass-0-level-0-savedc} ]] }} and substitute a number within another attribute with another attribute? {{DC=[[ @{spellclass-[[@{foo}]]-level-0-savedc} ]] }} To my knowledge... still not possible... since the system still expands all attributes in the order it encounters them and before any calculations are performed... so that macro would result in an error about a missing @{spellclass-} attribute Edit: Ninja'd by The Aaron
You could do ?{Foo?|0} instead.
1434522394
vÍnce
Pro
Sheet Author
I thought that was the case. Too bad though. It could help solve my problem easily. HB, a query is a good alternative, however while that may work for me or my group, I've learned that when dealing with the community PF sheet, people tend to not like queries in general. Sadly, the way I need/want to use this, they would be asked for caster class every time a spell macro is used. Each repeating spell has a caster class option that assigns a number 0,1,2 to an attribute, @{foo} in my example above.
HoneyBadger said: You could do ?{Foo?|0} instead. I'm fairly certain that still doesn't work...