I have a rogue in my party that just started playing in a high level campaign of mine who chose a mythic ability called Fickle Attack. I wish to make it easier on him by making a macro that does the hard stuff for him, but I'm having trouble figuring out the math based conditionals. The ability reads as follows:

Fickle Attack (Ex): Whenever you roll damage for a melee or ranged attack with a weapon or alchemical item, you can treat any natural 1s on the damage dice as if they were the highest possible number on those dice. You can select this ability up to three times. The second time you select it, treat 1s and 2s as the highest value. The third time, treat 1s, 2s, and 3s as the highest value.

How might I put this into a Roll20 macro for him?

What I'm tinkering with currently is kind of a mess. This is what it looks like:

/r [[ { {[[6d6<2]],3}<2 }*(6) + [[1d4 + 2]]]] 

This is definitely totally off, but every route I go I run into the same problem. There is no way to store inline numbers. I can't do this:

/r (1d6) * (number that I rolled).

…so in this example it just squares the number. Unless I'm missing something, I doubt I can make this macro happen, which will slow my game considerably due to my rogue having 6–7 attacks per round and all will likely be sneak attacks.

The problem I am facing is that results of the dice roll cannot be used later in that line of code. After the dice is rolled, I need to use the result after it is set.

  • 1
    \$\begingroup\$ @SevenSidedDie thank you for the edit. :D \$\endgroup\$ – rebullet00 May 28 '18 at 2:05
  • 1
    \$\begingroup\$ I'm not an expert on Roll20 syntax, and this might verge on "answering in comments", but it is possible to nest inline rolls in Roll20, per this Roll20 wiki page. \$\endgroup\$ – V2Blast May 28 '18 at 3:00
  • 1
    \$\begingroup\$ you are correct that inline dice roll results can replace numbers but the results of the dice roll cannot be used later in that line of code. that is the problem im facing. after the dice is rolled i need to use the result after it is set. \$\endgroup\$ – rebullet00 May 28 '18 at 6:17
  • 1
    \$\begingroup\$ Ah, I see what you're asking now. I'm not sure that's possible. \$\endgroup\$ – V2Blast May 28 '18 at 6:41
  • \$\begingroup\$ I added that piece of the problem to your question. \$\endgroup\$ – KorvinStarmast May 28 '18 at 15:56

Roll20 text macros do not support conditional statements based around die results for free users. To do this, you need access to their scripting APIs, which require a Pro subscription. You can read more about the subscriber models here.

What you could do, if you do not mind slight clutter in the chatlog and doing some maths, is to keep a note in the macro to remind which numbers are to be replaced by which number such as:

Fickle Attack: [[6d6 + 1d4 + 2]] damage!
(Replace all [[1]] with [[6]] or [[4]])

And apply as appropriate.

(I would consider raising a separate question, if it hasn’t already been asked, about if Fickle Attack applies to Sneak Attack also.)

| improve this answer | |
  • \$\begingroup\$ so i am a pro subscriber. i have found the API script editor for the game. how would i put this code into effect through this editor? \$\endgroup\$ – rebullet00 May 29 '18 at 19:48
  • \$\begingroup\$ @rebullet00 I’ll have to take a closer look at the scripting information available, but I should be able to update the answer with more information later. \$\endgroup\$ – royalmurder May 29 '18 at 20:52
  • \$\begingroup\$ i appreciate man. \$\endgroup\$ – rebullet00 May 29 '18 at 21:04
  • 1
    \$\begingroup\$ also for the PS at the bottom there. sneak attack damage is considered as part of the damage of the attack so its the same. jason who is the director of pathfinder design states that here: paizo.com/threads/rzs2kvtr?Rules-Clarification#6 \$\endgroup\$ – rebullet00 May 30 '18 at 0:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.