Look up die roll on table

1500242988

Edited 1500243241
So I am looking for an easy way hopefully with a macro to roll a die (its an exploding die, but whatever) and then have chat spit out what that die roll equals on a specific "die roll" table.  For instance, die rolls, then chat says "Roll: 17 From Table: +6". I have a PowerCards macro below that does this very thing, but I am looking for a way to throw the 3d dice, then have the player input his total to look up the bonus on the table.  This doesn't HAVE to be on a PowerCard. !power {{ --txcolor|#FFFFFF --bgcolor|#e58900 --titlefontshadow|none --name|Bonus Roll --Roll:| [[ [$R] 1d20!10!!20cs10cs>20 ]] --?? $R == 1 ?? Bonus:| -10 --?? $R == 2 ?? Bonus:| -8 --?? $R == 3 ?? Bonus:| -6 --?? $R == 4 ?? Bonus:| -6 --?? $R == 5 ?? Bonus:| -4 --?? $R == 6 ?? Bonus:| -4 --?? $R == 7 ?? Bonus:| -2 --?? $R == 8 ?? Bonus:| -2 --?? $R == 9 ?? Bonus:| -1 --?? $R == 10 ?? Bonus:| -1 --?? $R == 11 ?? Bonus:| 0 --?? $R == 12 ?? Bonus:| 0 --?? $R == 13 ?? Bonus:| 1 --?? $R == 14 ?? Bonus:| 1 --?? $R == 15 ?? Bonus:| 2 --?? $R == 16 ?? Bonus:| 3 --?? $R == 17 ?? Bonus:| 4 --?? $R == 18 ?? Bonus:| 5 --?? $R == 19 ?? Bonus:| 6 --?? $R == 20 ?? Bonus:| 7 --?? 21 <= $R AND $R <= 25 ?? Bonus:| 8 --?? 26 <= $R AND $R <= 30 ?? Bonus:| 9 --?? 31 <= $R AND $R <= 35 ?? Bonus:| 10 --?? 36 <= $R AND $R <= 40 ?? Bonus:| 11 --?? 41 <= $R AND $R <= 45 ?? Bonus:| 12 --?? 46 <= $R AND $R <= 50 ?? Bonus:| 13 --?? 51 <= $R AND $R <= 55 ?? Bonus:| 14 --?? 56 <= $R AND $R <= 60 ?? Bonus:| 15 --?? 61 <= $R AND $R <= 65 ?? Bonus:| 16 --?? 66 <= $R AND $R <= 70 ?? Bonus:| 17 --?? 71 <= $R AND $R <= 75 ?? Bonus:| 18 --?? 76 <= $R AND $R <= 80 ?? Bonus:| 19 }}
1500247098

Edited 1500247511
I guess I can create a table for every possible die roll (Table-1 through Table-100) and then use [[ 1t[Table-[[ (1d20!10!!20cs10cs>20) ]]]] ]]? If this is indeed the easiest way, I have a question.  In each of my tables the result is something like "+4" (not in quotes).  When the roll calls the table, though, it only puts the number (4 in this case) in chat - without the plus sign.  How can I include it?
1500255054

Edited 1500255127
Silvyre
Roll20 Mod Team
Give this a shot with 3D dice: Bonus: [[ -10 + {2,2,3,3,5,5,7,7,9,11,13,15,16,17,18,19,20,21,26,31,36,41,46,51,56,61,66,71,76}<[[1d20!10!!20]] ]]
1500306888
Thanks, Silvyre.  Sure wish I would have seen this before I MADE 100 TABLES. Can you explain to me the difference between the two rolls?  The 1d20!10!!20cs10cs>20 as opposed to 1d20!10!!20.
1500316774
Also, this game (Torg Eternity) has a weird d6 exploder that only counts as 5 when you roll a 6 then reroll.  Do I need something other than "1d6!p"?
1500345115

Edited 1500345185
Silvyre
Roll20 Mod Team
TiaMaster said: Can you explain to me the difference between the two rolls?  The 1d20!10!!20cs10cs>20 as opposed to 1d20!10!!20. The cs10cs>20 adds roll highlighting to rolls of 10 (which explode ) and 20 (which compound ). TiaMaster said: Also, this game (Torg Eternity) has a weird d6 exploder that only counts as 5 when you roll a 6 then reroll.  Do I need something other than "1d6!p"? Not familiar with the system, but  Penetrating Dice will subtract 1 from the total roll for every die that explodes. So, it sounds like you should be good with 1d6!p
1500687974
Silvyre thank you for all the help you've been giving me. This script allows me to input a die roll and it spits out a Bonus Number that correlates to that roll range. !power {{ --txcolor|#FFFFFF --bgcolor|#7A007A --titlefontshadow|none --name|Check Bonus Number --Roll Total:| [[ [$R] ?{Total|0} + 0d0 ]] --?? $R == 1 ?? Bonus:| -10 --?? $R == 2 ?? Bonus:| -8 --?? $R == 3 ?? Bonus:| -6 --?? $R == 4 ?? Bonus:| -6 --?? $R == 5 ?? Bonus:| -4 --?? $R == 6 ?? Bonus:| -4 --?? $R == 7 ?? Bonus:| -2 --?? $R == 8 ?? Bonus:| -2 --?? $R == 9 ?? Bonus:| -1 --?? $R == 10 ?? Bonus:| -1 --?? $R == 11 ?? Bonus:| 0 --?? $R == 12 ?? Bonus:| 0 --?? $R == 13 ?? Bonus:| 1 --?? $R == 14 ?? Bonus:| 1 --?? $R == 15 ?? Bonus:| 2 --?? $R == 16 ?? Bonus:| 3 --?? $R == 17 ?? Bonus:| 4 --?? $R == 18 ?? Bonus:| 5 --?? $R == 19 ?? Bonus:| 6 --?? $R == 20 ?? Bonus:| 7 --?? 21 <= $R AND $R <= 25 ?? Bonus:| 8 --?? 26 <= $R AND $R <= 30 ?? Bonus:| 9 --?? 31 <= $R AND $R <= 35 ?? Bonus:| 10 --?? 36 <= $R AND $R <= 40 ?? Bonus:| 11 --?? 41 <= $R AND $R <= 45 ?? Bonus:| 12 --?? 46 <= $R AND $R <= 50 ?? Bonus:| 13 --?? 51 <= $R AND $R <= 55 ?? Bonus:| 14 --?? 56 <= $R AND $R <= 60 ?? Bonus:| 15 --?? 61 <= $R AND $R <= 65 ?? Bonus:| 16 --?? 66 <= $R AND $R <= 70 ?? Bonus:| 17 --?? 71 <= $R AND $R <= 75 ?? Bonus:| 18 --?? 76 <= $R AND $R <= 80 ?? Bonus:| 19 }} Is there any way to do this without PowerCards?  I would rather use a default Roll Template.  I based this off of your post above, but it didn't work. &{template:default} {{name=Action Check}} {{Bonus=[[ -10 + {2,2,3,3,5,5,7,7,9,11,13,15,16,17,18,19,20,21,26,31,36,41,46,51,56,61,66,71,76}<[[?{Total|0}]] ]] {{note= Add this number to your Skill Value}}
1500695274
Silvyre
Roll20 Mod Team
TiaMaster said: &{template:default} {{name=Action Check}} {{Bonus=[[ -10 + {2,2,3,3,5,5,7,7,9,11,13,15,16,17,18,19,20,21,26,31,36,41,46,51,56,61,66,71,76}<[[?{Total|0}]] ]] {{note= Add this number to your Skill Value}} [[?{Total|0}]] ]] {{ You're missing }} after [[?{Total|0}]] ]]
1500736379
Hey again, Would you mind showing me how to include the Input number elsewhere in the macro? So if I wanted the template to say: Die Roll 33 Bonus 10 Note Blah
1500736768

Edited 1500736865
Silvyre
Roll20 Mod Team
&{template:default} {{name=Action Check }} {{Total=[[ ?{Total|0} ]] }} {{Bonus=[[ -10 + {2,2,3,3,5,5,7,7,9,11,13,15,16,17,18,19,20,21,26,31,36,41,46,51,56,61,66,71,76}<[[?{Total}]] ]] }} {{note= Add this number to your Skill Value }} If you want to use a dice roll instead of a Roll Query, you would have to use either the original macro I posted (which relies on the inline roll tooltip and/or 3D Dice to convey the original dice roll) or PowerCards, as there is no way to reference roll results without the API. &{template:default} {{name=Action Check }} {{Bonus=[[ -10 + {2,2,3,3,5,5,7,7,9,11,13,15,16,17,18,19,20,21,26,31,36,41,46,51,56,61,66,71,76}<[[1d20!10!!20]] ]] }} {{note= If not using 3D Dice, hover over the Bonus to view the original roll. Add this number to your Skill Value }}
1500741506
I wasn't clear (I'm bad at this). I would like to have the player input the die roll into the field that pops up, but I would like the output to include the input value AND the bonus number, like in the table I posted. So, something like: &{template:default} {{name=Action Check}} {{Die Roll=[[?{Total|0}]] }} {{Bonus=[[ -10 + {2,2,3,3,5,5,7,7,9,11,13,15,16,17,18,19,20,21,26,31,36,41,46,51,56,61,66,71,76}<[[?{Total|0}]] ]] {{note= Add this number to your Skill Value}} But in that case (since I am obviously doing it wrong) it would ask for the input value twice instead of just once.  Maybe I need to be able to put the input value in a variable so I can reference it multiple times within the macro?
1500744660
Silvyre
Roll20 Mod Team
Silvyre said: &{template:default} {{name=Action Check }} {{Total=[[ ?{Total|0} ]] }} {{Bonus=[[ -10 + {2,2,3,3,5,5,7,7,9,11,13,15,16,17,18,19,20,21,26,31,36,41,46,51,56,61,66,71,76}<[[?{Total}]] ]] }} {{note= Add this number to your Skill Value }} Did you try this macro? It sounds like it does what you're describing.
1500747606

Edited 1500749301
my GOD your smart at this stuff.  Why is there a question mark in front of the second {Total}? Let me think about my question here... How does the second [[?{Total}]] refer back to the original that got the input? Also, I have this macro to make some other macros appear in a template: &{template:default} {{name=Roll Macros}} {{Choose:=[Bonus Dice](! & # 1 3 ;#Bonus-Dice) [Skilled](! & # 1 3 ;#3D-Skill-Check) [Unskilled](! & # 1 3 ;#3D-Unskilled-Check) }} (without the spaces) However, after I save it, it becomes this: [quote]&{template:default} {{name=Roll Macros}} {{Choose:=[Bonus Dice](! #Bonus-Dice) [Skilled](! #3D-Skill-Check) [Unskilled](! #3D-Unskilled-Check) }}[/quote] I don't know how to make the "! & # 1 3 ;" stay put. I obviously don't know how to quote something in this forum...
1500760651
Silvyre
Roll20 Mod Team
TiaMaster said: How does the second [[?{Total}]] refer back to the original that got the input? When you Submit a Roll Query , every following Roll Query that shares the same name takes on the value of the first. TiaMaster said: I don't know how to make the "! & # 1 3 ;" stay put. From the Wiki: Note: At this time, reopening a Macro saved under the Collections tab of the Sidebar causes HTML entities within to be reverted; if the Macro is then saved, so are those reversions. This behavior is not present within Abilities .