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

Target rolling on 3 die totals

Hello. I'm running a G.U.R.P.S. game. For those unaware of gurps, it's a 3d6, roll target or under system. Ie: roll 3d6 and get 11 or less total on them. I have 2 problems, one of which impacts the other. 1-I want to be able to (in the chat) manually roll a test. For example /roll 3d6<11. Unfortunately instead of seeing if the 3 dice are less than 11, it check EACH DIE for being less than 11, and therefore returns 3 success every time, instead of 1 success/fail. Most of this I can do in a character sheet. The sheet is amazing, but sometimes I just need to roll by myself. Yes, I can manually look at the chat and see what the total is, but I'd much rather be able to have it generate the success/fail value.  So, IS THIS POSSIBLE? If so, how? 2-I want to be able to do the above for numerous rolls. Lets say I need to know if any of 100 people pass the same check, like maybe poisonous gas, failures pass out. It would take waaaaaay too long to type in /roll 3d6 and look at the result 100 times.  Is there some way to generate those 100 rolls in a single table like /roll 100d18<12 would generate? Unfortunately a d18 and 3d6 have radically different math. Thanks for your time all!
1728605776

Edited 1728607591
1 - it's a bit awkward, but you can do /roll {3d6, 0d0+12}<11 - this will compare the sum of both subrolls against the target. 2 - For this, you're better off making a roll template with the 3d6 results, and rolling that table in an an inline roll against the target that many times - so [[100t[3d6 roll]<12]], for example, would roll 100 times from the 3d6 roll table and compare each result to 12.  Edit: this does work as such, give me a bit to make a working syntax EDIT2: This is why I don't like tables... well, one of the reasons.
1728606916

Edited 1729003046
GiGs
Pro
Sheet Author
API Scripter
One way to do the first part is to use a group roll, like this: /r {3d6,0d0+20}<?{skill|10} Group rolls have a few complications. To get them to total and then compare to another total, you need at least 2 rolls, one of which must always fail - so you can ignore it. You can't mix dice and numbers in the same group roll, or you can't do something like /r {3d6,20}<?{skill|10} This will return an error, because that second value must be a dice roll. It must also be high enough that it always returns a failure. I used 0d0 since this is a dice roll but it always returns zero, then add to a number outside of the range of the dice roll. However, if skills are sometimes 20 and above, you'd need a bigger total You could easy do /r {3d6,0d0+100}<?{skill|10} That second number is always generating a failure, so it doesn't matter what it is - as long as it is high enough. If you want to return a degree of success or failure, you might instead use an inline roll, like this: [[?{skill|10}-3d6]] If you hover over the inline roll, you can see the actual roll. If you want to do a lot of rolls, like 100 rolls you don't want to show a value like that - you just want to count how many succeeded. I'm not aware of any way you can do, say, "roll this many dice 100 times" without typing them all out, but you could use the group roll technique combined with inline rolls to do a number of rolls. Here are 6 rolls-  with copy and paste, you could easily do a lot more, and the successes are added together. [[{3d6,20+d0}<?{skill|10} + {3d6,20+d0}<?{skill} + {3d6,20+d0}<?{skill} + {3d6,20+d0}<?{skill} + {3d6,20+d0}<?{skill} + {3d6,20+d0}<?{skill} ]] The query for skill (or whatever you want to name it, like difficulty ) will only be prompted once and is used for all rolls. This is a pain, but is doable.
1728607451
GiGs
Pro
Sheet Author
API Scripter
Tuo, you've found that method you crossed out for number 2 doesn't work. There have been many people over the years trying to create a method that does what you are trying to do there, so if you manage it, that will be quite a feather in your cap. But if you can't, don't feel bad - it's been tried many times. I'm curious if it's possible.
You would think you could iterate numeric tables like die rolls, but apparently not. As someone who's usually a player, I usually skip on considering tables, so whenever I do end up looking at them, there's always something weird and awkward about them.
1728608636
GiGs
Pro
Sheet Author
API Scripter
That kind of iteration should be possible, it's long been a thorn in our side that it isn't.
To use rollable tables with target numbers you need to wrap it in a single sub-roll group roll. Such as [[ {100t[3d6 roll] }<12 ]] That will compare the target against each result of the rollable table
Thanks folks for all the suggestions. Ill do my best to wrap my brain around them and see what happens. Is there a doc somewhere that I can reference in regards to how these couple of items work? Also, I just had a crazy idea. If I were to take the time and accurately build a rollable table for numbers 3-18, that would allow me to just click a button to get a number. Is there a way to to stick that inside a macro that would ask for the target number? Actually I'm almost positive there is, I just don't remember how. Then, is there a way to build that into a macro that could ask for the number of times I want it to do it? Sorry, I haven't built macros n such for a couple of years, so I'm extremely rusty. Hopefully I'm not just thinking crazy stuff right now.
For sure, a query is constructed as ?{label|items}, so if you have for example ?{target|10}, that prompts for an entry that defaults to 10 - so if you do [[{ 1t[3d6-roll] }<?{target|10}]], you are prompted for the target number that the table is rolled against, and if you do  [[{ ?{number of rolls|1}t[3d6-roll] }<?{target|10}]] you are prompted for how many times you want to roll, too.
Also, the weights you want for the table are as follows: 3: 1 4: 3 5: 6 6: 10 7: 15 8: 21 9: 25 10: 27 11: 27 12: 25 13: 21 14: 15 15: 10 16: 6 17: 3 18: 1
Tuo said: Also, the weights you want for the table are as follows: 3: 1 4: 3 5: 6 6: 10 7: 15 8: 21 9: 25 10: 27 11: 27 12: 25 13: 21 14: 15 15: 10 16: 6 17: 3 18: 1 You just saved me a ton of time. THANKS!
Tuo said: For sure, a query is constructed as ?{label|items}, so if you have for example ?{target|10}, that prompts for an entry that defaults to 10 - so if you do [[{ 1t[3d6-roll] }<?{target|10}]], you are prompted for the target number that the table is rolled against, and if you do  [[{ ?{number of rolls|1}t[3d6-roll] }<?{target|10}]] you are prompted for how many times you want to roll, too. Awesome. Thanks. Ill play with this later (very busy atm building tomorrow's maps), but this is gold. THANKS!
Tuo said: For sure, a query is constructed as ?{label|items}, so if you have for example ?{target|10}, that prompts for an entry that defaults to 10 - so if you do [[{ 1t[3d6-roll] }<?{target|10}]], you are prompted for the target number that the table is rolled against, and if you do  [[{ ?{number of rolls|1}t[3d6-roll] }<?{target|10}]] you are prompted for how many times you want to roll, too. Hey Tuo, I know it's been a few days but I just got around to trying this out. It "appears" to work fine and just returns a 0 or a 1. Im assuming 0 is fail and 1 is success. Since I "need" to know if the number is a crit (high or low), I need to also display the number. Sooo, I tried this... You roll: [[1t[3D6]]]  [[{1t[3D6]}<?{target|10}]]  I was hoping that the call to 3D6 (which is my weighted table, thanks again for the weights), would remain the same and not be re-called. Thereby showing the number and then showing the 0 or 1.  It appeared to work for quite a while until it returned a radically different number. "target" was 10 and it gave me a 1 on a 15. Which implies that it rolled twice. Was that just a mistake or did it actually roll twice? Also, I have 2 problems. 1- < does not do  <=, but if I use that symbol it doesnt work. Is there a different way to say lessthan OR equal to? If not, where can I put a +1 or -1 to make it include the target number. 2- How do I test the whole thing as an if/then.  Reason: if 0 I want it to say "fail" instead of 0, and I want it to say "success" if 1.  (id kill for simple if/then processing!) Thanks for any help you can offer!
1728965563

Edited 1728965603
Gauss
Forum Champion
Hi Rubble,  Regarding problem #1, "<" is the exact same as "<=" in Roll20. Ie, in Roll20 "<" is less than or equal to. 
1728965900
GiGs
Pro
Sheet Author
API Scripter
You're a Pro user, so you can use a script to solve these problems. I'd look into using Scriptcards, since you don't need to learn how to write a script. Regarding your 1 and 2: Gauss has pointed out that < is <= on Roll20. You could change this part <?{target|10} to something like <[[?{target|10}+1]] or <[[?{target|10}-1]]. whichever you need. For #2, 0 is failure and 1 is success. There is no way to do the kind of if-else processing you want to do, or change 0 and 1 to fail and success, in Roll20 dice rolls. But a script can do that, which is why I suggest looking in to that approach.
You're correct, having the same roll formula twice will roll that formula twice, instead of showing the same result twice. But the rolls are stored in the roll index, and you can call them from it with a plenty of caveats, with the formula of $[[X]], where X is the position of the roll in the macro (starting from 0). You also can't do if/else conditioning very straightforwardly with just macros (no scripts), but you can make roll results alter how a template displays. Putting things together, with some more advanced tricks, you get something like this: &{template:default} {{name=Single Check (Target:?{target|10})[collapser](#" style=" display: none; class="showtip" title=) }} {{[1](#)= Fail.[collapser](#" style=" display: none; class="showtip" title=) }} {{[[[{20,[[1t[3D6]]]}<?{target}]]](#)= Success! [collapser](#" style=" display: none; class="showtip" title=) }} {{[0](#)=($[[0]]) }} This isn't the only way to do this, but it's my preferred way. Template rows with the same name overwrite the ones above, and you can trick the parser to not treat a roll as a roll by enclosing it in triple brackets. From there, follows that you can have the check for success that returns 1 or 0 to turn the success row's name into [1](#) or [0](#), and so, which one, Fail or Success is shown. Then, the actual roll result is appended to the end, as the last row always shows, and the $[[0]] calls for the result of the roll. Finally, the collapser elements break down the row structure and make it into a single line, hiding the row names. For multi-roll, you can use this - the individual results aren't shown directly, but you can hover over the result number to see all the individual rolls. &{template:default} {{name=Multi Check (Target:?{target|10})[collapser](#" style=" display: none; class="showtip" title=) }} {{[1](#)= Fail.[collapser](#" style=" display: none; class="showtip" title=) }} {{[[[{1,[[{ ?{number of rolls|1}t[3D6] }<?{target|10}]]}kl1]]](#)= Successes! [collapser](#" style=" display: none; class="showtip" title=) }} {{[0](#)= ($[[0]]) }}
Thanks guys. My #1 was a mistake based on the fact that 2 different calls in the same macro gets 2 different numbers. I was being toyed with when seeing supposedly "=" ones coming up 0. As to all the rest. Thanks for all the info. Im gonna take a few days to chew it all over. The last time I did real programming was around 1991, so Im badly out of practice with anything that looks like it. As to being Pro. That's new for me. Generally speaking I shouldn't be spending that much, but for "reasons" I have that tag this year. If I dive deep into scripts, I'll probably keep it, so thanks for mentioning such. Id like to do it with simple macros if possible just to leave me the option of downgrading without losing tools I may become fond of. Thanks everyone for your input. I really appreciate you taking the time to help educate me.