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! Looking for macro code for Arcane Strike D&D 3.5

Hi there fellow nerds!  I'm trying to work out a code for players to input a variable bonus on attack rolls (level of spell being burned) and a damage bonus based on this variable (d4 times the level of the spell being burned). Right now I'm using +?{Arcane Strike?|0}[Arcane Strike] as the attack modifier and that is working fine, but I can't figure out the coding to take that variable and input it as Xd4 in the damage side of things. My crummy solution right now is to allow another input for damage where they just manually put in Xd4, but it feels so unpolished and sloppy to me. The attack modifier can carry over to damage without further input with static numbers; I've tested and made those work on things such as point blank shot and defending weapon enchantments, but pulling a static number to a dice roll eludes me. Anyone have any suggestions on how I might proceed? 
1476892199
The Aaron
Pro
API Scripter
Somethign along the lines of this will work, provided it is in the same macro: [[ 1d20 + @{some_stat} + ?{Arcane Strike|0|1|2|3|4|5|6|7|8|9}[Arcane Strike] ]] to hit [[ 1d8 + @{some_stat} + ?{Arcane Strike}d4 [Arcane Strike] ]] to damage The first use of ?{SOMETHING} sets the value for it, later uses of ?{SOMETHING} will then have the same value.  You don't need to repeat arguments on later instances of ?{SOMETHING}.  I made your list a dropdown selection, rather than a text entry just to prevent the possibility of typing in something like 'bob' instead of a number.  Also, the question will be phrased with a ? already, so no need to put that in the query.
1476892223
The Aaron
Roll20 Production Team
API Scripter
(Moving to Specific Use Questions -- the API forum is for the Javascript API)
1476892319
Ziechael
Forum Champion
Sheet Author
API Scripter
Hi Josh, you can use [[?{Arcane Strike?}]]d4 in your damage output to add the appropriate extra dice :)
1476892358
Ziechael
Forum Champion
Sheet Author
API Scripter
Dammit Aaron, can you move house again so the rest of us can be 'helpful' for a change!
1476892421
The Aaron
Pro
API Scripter
(BWHAHAHAHAHAHA!)
1476893726

Edited 1476894157
Thanks guys, that helps a lot. I'll have to remember that little trick when I'm writing macros later.