Vanilla Polearm Master bonus attack:
- Uses Strength or Dexterity modifier, whichever is higher, for its damage roll. even if the weapon does not have the Finesse property, or if another ability is used for the attack roll (such as through Shillelagh or Pact of the Blade).
- Does not add bonus damage from most usual sources such as Hunter's Mark, Rage, Divine Favor and many more.
- Always deal Bludgeoning damage, even if the weapon has a buff that changes its damage type.
Fixed Polearm Master bonus attack:
- Uses the same modifier your weapon uses, this means Wisdom for Shillelagh, Charisma for Pact of the Blade. Works with any effect that would change the ability modifier used by your weapon, even those added by mods.
- Adds ANY damage modifier that would trigger on a normal attack: such as +1/+2/+3 damage from magic weapons, the weapon's innate damage bonuses (such as Halberd of Vigilance's 1d4 Force damage), Divine Favor, Elemental Weapon, Hunter's Mark etc...
- Changes its 1d4 Bludgeoning damage to a different damage type if the weapon also does. For example, if you make your weapon deal Psychic damage with OneDnD Warlock - Pact of the Blade, the 1d4 damage from PAM is converted to Psychic damage too.
Compatibility:
Should be compatible with any mod.
Make sure this mod is at the bottom of your load order, or atleast below any other mod that would attempt to fix Polearm Master's bonus attack.
How it works:
Polearm Master in vanilla is a mess, it's coded to always deal 1d4, rather than your weapon's damage. This means that many effects that would add to your weapon's damage roll, such as Divine Favor, do not affect it at all.
data "SpellSuccess" "DealDamage(1d4+max(DexterityModifier,StrengthModifier), Bludgeoning)"
I've basically changed it to instead always deal weapondamage, exactly the same as a normal attack with your mainhand attack.
data "SpellSuccess" "DealDamage(max(1,MainMeleeWeapon), MainMeleeWeaponDamageType);ExecuteWeaponFunctors(MainHand)"
And, using Script Extender, a status is applied to your weapon everytime you use Polearm Master: Bonus Attack, but before the attack lands.
This status:
- Changes your weapon's damage die to 1d4 (the same way Shillelagh works)
- IF the weapon currently does Slashing or Piercing, changes the weapon's damage type to Bludgeoning.
Known Issues:
Sometimes, hovering over the damage dealt in the combat log doesn't show any of the damage modifier.

Despite this, the damage is still correct, the tooltip is just missing some info.
(Here my character has +7 to damage and a +3 magic weapon, so 1 + 3 + 7 = 11)

I have no idea if this bug is caused by this fix or if it's a vanilla issue.