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

Buff like deadly aim, power attack macro

I am looking to create a "buff" button on my character for deadly aim. i would it to reference my current level so i don't have to update it every few levels. any ideas?
1501096287

Edited 1501096536
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Is this for the pathfinder sheet? Your attack buff macro will be this: -(1+floor(@{bab}/4)) Your damage buff macro will be this (for two-handers): (1+floor(@{bab}/4))*3 For single handed: (1+floor(@{bab}/4))*2 If you are using the neceros sheet, I'd recommend using the "add to roll" fields on your attacks and put the following in the attack: -[[?{Power Attack|Yes,1|No,0}*(1+floor(@{bab}/4))]] and damage fields of the add to roll (note this one is for two-handers): [[?{Power Attack|Yes,1|No,0}*(1+floor(@{bab}/4))*3]] It will then ask you if you are power attacking when you attack, and will apply the penalties/bonuses based on your response. EDIT: Gif demonstration
wow you just blew my mind, i was making Deadly Aim a buff that I had to check on or off at the top. But this seems way better. For point blank shot and deadly aim, I assume i can modify to fit.  to make it easier for me to understand, can you break down the "language" of the macro you made? like what each section means so i can modify to fit my needs.  thanks for the quick response
1501113840
vÍnce
Pro
Sheet Author
You should add this to the Pathfinder Sheet guide on the wiki Scott.
1501115739

Edited 1501115846
Holy batman, that's amazing. I've actually been wondering how to accomplish something similar with a ranger who has Favoured enemy/Bane weapon, vital strike, deadly aim and point-blank shot or even multishot?. Right now, I've made an attack for each possible combination I might use with the character, resulting in quite a few different attack macros and jumbled attack roll results. How would I accomplish something similar to that macro shown in the gif? (That is, where the macro asks me which feats I want to include and if I'm hasted, etc..) Help would be much appreciated! (Even better if its explained like I'm 5, as my understanding of the "macro code" is probably on that level).. Thank you guys a lot!
1501131799

Edited 1501131836
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
Mikey D. said: to make it easier for me to understand, can you break down the "language" of the macro you made? like what each section means so i can modify to fit my needs.  Sure thing. This uses roll queries which act like a variable. The roll query will propagate the answer to it to all instances of the roll query. The floor() function rounds down to the nearest integer, so that the division of the bab gives valid numbers. Memm said: I've actually been wondering how to accomplish something similar with a ranger who has Favoured enemy/Bane weapon, vital strike, deadly aim and point-blank shot or even multishot?. ... How would I accomplish something similar to that macro shown in the gif? (That is, where the macro asks me which feats I want to include and if I'm hasted, etc..) Help would be much appreciated! (Even better if its explained like I'm 5, as my understanding of the "macro code" is probably on that level).. For deadly Aim, just do it like I did the power attack above, just change the *3 to *2: Point-blank shot would be pretty similar, but even easier: ?{Target within 30 ft|No, 0|Yes, 1} would go in both the attack and damage add to roll fields (add a "+" if you are putting other things in there obviously. Favored Enemy would be similar. Bane would be a little more complicated, but would look something like this: Attack add to roll: ?{Bane|No,0|yes,2} Damage add to roll: ?{Bane} + ?{Bane}d6 For Multishot and haste, things get a little more complicated. I'll address haste first. I'd recommend making a buff for the AC, attack, and ref save bonuses from haste. The query in that gif demonstration only controls whether or not the haste attack is shown. This is accomplished by replacing all the "{{" in the iterative attack with ?{Haste|No,|Yes,{{}: For the multishot, we'll need to dig into the macro text itself and change it from this: @{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}}} to this: @{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} *2]] d@{damage-die} + @{damage_macro} *2 ]]}} {{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}}} To do the manyshot one, make sure you have the "display roll templates for customization" option in the settings page toggled on and that you don't have the sheet in compact view mode (the left hand button at the very top of the sheet next to the pathfinder logo). If you want to do manyshot as a query, simply replace that *2 with *?{Manyshot|No,1|Yes,2}. Hope that helps, let me know if you have any other questions. Vince said: You should add this to the Pathfinder Sheet guide on the wiki Scott. I suppose you'll want all of these put on there as well won't you?
1501134155

Edited 1501134389
vÍnce
Pro
Sheet Author
Scott C. said: Vince said: You should add this to the Pathfinder Sheet guide on the wiki Scott. I suppose you'll want all of these put on there as well won't you? Well...   ;-P I know you're very busy and I wouldn't want to keep you from your work on the  Pathfinder Companion Script (among your other equally important scripts). I might cobble something together from your examples unless you feel compelled ( or coerced. lol ).
1501203705
vÍnce
Pro
Sheet Author
Thanks Scott. &nbsp;Added these to the wiki:&nbsp;<a href="https://wiki.roll20.net/Pathfinder_Character_Sheet#Pathfinder_Character_Sheet_Macros" rel="nofollow">https://wiki.roll20.net/Pathfinder_Character_Sheet#Pathfinder_Character_Sheet_Macros</a> &nbsp;Please update/change/add to as needed. &nbsp;Cheers
I used the multishot macro from above and it A. Rolls it all in one window. B. Does Not do the damage correctly per arrow. (Normal 1d8+3 with the Macro 2d8+3 instead of 1d8+3 1d8+3) C. When it displays it, it doesn't show each arrow, it shows the damage total. Any help would be awesome. TY