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

[3.5] Macro/API approach for Shadow Blade Technique

I'm running a 3.5 campaign and I'm trying to set up a macro and/or API method for executing a swordsage's Shadow Blade Technique.  The ability works as follows: Player rolls 2d20.  If he chooses the higher value roll, then the attack proceeds as normal.  If he chooses the lower value then the attack proceeds as normal with an extra 1d6 damage. I am not proficient with writing API scripts (yet), but would certainly be willing to put in the effort if I knew the best way to approach it.  Here are the ways that I thought it could potentially work: Player executes a macro that rolls 2d20.  Player manually inputs roll result, is prompted if lower result is used (which adds the extra 1d6) ( Difficulty: I'm not sure how to get the manual input to register a critical hit, although I could prompt the player to state if it was a critical.  Using two macros for one ability is not very elegant.) 2d20 is rolled, displayed to the player, player is prompted about which to use, the chosen die is used to attack (and 1d6 is added automatically if the lower die is chosen) ( Difficulty: As far as I can tell, this would require roll results to be sent to the chat and then retrieved for placement in the prompt for the player.  This would definitely need an API and (as far as I know) players cannot provide input for an executing API script.) So my question would be, does anybody have any ideas about how to best make this ability function?
1457116637
The Aaron
Pro
API Scripter
Does the player get to know the result of the 2d20 before they choose to use the higher or lower value?
Yes, they can know the result (from my ruling as the DM).
1457120604
The Aaron
Pro
API Scripter
For a non-API solution, I think a two step approach would work best.  The macro would output the rolls and whisper to buttons to the character to pick High or Low, then the button would output the right damage result.  It might be complicated to set that up in the character sheet, less so in a custom macro/character ability.  (Hopefuly Silvyre drops in... ) For the API, I'd do basically the same thing, it would just be easier in some regards. !shadow-blade [[2d20]] Would output the available rolls and two API Buttons (one for higher, one for lower) which could be clicked to output the damage.
Ah, yeah, this shouldn't be too hard with buttons.  I'll post when I get a chance work out the macros.
I'd go with API Command Buttons . /w gm [High](!
[[ 1d8 ]] damage) [Low](!
[[ 1d8 + 1d6 ]] damage)
Great, thanks! I was overthinking this a bit.  Two rolled attacks with the API damage button macro you wrote works wonderfully.
1457147163
The Aaron
Pro
API Scripter
Great!
For completion's sake (and in case anybody looks at this in the future), here is the full macro that I ended up using based on Silvyre and Aaron's suggestions &{template:DnD35Attack} {{pcflag=true}} {{name=@{character_name}}} {{subtags=weaves an illusory double of his @{weapon1name} that mirrors his attack}} {{attack1=hitting AC[[@{weapon1attackcalc}]]}} {{critconfirm1=Crit?:[[@{weapon1attackcalc}]]}} {{fumbleroll=Fumble}} {{damage1=.}} {{critdmg1=[[@{weapon1crit}]] crit dmg}} {{fullattackflag=[[0d1]]}} &{template:DnD35Attack} {{attack1=or AC[[@{weapon1attackcalc}]]}} {{critconfirm1=Crit?:[[@{weapon1attackcalc}]]}} {{fumbleroll=Fumble}} {{damage1=.}} {{critdmg1=+[[@{weapon1crit}]] crit dmg}} {{fullattackflag=[[0d1]]}} /w gm [High](!
Striking with his true weapon for [[ @{weapon1damage} ]] damage) [Low](!
Hitting with both weapons for [[ @{weapon1damage} + 1d6 ]] damage)