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

Macro with Multiple Variables

1387629541

Edited 1387629548
Tom
Pro
Sheet Author
Is it possible to build a dice pool macro that responds to a second variable after successes are generated? So the system (Witch Hunter 2nd Ed) uses a dice pool system based on two variables. The player rolls a number of d10s that need to equal or exceed a certain target number (6 or 7) to count as a success, then equal or exceed a certain Difficulty in successes for the test to be successful. This is especially the case during melee when the Difficulty is set by the opponent's Avoidance score (usually between 2 and 5). right now, I have the first part represented in a macro just fine: /roll [[Weapon Damage+@{Strength}+@{Melee}]]d10!10>7 vs @{target|Avoidance} What I'd really like to do is apply that target difficulty to the roll as part of the macro, but it needs to affect the successes, not the dice rolled. Is there a way to do that? Something like... /roll ([[Weapon Damage+@{Strength}+@{Melee}]]d10!10>7) - @{target|Avoidance} = net successes How would I do that? Could I do that? (I seem to be running up against the API wall pretty regularly these days.)
1387655094
Gauss
Forum Champion
It looks like you already came up with the solution. Your second macro should work.
1387656098
Tom
Pro
Sheet Author
Well what do you know?! It works! Holy crap. Thanks, Gauss. For...nothing? ;)
1387656582
Gauss
Forum Champion
NP, always happy to do nothing. :)
1387658359
Tom
Pro
Sheet Author
Ok now, found something for you math geniuses (of which I am not one). Let's put it to the test. The trick with this macro is that 0 successes is actually a "success", as it meets the Difficulty of the test. Easy. Done. But what about Damage. A "0 successes" result would actually be 1 point of damage. So with this being the macro... /roll ([[2+@{Strength}]]d10!10>7sd)-@{target|Armor} vs @{target|token_name}'s Armor for Damage Dealt ...how would you rewrite the latter half so that it gives you a +1 success result for "0 successes"? I tried "@{target|Armor}-1" but that gave me an extra success when the target had no armor (0 armor). So I'm going to leave this challenge to my mathematical betters and go make more Holiday Chex Mix! Hasta! ;)
1387661127
Sam
Sheet Author
For clarification, if the result is already 1 success what should happen? Should the +1 be added to it to make it 2 successes or should it still be just the 1 success?
1387714202
Tom
Pro
Sheet Author
Samuel T. said: For clarification, if the result is already 1 success what should happen? Should the +1 be added to it to make it 2 successes or should it still be just the 1 success? It should just be 1 success. Also, since its damage, it could have a minimum (floor?) of 0 successes. As in, if you miss fail the roll by 3 successes, it just says you rolled 0 successes. The attack version gives you a negative score, which is important since 0=success in that case. Not so with damage...if that can be done.
1388506793
Tom
Pro
Sheet Author
Holiday limbo bump
Is it possible to create a macro that does something like this? (8d10+12)-y Where "y" is a % of the damage dealt by the 8d10+12.
1391062727

Edited 1391063090
Black.k.9 said: Is it possible to create a macro that does something like this? (8d10+12)-y Where "y" is a % of the damage dealt by the 8d10+12. There's a problem. I need a way for this to work. damage-(damage*((@{armor}*1.3)/100)) I need to store "damage" in a temporary variable.
1391079399
Gauss
Forum Champion
Currently, you would need the API (a mentor level feature) for this.
1391106545
Tom
Pro
Sheet Author
Thanks guys. After this thread was quiet for so long, I bumped it over to a new thread. In the end, I had a revelation that I had things backwards. The damage roll works just fine with 0 successes. It was the to hit roll that needed a bump. Here is a link to the follow up thread if anyone is interested in how things worked out. Brandon W outdid himself with the formula gymnastics!