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

Degrees of Success (macro advice request)

1434755871

Edited 1434756248
"Degrees of Success" is a mechanic used in Dark Heresy, Rogue Trader and related Warhammer 40K table top games. It measures by how much the target number has been beaten/lost by on the die roll. Oftentimes each degree of success results in added effects, for example an attack my gain +1 hit for each degree of success. Going over the Wiki, I was unable to find any sort of ability to save an output of an inline roll/calculation to be used later in the macro. For example, a roll/calculation ends up with (x) degrees of success, which means that the attack has (x+1) hits. I wish to then use this (x+1) in the damage rolls. If the inline roll calculation for Degrees of Success is: x then number of hits will be: (x+1) A single damage roll is: [[d10+2]] then I want the damage for the multiple hits from the Degrees of Success to be: [[(x+1)d10+{(x+1)+2}]] ... If there is no way to save the output of a roll/calculation as a variable to be used later, are there any suggestions for how best to deal with Degrees of Success resulting in multiple hits? Currently my solution is simply to have an inline roll calculate degrees of success, then a list of multiple damage rolls. The user reads the degrees of success and then counts up as many of the damage rolls as is proper given the specific rules for the situation, ignoring the extra rolls. If there is not enough extra damage rolls, the user would then either replay the macro (ignoring everything except for the extra damage rolls needed) or manually enter the extra damage rolls they need.
If you're willing to go for a mentor subscription, you can use the API for this (existing Extended Expressions and PowerCards scripts have at least some ability to refer to prior rolls in later calculations). Failing that, you have two options of varying degrees of user-friendliness: 1) You can operate only on degrees of success, and use math to ensure your damage is 0 (or less) in cases where your roll didn't succeed: [[(@{attack}-@{defense}+1)d11r1]] This uses the fact that "d11r1" (roll a d11 and reroll 1's until they aren't 1's anymore) is mathematically equivalent to "d10+1", so rolling "(@{attack}-@{defense}+1)d11r1" is equivalent to "(@{attack}-@{defense}+1)d10 + @{attack} - @{defense}". In this case, you'll either have to add 2 yourself whenever the result is greater than 0, or add 2 in the formula and ignore results that are equal to 2. 2) You can use an input query to get the degrees of success for your damage roll: [[(?{Degrees of Success|0}+1)d10 + ?{Degrees of Success} + 3]] This will pop up a box with the prompt "Degrees of Success", then take what you enter and substitute it into the formula. The drawback here is that the query is handled before anything else, so if you put the attack and damage rolls into one macro together, you'll be prompted for degrees of success before you roll to hit.
1434757470
Lithl
Pro
Sheet Author
API Scripter
There is no means to save a roll. Another solution would be have an attack macro and a damage macro, with the damage macro using a roll query to ask for the degrees of success. ?{Degrees of success|1}
1434810161

Edited 1434811163
At this time I'll consider between an imperfect single macro or separate "Degrees of Success" and "Damage" macros. To my understanding this was going to be the case, but I wanted to make sure with people more knowledgeable on the subject before giving up (or spending more time on fruitless efforts). That d11r1 trick is very interesting, at the very least I shall add that to my repertoire! Another related issue that I am unsure of, what if there are a maximum number of hits? For example, one weapon might have two maximum hits, while another might have six or even ten (one hit, plus one additional hit for every degree of success, up to a stated maximum number of hits for the certain weapon). My initial thinking on this might be that it might be outside the scope of the dice roller, and would also require the API? Thank you for the prompt and helpful responses.
1434831451
Lithl
Pro
Sheet Author
API Scripter
If you have separate macros for hitting and dealing damage, you could do something like this: [[[[{?{Degrees of Success|0}, 6}kl1]]d10]] That would take the smaller between the Degrees of Success you enter and 6 as the number of d10s to roll for damage, effectively putting a maximum of 6 on the damage roll.
1434904512

Edited 1434904644
That's a good idea to cap the amount of dice rolled, thanks. I incorporated several of these tips into another macro, specifically a "Bombing run" macro for starship combat in Rogue Trader. One issue with that particular macro is that have not found a way to display a second target number for degrees of success. To elaborate, for bombing runs there is the initial target to roll under, the "To-hit" roll. If four degrees of success are scored, it counts as a critical hit in this specific case for starship combat. Nesting the "To-Hit" calculation into the to damage roll: [[degrees of success calculation]]d14r<4 While putting a cap on the total hits (total hits = 3 +1 for each bomber squadron after the first): [[3+floor([[?{Total # of Bomber Squadrons|2}-1]])]] The actual d100 roll, and Degrees of Success being partially obscured, it is impossible to determine if four or more degrees of success are scored if only a single bomber squadron is used. Is there any trick I can use to display 4 or more degrees of success while the total damage dice are being capped to 3 (therefore only displaying Degrees of Success up to 3 in this case, where 4 is an important threshold). I tried using "cs<[[target number]]" on the actual d100 roll, however to my understanding Critical Success/Failure is only showed on a roll if it is not nested too deeply. My current solution to this is only to use this macro for cases where there are two or more bomber squadrons involved in bombing runs, while either making another macro, or rolling it manually in the rare case there is only a single bomber squadron. ... On a vaguely related note, I'm considering that if I'm happy with these macros, at a later point I'll add them, or at least some of the basic components of them and/or templates to the wiki, as I noticed a complete lack of Rogue Trader starship macros on the Roll20 wiki. I assume this would be appreciated? PS: unrelated question: how do I put those fancy quotes around my code in these posts? I tried the common "[quote][/quote]" commands and those didn't work.
1434905740
The Aaron
Roll20 Production Team
API Scripter
Formatting a Post When posting on the Forums, you have several formatting options at your disposal. Generally, you can get away with just posting raw text as you write it, but there are some times when formatting can help get your point across more clearly. When posting Macros, Dice Expressions, or API Code Snippets, consider using the Code format option, available by clicking the paragraph symbol ( ¶ ) and selecting it from the list. From: <a href="https://wiki.roll20.net/Forum_Posting" rel="nofollow">https://wiki.roll20.net/Forum_Posting</a>