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 .
×

DUSTER macro

Hi, I've recently begun a game of DUSTER, which is a fairly new system. To determine skill checks, we roll 1d6. The result is the number of pips, so 2=2, 3=3, 4=4, 5=5. However, a roll of 6 (crit) appends a +1 (6+1=7), and a roll of 1 (fumble) appends a -1 (1-1=0). Is there any way to make a macro to do this?
1687494977
GiGs
Pro
Sheet Author
API Scripter
I think the only way to do this would be to set up a rollable table, with values 0, 2, 3, 4, 5, 7, each with a weight of 1. Otherwise you'd need Pro subscription and a script.
1687514519

Edited 1687514552
Gauss
Forum Champion
Does the roll get added to anything else after the roll is made?  Could you supply a full example of it's use?
Thanks for the responses! The roll does not usually get added to anything else. Skill values are often added to the roll (either before or after, same difference). Some examples are: Roll a coordination (or any skill) check-> Character has no stat bonus, so they roll 1d6. It's a 2, so the DM likely says they fail the check. Roll a coordination (or any skill) check variant-> Character has +1 physical, so they roll 1d6+1. It's a 6, which awards an additional +1 to the roll, totaling 8 (6+1+1). The DM says they succeed the check with incredible style. Roll to deal damage-> Character has a "wicked hunk of iron on a 10ft chain", which confers -1 to damage. The character rolls 1d6-1. It's a 1, which penalizes with an additional -1, totaling -1 (1-1-1)(0 or below is 0 with regard to damage) Roll to deal damage variant-> Character has a "wicked hunk of iron on a 10ft chain", which confers -1 to damage. The character rolls 1d6-1. It's a 5, totaling 4 (5-1) damage.
1687746129

Edited 1687754522
Gauss
Forum Champion
Hi James,  So unfortunately the moment you said '1d6+1' that requires either mental arithmetic or a Mod (API Script) which requires a Pro account.  If you want to do the mental arithmetic option I can show you how to set up a template that lays it out for easy addition.  If the campaign owner has a Pro account then I would look into a Mod.  See GiGs post below. 
1687752189
GiGs
Pro
Sheet Author
API Scripter
If you use a rollable table. you can do the +1 at the free level. Rollable tables can be used as dice, by using (say) /roll 1t[table-name] +1
1687754475
Gauss
Forum Champion
GiGs said: If you use a rollable table. you can do the +1 at the free level. Rollable tables can be used as dice, by using (say) /roll 1t[table-name] +1 Doh, not sure how I forgot that, good catch. :)
1687763764
GiGs
Pro
Sheet Author
API Scripter
You're welcome. I just noticed there were more elements to the question. Most rolls can be handled like this, but if you have penalties and wan tto limit the rolls to zero, you need some special handling. You could try this: /roll {1t[d6] -1, 0}kh1 but this will return an error. The {value1 , value2, value3}kh1 method works great as long as all the values are dice, or all the values are numbers. You can't mix them. So you have to change that 0 to a dice roll. This is the method I use: /roll {1t[d6] -1, 0d0}kh1 A 0d0 is always going to return a 0, and is technically a dice, so can be used. So this roll will never report a value below zero. All rolls can be presented as inline rolls, so only the actual total is reported, like [[ {1t[d6] -1, 0d0}kh1]] and you can put that inside a rolltemplate.
Okay, thanks a ton! I think I have something pretty close to what I want, but I have some macro specific questions now. I'm sure I'm doing something that simply doesn't work, but I'm not quite sure why. As far as I can figure, {value1, value2}kh1 does not work inside an input modifier choice (not sure what the technical term for it is). Here is my macro. I spaced it out for readability. In short, this macro does not do anything when I submit my choice. ?{Advantage? | Normal, [[ 1t[D6] ]] | Keen,  [[ { 1t[D6], 1t[D6] }kh1 ]] | Snakebit, [[ { 1t[D6], 1t[D6] }kl1 ]] } However, this macro does work, but I'm not sure how I can fix this. ?{Advantage? | Normal, [[ 1t[D6] ]] | Keen,   [[ 1t[D6] ]] | Snakebit,  [[ 1t[D6] ]] } Ideally I would be able to do [[ 2t[D6]kh ]], but it is pretty clear in the docs that 2t[TABLE] does not work inline. I know I'm ignoring modifiers right now. I figure once I get this working I can make the inline be  [[ 1t[D6]+?{Modifier} ]] for that. Any idea how to get an advantage/ disadvantage choice working for this? If it can't be done then so be it, but it'd be nice.
Inside a query , you cannot have any 'control characters' ( | , } ) as they will cause the query to break. For example, on this line: | Keen,  [[ { 1t[D6], 1t[D6] }kh1 ]] as soon as Roll20 gets to the second comma after the [D6], it thinks it is supposed to have another output from another query option. If there wasn't a comma there, then the right brace before the kh1 would make Roll20 think that the query is supposed to close at that point. The usual workaround is to use html escape code. See if this works (untested, so it may have other issues): ?{Advantage?| Normal,[[ 1t[D6] ]]| Keen,[[ { 1t[D6], 1t[D6] }kh1 ]]| Snakebit,[[ { 1t[D6], 1t[D6] }kl1 ]] }
I see. Thanks for the reply! I have created something that feels like an abomination... but it works! For those who may happen upon this forum in the future, here is my macro. &{template:default} {{name= Rolling Dice}} ?{Advantage? | Normal, [[ 1t[D6]+?{Modifier|0}  ]] | Keen,  [[ { 1t[D6], 1t[D6] }kh1+?{Modifier|0}  ]] | Snakebit, [[ { 1t[D6], 1t[D6] }kl1+?{Modifier|0}  ]] } Two things to note: First, it needs a table named D6, with entries named 0 2 3 4 5 and 7. Second, if you paste the code above, then save the macro, then open it again... you will notice that all the html escape code has been replaced with the actual character (so keep a version with the escape code copied in a .txt file or something)
1687904265

Edited 1687904379
Gauss
Forum Champion
James C. said: I see. Thanks for the reply! I have created something that feels like an abomination... but it works! For those who may happen upon this forum in the future, here is my macro. &{template:default} {{name= Rolling Dice}} ?{Advantage? | Normal, [[ 1t[D6]+?{Modifier|0}  ]] | Keen,  [[ { 1t[D6], 1t[D6] }kh1+?{Modifier|0}  ]] | Snakebit, [[ { 1t[D6], 1t[D6] }kl1+?{Modifier|0}  ]] } Two things to note: First, it needs a table named D6, with entries named 0 2 3 4 5 and 7. Second, if you paste the code above, then save the macro, then open it again... you will notice that all the html escape code has been replaced with the actual character (so keep a version with the escape code copied in a .txt file or something) Just a note here: Generally it is recommended that folks don't use Collection Tab macros for macros involving HTML substitution. Instead, use Ability macros in a Macro Mule character. 
1687923814
GiGs
Pro
Sheet Author
API Scripter
There are multiple reasons for Gauss's suggestion but a very relevant one here: that html parsing won't happen. You can open the macro (now ability) without losing the html substutions. You can have it look the same to the players. Say you have a character called Macros, and this ability is called D6, you could also have a macro called d6, whose enter text is &{Macros|d6} As long as the Macros character is set to be Editable By the players, and the macro is set to be Visible to the players, they can use the macro amd never need to know its actually triggering an aility.