Combat Modifier Calculation Extension
Removing attachment, as this is now on the Forge!
https://forge.fantasygrounds.com/shop/items/406/view
I've seen some of this listed as functionality in extensions for 5E, but not for 3.5/Pathfinder.
This extension automatically calulates common modifiers in combat.
What it does:
Adds buttons to the Modifiers window for shooting into melee and flanking.
Puts buttons on the desktop for the three levels of cover, shooting into melee, flanking, and flat-footed.
For a ranged attack:
- If the range is 30' or less and the attacker has the Point Blank Shot feat, adds effect "PBS; rng30; ATK: 1 ranged, DMG: 1 ranged, DMGS: 1"
- If the range is 30' or less and the attacker doesn't have the feat, adds effect "rng30" (for facilitating Sneak Attack)
- Removes the above effects if range is greater than 30'
- Calculates range penalty based on number of range increments
- Displays a warning in Chat if beyond maximum range (this does not prevent the attack)
- Calculates "shooting into melee" penalty (using the PF1e rules, not 3.5E)
For a PC the weapon range is taken right from the inventory list so if a weapon has a custom name, the Distance ability, etc., the calculations will still work. For an NPC, as long as the weapon name includes the base for the weapon it will find the correct range (so Shortbow, Masterwork Shortbow, +1 Shortbow, Flaming Shortbow of Spiked Intrusion, etc. will all use the range for "shortbow").
For a melee attack:
Determines whether or not the attacker is flanking the target; if so, adds the +2 bonus and adds effect "Flanking" to the attacker (again, for Sneak Attack)
Removes "Flanking" effect if the attacker isn't flanking
What it doesn't do:
Flanking is calculated based on allies and their size and natural reach. It does not take into account whether or not an ally has a reach weapon or if they don't have a melee weapon at all.
Flanking doesn't take occuluders into account. If a goblin is attacking and its allied ogre is 10' from the target with a wall in between, the goblin will still get the flanking bonus.
Cover. I had considered working to automate cover modifiers, but decided against it because, at least at the tables I've played on, it is never treated exactly like in the rules; many pretty much just ignore cover unless it's from a wall or other object (does a size 0 attacker, shooting past/through a size 0 creature, suffer a partial or full cover penalty, or none at all?). I didn't want this extension to force a group to play it a certain way.
My goal was to get the vast majority of situtations to work correctly, and based on my testing it does that. I'll find out for sure in a few days at my next gaming session.
Compatibility:
I use very few extensions, so I have not widely checked compatibility.
This extension replaces ActionAttack.modAttack, but it does call the original, so it should still be compatible with other extentions affecting that function (provided they modify, rather than replace, it).
One extention I would rather not live without is Kelrugem's Full Extension Overlay; this extension does not conflict with it.
Update 26-Feb:
added "Helpless" as an effect that will prevent a unit from providing a flanking bonus
removed debug spam
Update 27-Feb:
Changed effects from "pbs" to "rng30" to clarify that this is not the same as the point blank shot feat. The effects are now:
with point blank shot feat: "PBS; rng30; ATK: 1 ranged; DMG: 1 ranged; DMGS: 1"
wihtout the feat: "rng30"
Other effects using this should now read "IF: CUSTOM(rng30); ..."
Update 02-Mar:
Fixed a case where one ally attacking from behind another (as with a reach weapon) would get a flanking bonus.
Update 05-Apr:
Account for tokens on the map which are not in the combat tracker.
Ignore flanking bonus when attacking swarms.
Update 14-Apr:
Reduce range penalty to -1 per increment if the attacker has the Far Shot feat.
Update 15-Jun:
Added a version that does not perform any flanking calculation. The Flank modifier button still works.
Update 13-Oct:
Removed separate version without flanking. There is now an option under "Game (GM)" to turn on/off automatic flanking calculation (thank you @Bmos)
Added addtional modifer buttons and moved dice to the right to accomodate them (thank you @Zygmunt Molotch)