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

Button to use Glyph in 5E

What is wrong with this formula? <button type="roll" value="/em @{Name} uses a @{GlyphName} glyph [[[[1d20 + ?{Ability|Strength, @{STR Mod}|Dexterity, @{DEX Mod}|Intelligence, @{INT Mod}|Wisdom, @{WIS Mod}|Charisma, @{CHA Mod}}]] >= [[(?{Area|0} + ?{Duration|0} + ?{Potency|0} -3)*5)]]]]"/> What it's supposed to do is prompt the user for what ability to use Add that value to a d20 roll Prompt the user for Area, Duration, and Potency. Multiple the sum of Area, Duration, and Potency by 5 to get the target. Determine if the d20+modifier roll >= to the target.
1600028666
Andreas J.
Forum Champion
Sheet Author
Translator
What happens when you use it? What sheet are you adding this button to? Have checked that the stats ha the right names? No idea of this is even the right stats, but stats like @{STR Mod} need the underscore to work, so @{STR_Mod} roll queries like that likely needs to use html replacement, check the wiki for examples.
bump
The result come up as ## >= ##
1600086962
Andreas J.
Forum Champion
Sheet Author
Translator
Joab said: The result come up as ## >= ## Maybe you should try remove the outer [[ ]] for the roll and just have: [[the roll]] >=  [[the other calculation]] and then just read the numbers and see which is higher. You didn't address any of the other things I mentioned so won't be able to help further without more info.
1600091964

Edited 1600092004
GiGs
Pro
Sheet Author
API Scripter
I was just about to make the same suggestion as Andreas, but I noticed your OP included full instructions to make the full roll. Andreas's suggestion will work if you just want to display the roll, and the other calculation, and manually see if it's higher. If on the other hand you want to compare them and have the roll show success or failure, the syntax is incorrect. This is the syntax for that: [[ {1d20 + ?{Ability|0}}>[[(?{Area|1} + ?{Duration|1} + ?{Potency|2} -3)*5]] ]] Replace the  ?{Ability|0}  part with your dropdown - i used a simple one for testing and didnt have  character with those attributes. Note that this will always show a 1 for success, and a 0 for failure. When using inline rolls, it cannot show the word success  or failure .