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 .
×

Character Ability Truncating Inline Rolls

I'm running a character with a rather complicated attack ability that has lots of variables that change from round to round. To represent this I wrote the following Ability macro below. The most of the ability seems to be functioning properly, but I'm having trouble with the two inline rolls bolded below. /em attacks with his +1 Curveblade. First Attack Hits AC [[ 1d20 + floor( @{STR} / 2 - 5 ) + floor( 3 * @{WarpriestLevel} / 4 ) + @{CurvebladeBonusHit} - @{UsePowerAttack} * ( 1 + floor( floor( 3 * @{WarpriestLevel} / 4 ) / 4 ) ) + @{UsePowerAttack} * ( 1 + floor( floor( 3 * @{WarpriestLevel} / 4 ) / 4 ) ) + @{HitFromEffects} + ?{SituationHit|0} ]] (threat on [[ @{CurvebladeThreat} + floor( @{STR} / 2 - 5 ) + floor( 3 * @{WarpriestLevel} / 4 ) + @{CurvebladeBonusHit} - @{UsePowerAttack} * ( 1 + floor( floor( 3 * @{WarpriestLevel} / 4 ) / 4 ) ) + @{UsePowerAttack} * ( 1 + floor( floor( 3 * @{WarpriestLevel} / 4 ) / 4 ) ) + @{HitFromEffects} + ?{SituationHit|0} ]], [[ 1d20 + floor( @{STR} / 2 - 5 ) + floor( 3 * @{WarpriestLevel} / 4 ) + @{CurvebladeBonusHit} - @{UsePowerAttack} * ( 1 + floor( floor( 3 * @{WarpriestLevel} / 4 ) / 4 ) ) + @{UsePowerAttack} * ( 1 + floor( floor( 3 * @{WarpriestLevel} / 4 ) / 4 ) ) + @{HitFromEffects} + ?{SituationHit|0} ]] to confirm) [[ @{CurvebladeDice} + ( @{Merciful} * 1d6 ) + 1 * ( floor( 1.5* ( @{STR} / 2 - 5 ) ) + @{UsePowerAttack} * ( 2 + floor( 0.75 * @{WarpriestLevel} / 4 ) + @{CurvebladeBonusDmg} + @{DmgFromEffects} ) + ?{SituationDmg|0} ]] damage ( [[ @{CurvebladeCriticalDice} + ( @{Merciful} * 1d6 ) + 2 * ( floor( 1.5* ( @{STR} / 2 - 5 ) ) + @{UsePowerAttack} * ( 2 + floor( 0.75 * @{WarpriestLevel} / 4 ) + @{CurvebladeBonusDmg} + @{DmgFromEffects} ) + ?{SituationDmg|0} ]] on crit.) plus [[ @{Axiomatic} * 1d6 + @{Axiomatic} * 1d6 ]] Lawful, [[ @{HolyStrike} * 1d6 + (@{Holy} * 1d6 + @{Holy} * 1d6 ]] Holy, [[ @{Frost} * 1d6 ]] cold, and [[ @{FireStrike} * 1d4 + @{Flaming} * 1d6]] fire Specifically, the ability prompts me a value for SituationDmg as it should, but truncates the evaluation after ( @{Merciful} * 1d6 ) so nothing that comes after that term is included in the final result—it just gets dropped. What's even more maddening, the Merciful term was added in my most recent edit, before which the macro worked fine but when I remove the Merciful term in an attempt to replicate the working version, the ability stops sending data to the chat box entirely (though it still prompts me for input).
1411428890

Edited 1411429020
Gauss
Forum Champion
Moved to Specific Use Questions since this is (probably) a problem with your macro rather than a Roll20 bug. With macros this complicated I suggest adding each element one at a time until you find out which one is not working.
I've gotten used to reading Gauss' code but damn...... :) Yes, please break it out to the componant having issues. In this case, [[ @{CurvebladeDice} + ( @{Merciful} * 1d6 ) + 1 ]] presumably. What value are you storing in Curvedbladedice and Merciful , and what kind of result are you expecting it to return?
1411477935

Edited 1411478052
Fabulous. I stepped through and rewrote it one term at a time, but did not encounter the problem...and yet, it works. I must have added an extra something before that threw an exception. Here is the working version (with newlines added for legibility). [[ @{CurvebladeDice} + ( @{Merciful} * 1d6 ) + 1 * ( floor( 1.5 * ( @{STR}/2 -5 ) ) + @{UsePowerAttack} * ( 2 + floor( 0.75 * @{WarpriestLevel}/4 ) + @{CurvebladeBonusDmg} + @{DmgFromEffects} ) ) + ?{SituationDmg|0} ]] CurvebladeDice is 1d10 and Merciful is either 0 or 1, depending upon whether I'm using the ability. Edit: Naturally, the forum won't let me indent just one line and strips all the extra white space out if I do it the hard way.
I don't know if you'll find it useful or not, but you can break your macros into separate individual macros and create one master macro that calls all the others. That gives you a bit of modularity to isolate changes. #macroname or %AbilityName
I thought about that, but doing it that way forces each macro onto it's own line in the chat window when part of my goal is to make the output as compact as possible—important when you typically play on a small screen.
Not if your extra macros are comprised of the formulas only and called within the in-line roll... You could have a Macro called #Ability-Damage inside the macro would read something like floor((1d6+7)/2) you would then call the macro within your in-line roll to add #Ability-Damage to your output. It would only use one line still. I found myself taking this sort of approach for my full attack macro with all the modifiers I have for my attack and damage rolls... it was way easier to just set them up as individual macros and call them into the Full-Attack macro separately. It makes the macro easier to read for editing, and keeps values separated so you always know what is doing what. If you ever need to add something to a specific modifier then you can without searching through your macro for the right spot. This is even more valuable when you have a modifier called multiple times throughout a macro.
Good to know. Thanks, Chell.