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

Roll Template greaterThan or equalTo

Hi I am trying to set up a roll template that will display a section if a value is >= another value. I pass 2 values to a roll template dp and attack. DP is a value and attack is an inline roll <button type='roll' value='&{template:test} {{rollname=@{agil_2}}} {{dp=[[@{agility}+@{agil_2_s}]]}} {{c_name=@{character_name}}} {{attack=[[(@{agility}+@{agil_2_s})d10!sd>?{Ease Factor}]]}} {{ef_q=?{Ease Factor}}}' name='roll_agil_2' /></td> My template is <rolltemplate class="sheet-rolltemplate-test"> <div class="sheet-template-container"> <div class="sheet-template-header">{{rollname}} -- {{dp}}DP</div> {{#attack}} <div class="sheet-template-row">{{c_name}} rolls: {{attack}} Successes at EF {{ef_q}}</div>{{/attack}} {{#rollGreater() attack dp}} <div class="sheet-template-row"><span>Gain a Success Tick</span>{{/rollGreater() attack dp}} </rolltemplate> In this example I can get the template to add the extra message if I roll attack  greaterThan  dp, but my question is how do I do >= TIA
1604941430

Edited 1604941601
GiGs
Pro
Sheet Author
API Scripter
This is trickier than you'd expect, but you can do it with the NOT operator: ^. Saying something is Greater than or Equal To, is the same as saying it's NOT less than. So you can do {{#^rollLess() attack dp}} <div class="sheet-template-row"><span>Gain a Success Tick</span>{{/^rollLess() attack dp}}
Oh that is genius. I love that. Many thanks!!