Been looking into fixing ranged balance for good, see https://github.com/CleverRaven/Cataclysm-DDA/pull/21468
Had what I think is a good idea for addressing the problem we have where rifles are unatturally good at very close range by overhauling how dodging works, but I can’t follow up on it right now, so I want to make sure I don’t forget it.
The stats quo is you spend time aiming, which drives down your dispersion, which you can think of as the width of your shot grouping. At the instant when you fire, the target gets a chance to apply it’s dodge bonus as a penalty to your accuracy. If the target just keeps getting lucky, it can force you to miss no matter how well you aim, though the better you aim, the less likely this is.
What I realized is that a dodging opponent should be continuously attempting to interfere with your aim instead of doing so just at the final instant, and your aim should be “chasing” the opponent.
Just as a visualization, think of a movie or game with modern-ish dogfighting, where the hero (or villan) is trying to get a target lock on their opponent, the opponent is changing direction erratically, and the attacker is trying to steer their targeting recticle over the target so they can get a clean shot off.
To break it down, as the player is aiming, each amount of time spent aiming should be contested by the opponent, with the player improving their aim, and the opponent making it worse by moving away from where the player is aiming.
This isn’t particularly interesting until you adjust the effectiveness of aiming and dodging based on various factors. In particular, aiming speed would be angular speed, and dodging would be linear, so rifles with a low aiming speed would be efective at long range, but once an enemy is close, a rifle would be unable to keep up (unless you have superheros stats, in which case whatever), but a pistol or shotgun, which have much higher aiming speeds, would be able to aim faster than the monster dodges.
Implementation is simple, with each aim action, aim would improve based on weapon aim speed - monster dodge speed, where weapon aim speed is constant and monster dodge speed decreases linearly with range, i.e. monster.dodge_speed() / range.