Aiming system

Mostly an update, but feedback is welcome.
My current project is adding an aiming system where you tradeoff time for steadying your aim.
Progress here: https://github.com/CleverRaven/Cataclysm-DDA/pull/2194

Here’s the concept, when you pick a target, you can swing your weapon around to “point at it” instantly, but your aim isn’t steady yet, for that you have to settle into your firing stance and take aim, which takes precious seconds. At close range you can rattle off shots as fast as you can pull the trigger and expect to hit, but at any significant distance, you’ll need to aim to expect to hit. This is adjusted by weapon type, skill, stats, etc.

In practice, if you hit ‘f’ then ‘f’ immediately, it’s a “snap shot”, and will be quite inaccurate. You will be able to either incrementally hold your aim until it improves enough to take a shot, or use a preset command that aims a certain amount and then fires.

Game balance wise, this adds another dimension to firearms, because while rifles have more absolute accuracy, you’ll be able to bring a pistol to bear much more quickly and fire, while rifles will zero in much more slowly. Likewise various sights will have accuracy vs aim speed tradeoffs.

Overall I plan on requiring longer times between shots to get the same level of accuracy you have now, but the range of options will widen. You’ll be able to fire faster and less accurately, or spend more time per shot and be more accurate than you can be now.

A side effect of this is that aim will reset if you take any action other than aiming or firing, so run and gun will be restricted to fast-aiming weapons like pistols.

Screenshot of the current prototype:

The only differences visible so far are that the targeting window is enlarged, and I’ve added feedback about aim, “Your aim is bla”. In addition, when you hit . to “steady your aim”, turns can pass and enemies can act without you leaving the targeting window.

I still need to implement aiming progressing at different rates depending on the weapon, skills, etc, implement the preset aim level interface, and then the hard part, rebalancing all the guns and gunmods. Probably the incremental aiming interface need a bit of a change too.

Very cool work so far, my request is for laser sights to provide a decent bonus to snapshot accuracy, but (slightly?) less of a bonus to aimed, if that’s in any way possible.

Good. Finally :stuck_out_tongue:

That’s exactly what I was going to do with them, they’re going to contribute to aim speed a lot, but not very much to total accuracy.
This is also going to make it where you can’t just attach every kind of sight to your gun to keep improving accuracy. Not really part of the system, just something I’m fixing along the way.
I think I want to let you use a system where you can use the highest aim speed sight that hasn’t met it’s accuracy threshold for a given aim action, then transition to higher-accuracy sights as you keep aiming. So it’d be worthwhile on a really good gun to have both a laser sight and a scope, using the laser for fast target acquisition, then switch to the scope for careful aiming for tricky shots.

That’s exactly what I was going to do with them, they’re going to contribute to aim speed a lot, but not very much to total accuracy.
This is also going to make it where you can’t just attach every kind of sight to your gun to keep improving accuracy. Not really part of the system, just something I’m fixing along the way.
I think I want to let you use a system where you can use the highest aim speed sight that hasn’t met it’s accuracy threshold for a given aim action, then transition to higher-accuracy sights as you keep aiming. So it’d be worthwhile on a really good gun to have both a laser sight and a scope, using the laser for fast target acquisition, then switch to the scope for careful aiming for tricky shots.[/quote]

With that system, do you reckon something like emergency ironsights (either canted or the original ones) could be used instead of a mounted scope in an emergency? As it is, there’s not really a downside to using rifle scopes or other long ranged scopes in a close combat or short range situation.

This is really good, realistic and improves the feel of surviving… good one.

So how is this going to effect bows and throwing weapons?

I’ve been looking forward to this since you first brought it up, and this looks like a better implementation that I’d hoped for. Bravo.

I just hope it’s made abundantly clear what’s happening to the user in the end, I know lots of people already have problems understanding the current “recoil” system, simply because there’s no obvious or visible connection between it and the act of shooting, and this will be a great opportunity to fix that problem (or to make it worse). The feedback about “your aim is” is great, though I’m a bit confused as to how that combines with the yellow recoil there.

Question, not that I have ever visited a firing range or anything, but aren’t rifles and other long weapons like shotguns supposedly faster and easier to aim than handguns when you are unskilled?

Dunno really just asking. Either way, I have been waiting for this change for a long while, its a great improvement over what we have now.

Well, I mean lifting a large rifle or a shotgun would be hella more difficult for an unskilled person in any case than a rather small pistol compared.

Easier? Yes. Quicker? No. Which is part of why this is good - it’s decoupled aiming speed from aiming difficulty.

Iron sights plus scope:
This is the same situation as the scope and laser, you’d aim over the open sights since they’re faster until they reached the end of their usefullness, then switch to the scope (switching would be totally automatic by the way, at most it’d display a message about it)
bows are going to use the same system, I might take a look at throwing weapons at the same time, but i’m sceptical about it being a good fit for them.
GlyphGryph hit the nail on the head, feedback is the most difficult part of this whole thing. the recoil display is merely inherited fromnthe previous code, i might ditch it. The displayed aim is a combination of dispersion from recoil, skills, attributes, and aim, I’m not adding in gun and ammo dispersion at the moment, but i’m on the fence about that one. that might be reserved for something cool like high skills or a bionic that gives you gun performance feedback, or even a sufficiently advanced gun.
longarm vs pistol…
It’s a bit more intuitive what a reasonable grip is on a pistol than a rifle when you’re a total novice. I found aiming a pistol far easier than a rifle when I was first learning to shoot, There are nuances to pretty much every kind of sight, including scopes. the difference is if you have bad alignment with iron sights you’ll miss all the time, if you have bad alignment with a scope you won’t be able to even SEE your target. On the other hand, it’s way harder to hold a pistol steady than a rifle if you at least have the posture down. i’d pretty much call it a wash.
it might be better to have a cost for bringing your gun to bear on a target seperate from the whole aiming thing, you’d pay this cost when you either fire at or start to aim at a target, you wouldn’t be spending points to just move the targeting cursor around. When your cursor is over an enemy that isn’t your current target, it would give an estimate of how long it would take to switch to that target. this way rifles and shotguns would be cumbersome, but you might be able to aim them quickly once they’re lined up.

For bows, I suggest a little different mechanic, bows should take time to aim like guns too (depend on the skill), but should have no recoil. The important difference is that for bows there are a golden time window when it’s prime to release the string regardless of the aim because if you draw the string for too long your muscles will be strained and lose the accuracy. In summary, bows take time to aim but that should not be too long or you risk losing the accuracy instead. Bows that require higher STR stat will shorten this time window, higher STR and skill can counteract this.

And, of course, time required to shoot a gun accurately would lessen with increased skill. I like it!

Don’t forget that compound bows, by design, reduce this strain greatly compared to longbows and recurves.

And crossbows wouldn’t be affected by the pull strength thingy at all, since you shoot it like a rifle, but you reload it differently.

No offense, but that’s actually wrong.
However, that’s a common misconception about Handguns and Long Guns even among the shooting community.

The truth is Long Guns actually are faster to aim with when actually ‘aiming down the sights’, but slower to ‘bear’.
What that means is that handguns are faster to ‘bring to bear’ (draw and vaguely aim) than a long rifle, but the rifle will actually be ‘on target’ (with consistency) faster than the handgun.

When it comes to actual speed of aiming; assuming that both firearms are using standard iron sights, a range of 25 yards (well within the engagement zone of most handguns), and that both shooters are using their respective Isosceles grips (as is US Military standard); your average Handgun user will be ‘on target’ in roughly 2 1/2 seconds compared to the average Rifleman’s 2 seconds flat.
On the other hand, the average ‘time to bear’ for the two makes quite a bit of difference.
The average handgun user could ready their handgun from zero (holstered) in under 1 second, the average rifleman took 3 to 4 seconds to do the same (at which time they were on target, due to the virtues of correct rifle posture. ‘Ready’ and ‘On Target’ are the same thing with rifles [firing from the hip is firing when ‘not ready’], but not handguns).
At least, that’s what they told me was considered military standard back then.

Thus, the advantages of Handguns are all about speed shooting (and their light weight, small size, and cheap ammunition), but in the end that amounts to a lot of shooting from the hip.
Keep in mind that that’s perfectly acceptable for the scenarios that handguns were designed for. Short range combat, where bothering to try and aim (traditionally) can and will get you killed.

…Believe it or not, I actually teach Firearms classes here and there and this comes up a lot.

So…

[quote=“Kevin Granade, post:12, topic:6069”]longarm vs pistol…
It’s a bit more intuitive what a reasonable grip is on a pistol than a rifle when you’re a total novice. I found aiming a pistol far easier than a rifle when I was first learning to shoot, There are nuances to pretty much every kind of sight, including scopes. the difference is if you have bad alignment with iron sights you’ll miss all the time, if you have bad alignment with a scope you won’t be able to even SEE your target. On the other hand, it’s way harder to hold a pistol steady than a rifle if you at least have the posture down. i’d pretty much call it a wash.
it might be better to have a cost for bringing your gun to bear on a target seperate from the whole aiming thing, you’d pay this cost when you either fire at or start to aim at a target, you wouldn’t be spending points to just move the targeting cursor around. When your cursor is over an enemy that isn’t your current target, it would give an estimate of how long it would take to switch to that target. this way rifles and shotguns would be cumbersome, but you might be able to aim them quickly once they’re lined up.[/quote]

Yeah, this.

With some crossbows you still have to pull back and lock the arrow into place, and if you’re using a self-made crossbow, that’s gonna be kinda difficult to do. [size=4pt]Mrnocamera Industries would like to inform you that we have no clue what we’re doing.[/size]

I’d like to see some form of this added to melee as well. Simply moving into your enemy will do a wild, hasty attack that does little damage and is less likely to hit, but costs few movement points. Pressing one attack button will do a strong attack, most useful for high strength characters, and pressing a different attack button will do a skilled precision attack, best for high dex or int chars.

This is awesome. Maybe the “f” letter could be used in this case, but just to hit, not to shoot. But it would not let you hit with guns, tough. The good side is that it does not add any other keypress!