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
This post has been closed. You can still view previous posts, but you can't post any new replies.

Pathfinder Combat Macro: automatically consider critical rolls

1398246046

Edited 1398246286
I was up all night chomping on this, and this is what I came up with. It is suitable for use either by an individual player, or as a campaign script from a DM - since it will work for any players who have the correct attributes. In order for it to work, the script user must have the following attributes on their character; CritRange - contains only the value of the range minimum; e.g. 20, 19 (for 19-20), 18 (for 18-20), etc. BaseAttack STR WeaponDamage (format d6, d8, etc) <-- note, no number - the script doesn't work well for weapons that have multiple base damage dice (e.g. 2d4 won't work) Also the DM (or controller of your enemy) must have an attribute on their token's character sheet named AC Here is the script, along with a description. /roll [[{1d20!>@{selected|CritRange}+@{selected|BaseAttack}+@{selected|STR}}>@{target|AC} ]]@{selected|WeaponDamage} - roll an exploding d20 - only explode above critical range - add base attack - add Strength - based on target's AC for success - and roll that many damage dice. So, this macro first will ask the user to pick a target. It will then roll a d20. If it beats the player's critical threat range, it will roll again, and continue to do so until it does not roll a critical threat. When it finally rolls a non-critical-threatening roll, it goes back through all the rolls it made; each roll that beat the target AC it counts it as a "success". It then totals up the successes and rolls that many damage dice, and delivers the total of the damage rolled. This is obviously set up for melee. A ranged script would require dexterity instead of strength (STR). Also, the attributes listed above don't need to be spelled that way, they only need to be spelled the same way they are in the macro. You can call them whatever you like as long as you make the macro match. It's not perfect but it works. EDIT: My fancy formatting didn't make it; I had each point connected to the part of the code that does it, but it's gone. I hope this make sense.
1398251291
Gauss
Forum Champion
Im not entirely sure what your question is, could you clarify?
Sorry, it's not a question. I had been up all night and didn't know where to post this, so I think I mis-posted it. I'm sorry.
I actually really like this, and after testing it a bit, it seems to work pretty well. I mean, you have to make sure your WeaponDamage is formatted to include bonus damage, since that's not added (so like, 1d10+12), and I like the way if it doesn't beat the AC, it outputs a zero. My only wish is that the output rolls could be formated for inline syntax to shrink the chat footprint, and more importantly, when you actually roll a crit, and it rolls 2d10 instead of 1d10, it could do it with the bonus damage to both rolls instead of the total. Maybe put BonusDamage as it's own attribute so it can come with each output roll individually, or added twice. Also is there a way to limit it based on x2/x3/x4 weapons? Like, if it beats the target, it's forced to roll the damage a certain number of times?
Maybe! I will see. It's a lot of trial-and-error, and it isn't a complete language (like, say, javascript with API access). Some things that seem like they should work (since, you know, they work somewhere else...) don't. I will try to do those things however since they are good ideas, and see how it goes.
I put the bonus damage in as it's own attribute, just adding on to the roll at the end, the main problem I see is one of output. When you make the roll, the only result you see is the fact that it's either rolling 0dX, 1dX, or 2dX for damage. You don't actually see the roll that caused the critical, or it's confirmation roll against the AC. While mechanically this is cleaner, I don't know if I like the idea of having to mouse over the damage roll to see the hit. I'd rather it be output line by line. The thing with crit ranges instead of just 20=crit is that you don't really care about the bonus being added to the roll, you care about the natural roll itself. So I don't care about the {19}+12, I care about the 19. So it seems important to have that info front and center. As a macro, though, I do like the idea of just pressing a button to roll against AC, I'm just not competent enough with the macro script to polish it up the way I think it needs.
Hahaha unfortunately it has nearly nothing to do with the actual game mechanic. We don't get stacking criticals, for one... the initial roll must not only qualify for a critical, but hit the target's AC... wow, I dunno LOL Since there is a) no variable assignment, b) no boolean logic and c) only a very basic logical operator, this is pretty difficult if it's even possible. We'll see.
1398299775
Gauss
Forum Champion
Moved to On-Topic