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 for 2 attacks with different modifiers on the same roll

February 13 (3 years ago)

Hello,

I am trying to build a macro with very limited knowledge of the system to execute 2 attacks with 2 different weapons.  The only catch is it must be done on the same dice roll.

The game system uses a single attack roll for dual wield attacks.  In my case, the two weapons I use have different attack modifiers and deal different damages.
The game system requires a d100 roll to determine the attack success/fail  (current character rolling a 93 or higher fails the attack - critical hit=92)

Essentially, I would like to run the macro to roll a d100 and then call a modifier from 1 attack modifier, then reusuing that same d100 roll add a different modifier for a different weapon

The flow would hopefully be like:
>Roll 1d100 (example roll number of 75)

>Add modifier 1 of 11 (the result is 75+11 = 86)
>Roll damage of Weapon 1

>Re-use the d100 roll of 75
>Add modifier 2 of 22 (the result would be 75+22 = 95)
>Roll damage of Weapon 2 (although rolling a 95 would be a fail, so it would miss)


Is this possible ?

February 13 (3 years ago)
Kraynic
Pro
Sheet Author

The dice roller is a very simple engine that makes rolls and spits them out.  It does not remember what a roll was once it is made and the immediate calculation is done.  If you have multiple parts of a calculation, you can get the dice roller to display individual calculations, though they are only for display and can't be used as part of a different calculation. 

So, let us say you have your d100 roll and add an attribute as the primary roll and calculation, then you add a second attribute and subtract the first one as the secondary calculation.  That might look something like this:

[[[[1d100 + @{attribute1}]] + @{attribute2} - @{attribute1}]]

Calculations can be displayed using a sort of odd syntax with the first roll (innermost in this case) being $[[0]] with the second (outermost) being $[[1]].

I don't know what sheet you are using or what roll templates you may have access to, so I will just demonstrate using the default template.  The calculation I posted above is going to be run outside the template, so it won't display except where I specify using the display commands. I am using this on a sheet that had simple attributes of ps and pp, so I used those for the attributes to call for this test/demonstration.  You would want to replace them with whatever attributes your sheet is using.

&{template:default} {{name=Two Attacks}}[[[[1d100+@{ps}]]+@{pp}-@{ps}]] {{Attack 1=$[[0]]}} {{Damage 1=[[1d6]]}} {{Attack 2=$[[1]]}} {{Damage 2=[[1d6]]}} 


February 13 (3 years ago)
GiGs
Pro
Sheet Author
API Scripter

That is the method I'd suggest. You create the first roll, then subtract anything not in the second roll and add in the second roll modifiers, and voila you have the second total.

February 16 (3 years ago)

Awesome.  I was starting to think I was trying to do the impossible - turns out I am.  This should work well enough though.  Thank you so much  (: