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

Debugging homebrew macro 3.5e

Hello! Basically I'm porting a hack for 3.5e to Roll20, one of the big things is adding dice pools to attacks. I've spaghetti'd the code to add a dropdown menu for players to pick how many dice they want to roll, but it's no longer applying any modifiers. ?{How many dice?|1,1d20csk1 | 2, 2d20csk1 | 3, 3d20csk1 | 4, 4d20csk1 } >@{weapon1critmin} +@{bab}[BAB] +?{Which modifier?|Reach,@{weapon1enh}[Weapon Enh] | Speed,@{weapon1focus}[Weapon Focus] | Defense,@{weapon1specialize}[Weapon Spec] } + @{weapon1stat}[Ability] +?{Additional Attack Bonus?|0}[Ad'l Atk Bon]  All of the stuff in bold doesn't seem to be adding to the roll, although it shows up in the roll template on mouseover.  Apologies if this is noob question, first time I'm properly screwing around with macros, thank you in advance!
1611939563

Edited 1611939754
Ziechael
Forum Champion
Sheet Author
API Scripter
Probably the space after your dice selection, get rid of the spaces after each option in your query as it will be 'breaking' the macro. ?{How many dice?|1,1d20csk1 | 2, 2d20csk1 | 3, 3d20csk1 | 4, 4d20csk1 } >@{weapon1critmin} is resolving to xd20csk1 >@{weapon1critmin} which will break the greater than condition... you'll also likely want to swap your k1 and cs syntax too: ?{How many dice?|1,1d20k1cs| 2, 2d20k1cs| 3, 3d20k1cs| 4, 4d20k1cs}>@{weapon1critmin} With the above, your query will resolve to 4d20k1cs>18 (for example) which should then be valid.
1611939760

Edited 1611939945
Kraynic
Pro
Sheet Author
4, 4d20csk1 } >@{weapon1critmin} Do you actually have a line break in your macro at that point?  There are very few points where you can have a line break that doesn't kill macro operation.  Right after the pipes separating query options is a place you can have them, so those are fine.  Otherwise, a macro almost always has to be a continuous line to correctly operate. Edit:  Ziechael is one of the best macro gurus on the forums, so take that advice.
Ah yeah, it was the line breaks. Always the simple things. Thanks for the help and the syntax tips!