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

[PF] Trying to handle Power Attack and similar conditional, pre-roll bonuses/subtractions.

1490627854

Edited 1490628190
For the following example, I'm trying to make a Power Attack macro.  What I'm attempting to do is ask the player "Do you intend to use Power Attack?" once before the attack roll, and then - as part of the attack roll (see image below) have the respective Attack Roll detriment and Damage Roll benefit applied.  However, when using a query, any further identical queries are immediately answered with the same (see image below) even if the answers are different.   As such, if the player answers "Yes" to "Do you want to use Power Attack", then the Attack Roll and  Damage Roll both suffer or benefit from whichever was processed first - in this case, both suffer a -3 penalty, rather than the Attack Roll suffering -3 and the Damage Roll gaining +6 (or +9).  The way around this I have come up with is to have the query - and its results - in the Weapon Notes section. While this works , it's rather less elegant than what I'd like to have in effect.  I'd greatly appreciate any help with this matter - even if it doesn't directly relate to my question, I'd love to hear any alternative ways or workarounds you've baked. I've had some half-formed ideas that I've had varying success in implementing, from simply splicing the Weapon Notes macro inside the attack roll (which ran into the aforementioned issue of having the Attack Roll result cloned to the Damage Roll result) to attempting to have the query set an Attribute, which then informs other macros whether Power Attack is active or inactive, and therefore tells a separate macro for the AR subtraction and DR addition whether to activate or not (which I couldn't implement because there doesn't seem to be a way for a Query to set the value of an Attribute to 1 or 0). ----------------------------------------------------------- EDIT: I should note, I'm using the Pathfinder character sheet, the basic and iterative attack macros for which are below.  Basic: @{PC-whisper} &{template:pf_attack} @{toggle_attack_accessible} @{toggle_rounded_flag} {{color=@{rolltemplate_color}}} {{character_name=@{character_name}}} {{character_id=@{character_id}}} {{subtitle}} {{name=@{name}}} {{attack=[[ 1d20cs>[[ @{crit-target} ]] + @{attack_macro} ]]}} {{damage=[[@{damage-dice-num}d@{damage-die} + @{damage_macro}]]}} {{crit_confirm=[[ 1d20 + @{attack_macro} + [[ @{crit_conf_mod} ]] ]]}} {{crit_damage=[[ [[ @{damage-dice-num} * (@{crit-multiplier} - 1) ]]d@{damage-die} + ((@{damage_macro}) * [[ @{crit-multiplier} - 1 ]]) ]]}} {{type=@{type}}} {{weapon_notes=@{notes}}} @{iterative_attacks} @{macro_options} {{vs=@{vs}}} {{vs@{vs}=@{vs}}} {{precision_dmg1=@{precision_dmg_macro}}} {{precision_dmg1_type=@{precision_dmg_type}}} {{precision_dmg2=@{global_precision_dmg_macro}}} {{precision_dmg2_type=@{global_precision_dmg_type}}} {{critical_dmg1=@{critical_dmg_macro}}} {{critical_dmg1_type=@{critical_dmg_type}}} {{critical_dmg2=@{global_critical_dmg_macro}}} {{critical_dmg2_type=@{global_critical_dmg_type}}} {{attack1name=@{iterative_attack1_name}}} Second (2-8 are similar): {{attack2=[[ 1d20cs>[[ @{crit-target} ]] + [[ @{attack_macro} + @{iterative_attack2_value} ]] [iterative] ]]}} {{damage2=[[ @{damage-dice-num}d@{damage-die} + @{damage_macro} ]]}} {{crit_confirm2=[[ 1d20 + [[ @{attack_macro} + @{iterative_attack2_value} ]] [iterative] + [[ @{crit_conf_mod} ]] ]]}} {{crit_damage2=[[ [[ @{damage-dice-num} * [[ @{crit-multiplier} - 1 ]] ]]d@{damage-die} + ((@{damage_macro}) * [[ @{crit-multiplier} - 1 ]]) ]]}} {{precision_dmg21=@{precision_dmg_macro}}} {{precision_dmg22=@{global_precision_dmg_macro}}} {{critical_dmg21=@{critical_dmg_macro}}} {{critical_dmg22=@{global_critical_dmg_macro}}} {{attack2name=@{iterative_attack2_name}}}
1490630092

Edited 1490633657
Tetsuo
Forum Champion
you could do -[[?{power attack|Yes, 1|No, 0} * [[1+floor(@{bab}/4)]]]] for the attack penalty, and for the damage, just include +[[?{power attack|Yes, 1|No, 0} * [[2*(1+floor(@{bab}/4))]]]] in the bonus damage section on the sheet weapon macro. This has the benefit of scaling with your bab without further changes  
Franky H. said: you could do -[[?{power attack|Yes, 1|No, 0} * [[1+floor(@{bab}/4)]]]] for the attack penalty, and for the damage, just include +[[?{power attack|Yes, 1|No, 0} * [[2*(1+floor(@{bab}/4))]]{] in the bonus damage section on the sheet weapon macro. This has the benefit of scaling with your bab without further changes   Hey, that's some great stuff. I tweaked a little to fit it in, and was really happy with how you simplified the bab scaling!
1490633469
chris b.
Pro
Sheet Author
API Scripter
As Franky H. said you have to use a multiplier of 1 or 0 as your choice 'values' in order to re-use a query effectively. Also if you're using the Pathfinder sheet, go to settings and turn on "add to roll" macros in the advanced section. There you can put those adjustments in global fields and not have to modify that massive macro field for each attack. There is also an "add to roll" for each attack, since .. you still may need to have  something different depending on if you are 1 handed or 2 handed.