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

Can I do a 2d6 typed chart macro?

So this is a bit specific, but I would like a macro that if you click it, the macro will roll 2d6, and give you a result with text depending on what you rolled and in what order. So if you roll a 1 and a 3, it will read out the result for '13'. Or maybe 11-13, 14-16, 21-23 and so on. My assumption is that I will need to have a separate macro with all these results typed out never visible to the players? Or, alternatively, if the macros can't read out results based on the order of how you rolled them, I guess I could do total rolls too.
1676405073
The Aaron
Roll20 Production Team
API Scripter
The best you can do without the Mod Sandbox Perk is to set up a Rollable Table with the right ratios.
The Aaron said: The best you can do without the Mod Sandbox Perk is to set up a Rollable Table with the right ratios. That sounds great. Assume I am a complete beginner at scripting, would you mind giving me more detailed instructions on how to do that? I hope I'm not asking for too much here...
1676411452
The Aaron
Roll20 Production Team
API Scripter
Here is the basic idea if you were just using the probability of the added values for 2d6: For a rollable table, you just create a table and name it what you want.&nbsp; Then add a Table Row for each result.&nbsp; You can look at the probability for any combination of 2d6 here:&nbsp; <a href="https://anydice.com/program/20" rel="nofollow">https://anydice.com/program/20</a> Here's a snapshot of the results: Set the weight to a whole number.&nbsp; Assuming you wanted each of the results as its own line, you might use 278 for the weight for 2, 556 for the weight for 3, etc. Put the result in the name of the table item, that will show when you roll it.&nbsp; (Pro tip: if you preface with a number, you can use it in a mathematical sense also) If you want to combine numbers for a range, say 2-4, just add the % values, such as 1667. You can then roll with something like: [[ 1t[test-table] ]] or /r 1t[test-table] Now, what you're doing is slightly different, you're wanting to concatenate the numbers to values from 11 to 66, In this case, all results have equal probability, so you'd just count each of the 36 possible values as 1 weight, and add them for the possible numbers. So if 11, 12, 13 all have the same result, you could have a row with a weight of 3.&nbsp; You could also have all 36 separate rolls, which has the added benefit of letting you preface each with the number (or include it as part of the text). Let me know if that's sufficient.&nbsp; If not, I can build a quick table like this and show some screenshots.
1676414344

Edited 1676438257
I think it would be a flat distribution with 36 items: 11, 12, 13, 14, 15, 16, 21, 22, etc.&nbsp;
1676435837
GiGs
Pro
Sheet Author
API Scripter
It depends on the table being used. It could be a flat distribution of 36 items, but it might not be given "maybe 11-13, 14-16, 21-23" Dartanous should describe exactly what the table will generate.
The Aaron said: Here is the basic idea if you were just using the probability of the added values for 2d6: For a rollable table, you just create a table and name it what you want.&nbsp; Then add a Table Row for each result.&nbsp; You can look at the probability for any combination of 2d6 here:&nbsp; <a href="https://anydice.com/program/20" rel="nofollow">https://anydice.com/program/20</a> Here's a snapshot of the results: Set the weight to a whole number.&nbsp; Assuming you wanted each of the results as its own line, you might use 278 for the weight for 2, 556 for the weight for 3, etc. Put the result in the name of the table item, that will show when you roll it.&nbsp; (Pro tip: if you preface with a number, you can use it in a mathematical sense also) If you want to combine numbers for a range, say 2-4, just add the % values, such as 1667. You can then roll with something like: [[ 1t[test-table] ]] or /r 1t[test-table] Now, what you're doing is slightly different, you're wanting to concatenate the numbers to values from 11 to 66, In this case, all results have equal probability, so you'd just count each of the 36 possible values as 1 weight, and add them for the possible numbers. So if 11, 12, 13 all have the same result, you could have a row with a weight of 3.&nbsp; You could also have all 36 separate rolls, which has the added benefit of letting you preface each with the number (or include it as part of the text). Let me know if that's sufficient.&nbsp; If not, I can build a quick table like this and show some screenshots. The simplified distribution for 2d6 is as follows: 2 &nbsp;1 3 &nbsp;2 4 &nbsp;3 5 &nbsp;4 6 5 7 &nbsp;6 8 &nbsp;5 9 &nbsp;4 10 3 11 2 12 1
1676517146

Edited 1676517210
Alright, so what I have now are several tables, each having between 5 to 12 results. I want them to be rolled with a 2d6, but each dice rolled separately. For example: 11-15 = Result 1 16-24 = Result 2 25-31 = Result 3 32-36 = Result 4 41-52 = Result 5 53-61 = Result 6 62-66 = Result 7 Hope that's made understandable. Basically the two numbers are always 1-6, and then one is used for the ten digit and the other for single digit. So if one were to click this macro, it's going to roll it, and then display the resulting text. I am a complete beginner at this, and don't really understand much if it's not explicitly explained, but I am pretty sure the test table posted earlier puts the numbers of the dice together? Seeing as 7 is the most frequent result?
Dartanous said: Alright, so what I have now are several tables, each having between 5 to 12 results. I want them to be rolled with a 2d6, but each dice rolled separately. For example: 11-15 = Result 1 16-24 = Result 2 25-31 = Result 3 32-36 = Result 4 41-52 = Result 5 53-61 = Result 6 62-66 = Result 7 Hope that's made understandable. Basically the two numbers are always 1-6, and then one is used for the ten digit and the other for single digit. So if one were to click this macro, it's going to roll it, and then display the resulting text. I am a complete beginner at this, and don't really understand much if it's not explicitly explained, but I am pretty sure the test table posted earlier puts the numbers of the dice together? Seeing as 7 is the most frequent result? I'm a little confused on your math of 5 to 12 results: 11-15 = Result 1: 11, 12, 13, 14, 15 = 5&nbsp; 16-24 = Result 2: 16, 21, 22, 23, 24 = 5 25-31 = Result 3: 25, 26, 31 = 3 32-36 = Result 4: 32, 33, 34, 35, 36 = 5 41-52 = Result 5: 41, 42, 43, 44, 45, 46, 51, 52 = 8 53-61 = Result 6: 53, 54, 55, 56, 61 = 5 62-66 = Result 7: 62, 63, 64, 65, 66 = 5 But if that's the distribution, you could just as easily created a Rollable Table and set those numbers as the weights to get that distribution. You can use this dice formula to get an output of a number created by rolling 1d6 1d6: [[[[[[1d6]][[1d6]]]]d1]] But if you want to then take that number and have it referenced to a table, that would require a Mod script (the game creator would need a Roll20 Pro subscription). I believe one of Timmaugh's scripts can do that (I think it's muler) and it could display the actual numbers rolled and so forth.