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] pf_attack character sheet macro assistance.

1471841889

Edited 1471850710
I attempted digging through the forums for assistance but I'm unsure how to ask my question in the forum search and find the proper answer, so figured I'd give a whirl at my own topic. The question is two fold really, but I figure lets start with part 1. So on the default pathfinder character sheet, the macro is as follows: @{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}}} I know enough html and CSS to be dangerous, but what I specifically care about is this part right here: {{crit_damage=[[ [[ @{damage-dice-num} * (@{crit-multiplier} - 1) ]]d@{damage-die} + ((@{damage_macro}) * [[@{crit-multiplier} - 1]]) ]]}} Basically what I want it to do is just take whatever damage I rolled (let's say it's a 1d8 +5), and multiply it by my crit multiplier, so, if I rolled a crit, and did 11 damage, and the crit confirms, and my crit is an x3, I should expect to see a 33 in that spot.  Instead, what it does is change it to a 2d8+5 and multiplies it by 2, which is nowhere near the same value except when random rare occasions happen.  I gave a few attempts at changing some values, but sadly I don't hold the knowledge to quite do it as properly as I wish I did.  Any suggestions would be awesome. EDIT: Looks like a limitation of the code prevents this from being possible, still open for ideas but otherwise manual math is gonna be the way to go. Part 2: My character just hit level 6 and my BAB gained another attack (+6/+1) to be exact, but sadly when I use my weapon (same macro as above), it doesn't automatically do the second attack.  I may be actually missing something on my character sheet itself, but when I go into the gear icon and click on the dice for attack roll template, it rolls a first and second attack. EDIT: Figured this part out, thank you Vince! Any suggestions here would be awesome, thanks! A roll20 nooblet.
1471846549

Edited 1471846575
vÍnce
Pro
Sheet Author
Hi Soully, I'm not judging, but the sheet's macro handles crit damage according to raw. Multiplying Damage Sometimes you multiply damage by some factor, such as on a critical hit. Roll the damage (with all modifiers) multiple times and total the results. Note: When you multiply damage more than once, each multiplier works off the original, unmultiplied damage. So if you are asked to double the damage twice, the end result is three times the normal damage. Exception: Extra damage dice over and above a weapon's normal damage are never multiplied. If all you want to do is multiply your damage by your crit multiplier, try changing the macro to: {{crit_damage=[[ (((@{damage-dice-num})d@{damage-die})*[[ @{crit-multiplier} ]]) + @{damage_macro} ]]}} There are iterative attacks on the sheet that account for the BAB adjustment. Include a 2nd iterative attack and it will adjust -5 from the previous attack's total attack value.  A 3rd attack would be -10, 4th attack -15, etc. Cheers
Vince said: Hi Soully, I'm not judging, but the sheet's macro handles crit damage according to raw. Multiplying Damage Sometimes you multiply damage by some factor, such as on a critical hit. Roll the damage (with all modifiers) multiple times and total the results. Note: When you multiply damage more than once, each multiplier works off the original, unmultiplied damage. So if you are asked to double the damage twice, the end result is three times the normal damage. Exception: Extra damage dice over and above a weapon's normal damage are never multiplied. If all you want to do is multiply your damage by your crit multiplier, try changing the macro to: {{crit_damage=[[ (((@{damage-dice-num})d@{damage-die})*[[ @{crit-multiplier} ]]) + @{damage_macro} ]]}} There are iterative attacks on the sheet that account for the BAB adjustment. Include a 2nd iterative attack and it will adjust -5 from the previous attack's total attack value.  A 3rd attack would be -10, 4th attack -15, etc. Cheers As far as Part 2 of my question, I actually found the reason, yea, there is a spot on the character sheet for iterating another attack with the -5, I completely blanked out when I looked over it on the sheet, appreciate it! But right now my Part 1 is still causing me the issue, to try and clarify what I was asking.  If I roll an attack roll, let's say it's a 19 and a crit, the sheet rolls damage next, let's say that rolls a 4.  Then it rolls a crit confirm (pretend it confirms).  Afterwards, what I WANT it to do, is take that 4 it rolled and multiply it by 3.  What it's DOING is it's instead rerolling attack, then multiplying that number.  Maybe I'm mistaken but according to what you posted that isn't possible? I'm not familiar enough with the sheet's macro commands to find a way to do this sadly, much less know if it can be done.
I'm going to edit this a bit in my first post, but upon further inspection, it's not doing that at all.  What it is doing, is instead it's taking the 1d8 +5 that I have it rolling and multiplying that by 3, it does it as 2d8 + 5 and multiplies it by 2....which is nothing at all like what I want it to do xD
1471848785

Edited 1471848838
vÍnce
Pro
Sheet Author
Soully said: I'm going to edit this a bit in my first post, but upon further inspection, it's not doing that at all.  What it is doing, is instead it's taking the 1d8 +5 that I have it rolling and multiplying that by 3, it does it as 2d8 + 5 and multiplies it by 2....which is nothing at all like what I want it to do xD This is how I see the crit_damage macro breaking down given 1d8+5 with a crit_mult of x3; {{crit_damage=[[ [[ @{damage-dice-num} * (@{crit-multiplier} - 1) ]]d@{damage-die} + ((@{damage_macro}) * [[@{crit-multiplier} - 1]]) ]]}} {{crit_damage=[[ [[ 1 * (3 - 1) ]]d8 + ((5) * [[3 - 1]]) ]] }} {{crit_damage=[[ [[ 1 * (2) ]]d8 + (5 * [[ 2 ]]) ]] }} {{crit_damage=[[ [[ 2 ]]d8 + ((5) * [[ 2 ]]) ]] }} {{crit_damage=[[ [[ 2 ]]d8 + (10) ]] }} {{crit_damage=[[ 2d8 + 10 ]] }} Given you have already done your initial damage with mods, the additional crit_damage seems legit.
1471849373

Edited 1471849486
Vince said: Soully said: I'm going to edit this a bit in my first post, but upon further inspection, it's not doing that at all.  What it is doing, is instead it's taking the 1d8 +5 that I have it rolling and multiplying that by 3, it does it as 2d8 + 5 and multiplies it by 2....which is nothing at all like what I want it to do xD This is how I see the crit_damage macro breaking down given 1d8+5 with a crit_mult of x3; {{crit_damage=[[ [[ @{damage-dice-num} * (@{crit-multiplier} - 1) ]]d@{damage-die} + ((@{damage_macro}) * [[@{crit-multiplier} - 1]]) ]]}} {{crit_damage=[[ [[ 1 * (3 - 1) ]]d8 + ((5) * [[3 - 1]]) ]] }} {{crit_damage=[[ [[ 1 * (2) ]]d8 + (5 * [[ 2 ]]) ]] }} {{crit_damage=[[ [[ 2 ]]d8 + ((5) * [[ 2 ]]) ]] }} {{crit_damage=[[ [[ 2 ]]d8 + (10) ]] }} {{crit_damage=[[ 2d8 + 10 ]] }} Given you have already done your initial damage with mods, the additional crit_damage seems legit. So...I think your misunderstanding what I'm trying to do.  The above is not it, I do not wish it to simply add another die, multiply the damage by 2, then reroll, I wish it to use the number it originally rolled for damage, let's say that was a 7, and I want it to take THAT 7, and multiply it by 3, and spit it out below the crit confirm that opens up, not reroll the die entirely then give a different number.  If I rolled an 11 on damage, I SHOULD expect to see it say 33 below the crit confirm...not 24. As I stated, my knowledge on the macros is minimal, so I don't even know if it can hold a value to another macro or not, if it can't that's fine, I'll just remove the damage from the crit entirely and do the math by hand, but was attempting to streamline it so I didn't have to.  Why work harder when you can work smarter, ya know?  But if it can't be done it can't ^^;
1471850356
vÍnce
Pro
Sheet Author
AFAIK, without leveraging an API script once a roll is released to chat it's a done deal.  As the macro stands, the initial damage is rolled and has nothing to do with the results of additional crit_damage.  You could just ignore the crit damage posted and manually/mentally multiply for total-damage.
That's what I was coming to the conclusion of, been fiddling with it this entire time, just a limitation of the coding.  So I think I'll just take it off entirely and manually right the crit in, seems like it'll work out better and cause less confusion. Appreciate it!
Super ultra random thought, can you loop macros? Ie: If crit, crit confirm, if crit confirm, roll crit damage, else, roll damage.  
1471851457
vÍnce
Pro
Sheet Author
Soully said: Super ultra random thought, can you loop macros? Ie: If crit, crit confirm, if crit confirm, roll crit damage, else, roll damage.   Roll templates, which are built into the sheet's code can be used to check for certain conditions.  That's how the PF sheet checks for a crit, rolls a crit_confirm, and ultimately rolls the additional crit_damage if those conditions are met.  Outside of roll templates and API I don't think you can apply conditionals/logic. Although not automatic, some people make great use of queries to direct their macros to perform some amazing tasks.      
That's too bad, guess all those years of C++ aren't going to help me so much here xD Anywho, something else has come up that is a bit odd, and unsure how to explain it, so going to screen shot it. If you'll look at rapid shot, it crits, but right below it, instead of saying "Crit confirm", it says "2nd Attack"  I double and triple checked the macros, and it doesn't seem wrong, but linking it in the hopes I can maybe be proven wrong and fix it? And here's the macros for verification I hope it's more readable once I post it xD Anyway, I'm unsure of the cause of it, nothing seems out of place in this circumstance, or am I just blind?
1471853957
vÍnce
Pro
Sheet Author
You're not blind Soully.  That looks like a bug in the normal pf_attack roll template. ;-(  We'll have to fix that.  In the meantime, you can use the "Simple Template" option, which appears to work fine.  Just above the Attacks sub-section is Macro Options. Select "Use Simple Template".  
Awesome.  Same thing happened on second weapon, except it was saying "Attack 4" (In that case, it is the fourth iteration if I remember right), but yea, that makes me feel better, I'll fiddle with sending it back to simple tomorrow.  Thank you! <3
1471867575
chris b.
Pro
Sheet Author
API Scripter
Vince valiantly worked all night on it and i'm submitting in a pull request this morning, so the fix should be in by tomorrow, plus some other html and appearance fixes he's done in beta.
Ya'll are the best, just want to point that out there, bless your hearts <3
1471919050
vÍnce
Pro
Sheet Author
Chris is blushing.  ;-P