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 determined by another roll

Hello guys I've been wanting to set a specific macro.. roll d100 < or = 30 - roll5d6 + text1 from 31 to 60 - roll4d6 + text2 from 61 to 70 - roll3d6 + text3 from 71 to 95 - roll3d6 + text4 from 96 to 100 - roll 1d6 + text5 Is it possible ?  
1592847868

Edited 1592847916
Oosh
Sheet Author
API Scripter
Not with a die roll, no. You'd need API & a Pro subscription to write a script for it. But you could set up a Rollable Table to do this with 6:6:2:5:1 weighting on the 5 options.
Oosh said: Not with a die roll, no. You'd need API & a Pro subscription to write a script for it. But you could set up a Rollable Table to do this with 6:6:2:5:1 weighting on the 5 options. But the rollable table won't give me the result of a 1d6 roll.. or a die roll, right?
1592850141
Ziechael
Forum Champion
Sheet Author
API Scripter
You might  be able to make this work without using the API but I'd need to know a bit more about the eventual use case/desired outcome, specifically the text suffix. Does it NEED to be visible or would having the text as part of the tooltip on the dice result be acceptable?
1592880929

Edited 1592881433
Oosh
Sheet Author
API Scripter
But the rollable table won't give me the result of a 1d6 roll.. or a die roll, right? There's a hacky workaround to get inline dice rolling using a Rollable Table . It has to be run through a button, but otherwise would work. First a macro called "d100tod6 roll" or whatever this particular roll is called, simple macro which is just a button: [Roll the d100](`[[1t[ d100tod6 ]]]) Then a Rollable Table called d100tod6 , the first entry would look like this: &{template:default} [[1d6]] {{ $[[0]] = text1 }} rinse & repeat for the other entries, then add the weighting. The button rolls from the Rollable Table on creation - clicking it multiple times will keep pulling the same result. You have to run the button macro every time you want to roll. So not an ideal solution, but some new (I think?) functionality from the Stupid Tricks thread. Having said that.... I'm very interested in Ziechael's solution since you have a non-linear pattern there, I'm struggling to work out how he's going to handle it. That "61 to 70" step in the middle messes up any factoring I can think of... but Ziechael has a brain the size of a planet.
1592916347
Ziechael
Forum Champion
Sheet Author
API Scripter
Oh good, no pressure... I can only assume Oosh means a very very small planet... also probably a gas one... Oosh said: Having said that.... I'm very interested in Ziechael's solution since you have a non-linear pattern there, I'm struggling to work out how he's going to handle it. That "61 to 70" step in the middle messes up any factoring I can think of... but Ziechael has a brain the size of a planet. So, as I alluded you can  sort of do this with a rollable table but it's not the best and personally I hoped I could improve the output a bit more but every avenue explored was a dead-end full of zombies... First off, you need a table, call it whatever (I opted or 'd100b') and give the values the following weightings:   5 [text 1] weighting = 30 4 [text 2] weighting = 30 3 [text 3] weighting = 10 3 [text 4] weighting = 25 1 [text 5] weighting = 5 With that done you can get onto calling the table and enjoying a slightly better formatted output: &{template:default} {{name=Test}} {{Roll=[[[[1t[d100b]]]d6]]}} {{Hover for text=$[[0]] }} At best it gives you fully customisable text output (replace 'text 1' etc with whatever), at worst it gives you a result of the dice AND a visual idea of how many dice were rolled... Sorry it couldn't get any better than that!
Ziechael said: You might  be able to make this work without using the API but I'd need to know a bit more about the eventual use case/desired outcome, specifically the text suffix. Does it NEED to be visible or would having the text as part of the tooltip on the dice result be acceptable? I wanted to roll from the treasure tables on DMG. The solution that I could think is that... I basically created 4 rollable tables, based on the CR range (0-4, 5-10, 11-16, 17+), then created a macro to roll these tables and then ANOTHER macro to summarize it and bring me as a list.