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

Help with Macro - Spell Casting and Effect rolls

August 28 (12 years ago)
BravestPlace
KS Backer

Hi guys - I don't know how far your nesting of macros will go but is it possible to create the following 'style' of macro (playing in Spellcraft & Swordplay old school D&D) - example:

Cleric casting Heal Light Wounds - it's a fixed roll of 2D6+1 - succeeds on 4+ )a roll total of 3 indicates double 1 was rolled therefore it's a fumble), if the roll succeeds roll 1D6+1 for amount healed

If this style of macro can be created then I can use it for all of the spellcasters who have fixed values for success for their spells and also fixed rolls to cast

thanks in advance for the help


August 28 (12 years ago)

Edited August 28 (12 years ago)
Gauss
Forum Champion

/roll {2d6+1, 0d1}>4 will tell you if 2d6+1 is a success or not.
Note: the reason there is a ", 0d1" is so that it is totaling the 2d6+1 and then checking rather than checking 1d6+1 and 1d6+1. 

However, we do not have "if, then" statements in our macros so I suggest you roll your 1d6+1 normally. 

Here is an example Macro I would build: 

Macro name: Heal Light Wounds

Macro body: 
/me attempts to heal ?{insert name here}
/roll [Heal check] {2d6+1, 0d1}>4
/roll [amount healed] 1d6+1

Alternately, I could do this in inline: 
Inline macro body: 
/me attempts to heal ?{insert name here}
Heal Check [[{2d6+1, 0d1}>4]] successes for [[1d6+1]] healing

If I misunderstood what you are looking for please let me know. 

- Gauss

August 28 (12 years ago)
BravestPlace
KS Backer

Hi Gauss,

Thanks for the rapid reply - I've tested the inline macro and get the following:

first line works

second line - the Heal Check always produces a roll of 1 just the box colour changes - is that correct?

second line - the amount healed varies correctly

August 28 (12 years ago)

Edited August 28 (12 years ago)
Lithl
Pro
Sheet Author
API Scripter

Alan Bates said:

Hi Gauss,

Thanks for the rapid reply - I've tested the inline macro and get the following:

first line works

second line - the Heal Check always produces a roll of 1 just the box colour changes - is that correct?

second line - the amount healed varies correctly

When rolling successes (the >4 portion of the roll Gauss posted), the result is going to be the number of times you succeed -- 0 times (fumble, rolling a 3 on the 2d6+1) or 1 time (rolling 4+ on the 2d6+1), in this particular case. The fact that you keep seeing a 1 is likely correct, since the chance of a fumble is low; you should see a 0 if you fumble.

The color around the box indicates dice hitting their maximum or minimum. A red border means one or more dice hit their minimum. A green border means one or more dice his their maximum. A blue border means one or more dice hit their minimum and one or more dice hit their maximum. Any other case will simply have solid yellow. So, if you roll anywhere from 1,1 to 1,5 on your 2d6, you'll get a red border. If you roll anywhere from 2,6 to 6,6, you'll get a green border. If you roll 1,6 you'll get a blue border.

Note that if you hover your mouse over the yellow area, you should get a popup showing you the exact results of the roll.

August 28 (12 years ago)
BravestPlace
KS Backer

Hi Brian - that's fantastic thanks for clarifying that - is there any way to change line 1 so that instead of typing a name in I can click a character tile?  If so what properties does the tile need to have?

many thanks

Alan

August 28 (12 years ago)

Edited August 28 (12 years ago)
Gauss
Forum Champion

No, there is no way to click a character tile to insert a name. Sorry. You could just remove the Query and leave it nameless. Heck, the /me aspect isnt necessary either. :)

(Note: The API might be able to do this, you'd have to check with the API guys and be a Mentor.)

- Gauss

August 28 (12 years ago)

Edited August 28 (12 years ago)
Lithl
Pro
Sheet Author
API Scripter

Gauss said:

 The API might be able to do this, you'd have to check with the API guys and be a Mentor.

The API can detect the player's currently selected token(s) when they send an API command, but non-GM players can only select tokens they control.
August 28 (12 years ago)
Gauss
Forum Champion

Thanks Brian. :) 

- Gauss