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 under problem

1483005905
Matthew C
Pro
Sheet Author
Hey guys, I am trying to do the following. When I roll a dice I need the 1d100 roll to be under the skill number. so if the skill is 10 it needs to roll 10 or under if the skill is 160 it needs to be 99 or lower (100 is a cf) Now comes the complicated part I am not looking for a number of successes as I want to have a print out that it fails or succeeds /me &{template:Skill}{{name=attempts to find something through Investigation}}{{roll=[[1d100+100-@{Investigation_total}-@{Awareness_Temporary_Modifier}cs<[[1+@{Critical_Hit_Chance_Total}]]cf>[[99]] ]]}} That is the roll (just an example) <rolltemplate> <td> <!-- Skill dice here --> {{name}} {{#rollLess() roll 99}}<td><b>and Succeeds</b></td>{{/rollBetween() roll 99}} {{#rollGreater() roll 100}}<td><b>and Fails</b></td>{{/rollGreater() roll 100}} {{#rollWasFumble() roll}}<td><b> Critically!</b></td>{{/rollWasFumble() roll}} {{#rollWasCrit() roll}}<td><b> Critically!</b></td>{{/rollWasCrit() roll}} </td> </tr> </rolltemplate> That is the template I have tried everything to get this to work, but it simply will not function how I want it to, meaning I must be doing something wrong. the reason I added the 100 in the formula was to turn the numbers around, so instead of rolling 1d100-10 which would mean a 10% fail chance I wanted 1d100-(100-10) or 1d100-90 meaning 10% success...but I think I did this wrong and for skills above 100 that would be 1d100-(100-160) or 1d100--60 or 1d100+60...which would be bad, since lower numbers are good. Does this make sense and if so, does anyone know how to solve this problem?
1483006715
Matthew C
Pro
Sheet Author
/me &{template:Skill}{{name=attempts to Detect Stealth}}{{roll=[[1d100+100-((@{Kaahogh Agroke|Detect_Stealth_total}))cs<[[1+@{Kaahogh Agroke|Critical_Hit_Chance_Total}]]cf>[[99]] ]]}} I think this solves the problem, but I am not sure...
1483011212
Tetsuo
Forum Champion
Just to be clear, what exactly are you trying to accomplish if, for example, the skill is 30?  Is your end goal to roll a d30, or a d70?
1483011789
Matthew C
Pro
Sheet Author
The idea is for it to show the template being a success if the result is UNDER the skill amount, so if the skill is 30 than with a 1d100 you need to roll 30 or lower. /me &{template:Skill}{{name=attempts to Detect Stealth}}{{roll=[[((1d100))+100-((@{Kaahogh Agroke|Detect_Stealth_total}))cs<[[1+@{Kaahogh Agroke|Critical_Hit_Chance_Total}]]cf>[[99]] ]]}} The above fixed all the problems though, so unless someone has a better way this has been solved...or if someone can tell me how this could go wrong would also be welcome :p
1483016649
Tetsuo
Forum Champion
If you've got it working, awesome. The big problem I see with your macro is the cf>99.that will fumble on 99 or 100. you would simply want cf100. roll20 reads < as less than or equal to, and > as greater than or equal to. seeing as you said a cf is only 100, you want cf100.
1483017799
Matthew C
Pro
Sheet Author
Yes, I fixed that :p I noticed that as well
I notice that your Critical Success and Fumble Points aren't directly appended to a die roll (meaning that they won't do anything). Unless I'm misunderstanding, I would think that you'd want something more like this: /me &{template:Skill} {{name=attempts to Detect Stealth }} {{roll=[[ 1d100cs<[[{@{Kaahogh Agroke|Detect_Stealth_total}, 99}kl1]]cf<[[1 + @{Kaahogh Agroke|Critical_Hit_Chance_Total}]]cf100 ]] }} This provides the following roll highlighting: Result Highlighting Rolled over skill total None Rolled under skill total Green Rolled under crit chance Blue Rolled 100 Red I also added a kl1 function to prevent your skill from surpassing 99. Took out the +100, because I still don't understand its purpose. Also, that's quite an interesting use of /em with a Roll Template, one that I've never seen before... :)
1483051727
Matthew C
Pro
Sheet Author
I like the idea, but i do not think it functions right. It rolled a 60 when the skill was 20 and said it succeeded, I am not sure how to get this to work. I love the Kl1 feature though
1483052004
Matthew C
Pro
Sheet Author
my template posts text not numbers, so this does not work. It would be awesome if it did though
1483192317

Edited 1483194361
Matthew C
Pro
Sheet Author
/me &{template:Skill} {{name=Attempts to Use Detect Stealth Rolling}} {{roll=[[ 1d100cs<[[{@{Riklah Praev|Detect_Stealth_total}, ((99 - ?{enemies evasion|0}))kl1]]cf<[[1 + @{Riklah Praev|Critical_Hit_Chance_Total}]]cf100 ]]}} I am trying to get this to work. What I want is the cap of 99 needs to be lowered by a value that is fillable. This macro asks for the value but wont roll, so I am probably just putting the markings in the wrong location. Any ideas? Deleted the old posts, got everything I wanted to work by using: /me &{template:Skill} {{name=Attempts to Use Detect Stealth Rolling}} {{roll=[[ 1d100cs<[[{@{Riklah Praev|Detect_Stealth_total}, 99 - ?{enemies evasion|0}}kl1]]cf<[[1 + @{Riklah Praev|Critical_Hit_Chance_Total}]]cf>[[100-?{enemies evasion}]] ]]}}