I was looking at the code last night, working on the custom shotguns, and took a good look at how shotgun penetration works. So here's the code that deals with penetration from ShotgunBullet. Combat, hunting, and AA12 all share the same code for their pellets, but with different values. You can view those values in their bullet files, listed at the bottom of the post.
ShotgunBullet.ProcessTouch()
The catch is
MaxPenetrations doesn't really do what the name implies. That is it does not cap the number of penetrations at whatever value it is set to, in this case 2. Increasing either
PenDamageReduction or
MaxPenetrations will increase the number of penetrations because the pellet needs to hit more targets in order to have its current damage to default damage ratio drop below "
PenDamageReduction / MaxPenetrations"
For example, an AA12 pellet needs to have its current damage / default damage be less than or equal to 0.75 / 2 = 0.375. So hitting the first target deals base damage, 2nd target deals 0.75x that, 3rd target 0.75 * 0.75x, and so forth.
1: 1
2: 0.75
3: 0.75*0.75 = 0.5625
4: 0.75^3 = 0.421875
5: 0.75^4 = 0.31640625 < 0.375 = 0.75/2
After hitting the 4th target, the ratio drops below the limit, so the pellet is destroyed after 3 penetrations. In comparison, the pump shotgun has a much lower
PenDamageReduction value, at 0.5.
1: 1
2: 0.50
3: 0.50*0.50 = 0.25 <= 0.25 = 0.5/2
So after hitting the 2nd target, the ratio reaches the lower limit and you get only 1 penetration with the pump shotgun. But, with the penetration bonus the support gets, the
PenDamageReduction for all shotguns are increased to at least 0.95, which results in less damage reduction per penetration
and lot more penetrations. This is why a pump shotgun off perk feels pretty lackluster, but switch to support specialist and that same pump shotgun is the best weapon in the world, next to an axe of course.
I have a test shotgun to illustrate this stuff with but I can't work on that until later tonight. In short:
- Base penetration stats
- Combat/Pump penetrates 1x (hits 2 targets) with 0.5x damage per penetration
- HSG penetrates 2x (hits 3 targets) with 0.65x damage per penetration
- AA12 penetrates 3x (hits 4 targets) with 0.75x damage per penetration
- Support's penetration bonus greatly reduces the damage reduction per penetration
- Combat/Pump => From 0.5x to 0.95x
- HSG => From 0.65x to 0.965x
- AA12 => From 0.75 to 0.975x
- Less damage reduction per penetration means more penetrations
- Combat/Pump => From 1x penetration up to 14x
- HSG => From 2x penetrations up to 20x
- AA12 => From 3x penetrations up to 28x
AA12Bullet.uc, BenelliBullet.uc, BoomStickBullet.uc, ShotgunBullet.uc, KFVetSupportSpec.uc