Not a dev, heh, just my read on this. From what Gazz said and the xml lines I would _guess_ that "DamageFalloffRange" is where damage begins to fall off. And that at "MaxRange" damage goes to zero.
Disclaimer: I could be totally wrong of course.
Example for "ammoShotgunShell" vanilla values are;
"DamageFalloffRange" operation="base_set" value="3"
and
"MaxRange" operation="base_set" value="18"
Xml for shotgun shells also has this; "RoundRayCount" set to "8", so assumption can be made it's mimicing 00 ought buckshot rounds (though they usually have 9 .33cal pellets).
Meaning, I think, that there's only 100% damage out to 3 meters. And hitting 0 at 18 meters.
Obviously that's not what happens in rl. But for a game, ok? Mainly I would guess there's no point spending the cpu cycles tracking a bunch of projectiles for hundreds of meters. So setting MaxRange as short as possible makes sense.
Question then becomes how realistic do you want to make things?
Can't take it too far or the shotty would be better than the in-game vanilla AK, at any distance.
Maybe keep it 'short range' but have it's damage better reflect rl?
I think that could work. And if we incorporate the spread of the 8 impacts we can also choose to say, "let's keep damage at 100% up to the last point where all 8 pellets could be expected to impact on a torso sized target, and fall to 0, or MaxRange, at double that range."
Completely arbitrary of course.
The rest is a lot of averaging and ignoring things like chokes, barrel length, etc. this is just me generalizing, a -lot-.
Majority of rw tests I've done/seen typically show that at ~15yds/m all pellets will impact on a circular area of approx 7-11".
So if we say let's have a pattern of ~9" at 15 yards, we need to figure out the angle of dispersal, and then pass that value on, and there are properties that do just that in the xml.
Under "ammoShotgunShell" there are these;
"SpreadDegreesVertical" operation="base_set" value="3.02"
"SpreadDegreesHorizontal" operation="base_set" value="3.02"
Which would appear to act to open up the impact points of the 8 raycasts (or pellets).
While I'd imagine TFPs came to these via in-game testing, they're far from matching rw dispersal/spread; assuming I'm reading their effect correctly.
'RW' again, varies a -lot-, but using a nice round 1 degrees of spread seems a reasonable average that would result in;
4.4" pattern at 7 yds
9.4" pattern at 15 yds
18.9" pattern at 30 yds
{to compare: using 3 deg & same math would have a 28.3" pattern at 15 yds}
So we could change those two properties above to "1" and be done, right? Nope
Theres also this under "gunPumpShotgun"; "IncrementalSpreadMultiplier" operation="base_set" value="2".
Which I'd guess further increases the dispersal of the pellets. And "Multiplier" would mean the 3.02d goes to 6.04d;
{or: 6 deg & same math would have a 56.6" pattern at 15 yds}
I've no idea how this is actually applied so first thing I'd prefer to test would simply be commenting it out. But I don't know how to do that via xpath, so I'll set it to "1" and see.
Getting back to the fall off and max distances let's make it easy and just say that out to 15 yards 100% damage makes sense. And even though at 30 yards, in rl, the pellets are still carrying ~90% of their energy, and that the spread alone will mean a drastic decrease to inflicted damage simply due to less than all pellets hitting the target, we're trying to keep MaxRange short. So lets say at 30 yards damage falls to 50%, meaning MaxRange should then be 45 yards (ok, meters).
We'd wind up with an xpath modlet with an items.xml containing;
Code:
<FileMachete_FirearmTweaks>
<set xpath="/items/item[@name='gunPumpShotgun']/effect_group[@name='Base Effects']/passive_effect[@name='IncrementalSpreadMultiplier']/@value">1</set>
<set xpath="/items/item[@name='ammoShotgunShell']/effect_group[@name='Base Effects']/passive_effect[@name='MaxRange']/@value">45</set>
<set xpath="/items/item[@name='ammoShotgunShell']/effect_group[@name='Base Effects']/passive_effect[@name='DamageFalloffRange']/@value">15</set>
<set xpath="/items/item[@name='ammoShotgunShell']/effect_group[@name='Base Effects']/passive_effect[@name='SpreadDegreesVertical']/@value">1</set>
<set xpath="/items/item[@name='ammoShotgunShell']/effect_group[@name='Base Effects']/passive_effect[@name='SpreadDegreesHorizontal']/@value">1</set>
</FileMachete_FirearmTweaks>
Fair warning: I haven't tested this but it's likely -very- OPd, compared to the rest of the firearms in-game. And I could be so so wrong about what the xml is doing, so, Buyer Be Very Wary