Author Topic: Breaking the "more accurate weapons are always better" disfunction.  (Read 2164 times)

Offline Kevin Granade

  • Administrator
  • Survivor
  • *****
  • Posts: 5588
  • I code dead people.
    • View Profile
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.
Its like a fun family cookout, except your family is burning in flames while trying to eat you. -secretfire
I'm more excited than a survivor on meth and toast'ems. -Nighthawk
The the giant wasp is slammed through the zombie brute!

Offline tarburst98

  • NPC
  • **
  • Posts: 213
    • View Profile
Re: Breaking the "more accurate weapons are always better" disfunction.
« Reply #1 on: July 31, 2017, 12:51:07 PM »
the problem is not all enemies would even ATTEMPT  to dodge, ether from lack of intelligence or lack or knowledge that guns are bad. why would a mi-go avoid the direction a puny human is pointing a tube? and a zombie hulk would only think  "SMASH!!!" and move directly towards you. dodging in melee is almost completely instinct, an attempt to avoid the object coming towards you so even nearly brain dead critters would try to dodge a fist or a baseball bat.

so you would need to add dodge rate/speed/aim cost to every monster individually not just a flat rate based on distance.

also, recoil makes using rifles in close range a bad idea anyway,  you get one good shot then recoil makes you too inaccurate to get another shot off in time.

Offline Alec White

  • NPC
  • **
  • Posts: 215
  • I'm shy
    • View Profile
Re: Breaking the "more accurate weapons are always better" disfunction.
« Reply #2 on: July 31, 2017, 01:07:21 PM »
the problem is not all enemies would even ATTEMPT  to dodge, ether from lack of intelligence or lack or knowledge that guns are bad. why would a mi-go avoid the direction a puny human is pointing a tube? and a zombie hulk would only think  "SMASH!!!" and move directly towards you. dodging in melee is almost completely instinct, an attempt to avoid the object coming towards you so even nearly brain dead critters would try to dodge a fist or a baseball bat.

That's interesting, as only intelligent monsters that know what ranged weapons are would try to dodge them.

By the way, does this mean that the player has now a dodge speed too against ranged weapons?

Offline leebash

  • Zombie Food
  • *
  • Posts: 78
    • View Profile
Re: Breaking the "more accurate weapons are always better" disfunction.
« Reply #3 on: July 31, 2017, 02:58:33 PM »
Now I wonder why a NPC headshots you often, while you can't kill them in the same fashion.

They don't dodge your attacks, but the bullets tend to avoid their head and torso.

Offline Litppunk

  • Survivor
  • ***
  • Posts: 4358
  • Laughing at death: the answer to impossible
    • View Profile
Re: Breaking the "more accurate weapons are always better" disfunction.
« Reply #4 on: July 31, 2017, 03:59:21 PM »
the problem is not all enemies would even ATTEMPT  to dodge, ether from lack of intelligence or lack or knowledge that guns are bad. why would a mi-go avoid the direction a puny human is pointing a tube? and a zombie hulk would only think  "SMASH!!!" and move directly towards you. dodging in melee is almost completely instinct, an attempt to avoid the object coming towards you so even nearly brain dead critters would try to dodge a fist or a baseball bat.
That's interesting, as only intelligent monsters that know what ranged weapons are would try to dodge them.

By the way, does this mean that the player has now a dodge speed too against ranged weapons?
Getting this realistic, creatures that  are smart enough to avoid dangers, but do not know people well enough would not know what guns do until the first shot, and maybe not even then, would get progressively better at avoiding aim as their understanding of what the danger is gets better, until it maxes relative to their intelligence (and perception?)

Already I think this might be getting to involved, but since I've come this far:

My go to example for this is wolves. They would understand to avoid something slow like a thrown rock instinctively, but would either:
(click to show/hide)
*sigh* intelligence in regards to guns creates too much variables. This would need to be simplified somehow if used.

anyhow, I think something like this would be the result and the grand scale, possibly with % chance on spawn for (a) or (b) based on creature type
(scrap spoiler, unfinished. Changed my mind once I started. I no longer like this breakdown so much)
(click to show/hide)
Feeds both of grandpas wolves, and but doesn't let them fight; Then saves the car full of cash sells it and starts an orphanage, anti-railroad-tying shenanigans-organization and invests.

Offline §k

  • Survivor
  • ***
  • Posts: 512
    • View Profile
Re: Breaking the "more accurate weapons are always better" disfunction.
« Reply #5 on: July 31, 2017, 04:17:48 PM »
That's very advanced AI.

Offline Litppunk

  • Survivor
  • ***
  • Posts: 4358
  • Laughing at death: the answer to impossible
    • View Profile
Re: Breaking the "more accurate weapons are always better" disfunction.
« Reply #6 on: July 31, 2017, 04:47:01 PM »
you can see why I abandoned even the vague outline of such a thing. It was spiraling out of controll. Needs to be simplifed more than that. Agression levels are already a thing I believe, perhaps work a simple formula off of that and "intelligence" level of species. would be best. Assume all creatures have at least heard a gun before, or are smart enough to figure it out if they care.
Feeds both of grandpas wolves, and but doesn't let them fight; Then saves the car full of cash sells it and starts an orphanage, anti-railroad-tying shenanigans-organization and invests.

Offline Kevin Granade

  • Administrator
  • Survivor
  • *****
  • Posts: 5588
  • I code dead people.
    • View Profile
Re: Breaking the "more accurate weapons are always better" disfunction.
« Reply #7 on: July 31, 2017, 06:05:05 PM »
General clarifications:
Only monsters with a dodge score will be affected by this, if a monster moves in straight lines at a constant speed, they generally won't have a dodge score.
Dodging in this context includes any rapid and/or erratic movement, so e.g. a squirrel has a high dodge score, despite having no idea what a gun is. Zombies aren't usually that fast, but they are quite erratic, so they'd have a madiochre dodge score.
There's a nuanced additional feature that breaks dodge score into passive and active values.  Most creatures aren't going to be expending effort to move a lot if they aren't aware of any danger.

the problem is not all enemies would even ATTEMPT  to dodge, ether from lack of intelligence or lack or knowledge that guns are bad. why would a mi-go avoid the direction a puny human is pointing a tube? and a zombie hulk would only think  "SMASH!!!" and move directly towards you.
Mi-gos are quite intelligent, they would generally know what a gun is in general terms, and as they aren't indestructible, they're certainly self-interested enough to dodge.  Hulks wouldn't dodge intentionally, but they naturally move quite erratically, which serves the same purpose.
Its like a fun family cookout, except your family is burning in flames while trying to eat you. -secretfire
I'm more excited than a survivor on meth and toast'ems. -Nighthawk
The the giant wasp is slammed through the zombie brute!

Offline John Candlebury

  • Contributor
  • Survivor
  • ****
  • Posts: 3240
    • View Profile
    • My deviantart
Re: Breaking the "more accurate weapons are always better" disfunction.
« Reply #8 on: July 31, 2017, 06:42:52 PM »
General clarifications:
Only monsters with a dodge score will be affected by this, if a monster moves in straight lines at a constant speed, they generally won't have a dodge score.


Im not sure if this should be tyied to just dodge skill. Imagine the scenario:

-A high dodge monster, say a duck, unaware of the player,  randomly moving between a few tiles.
-A patrolling NPC with a high dodge or if you plan to exclude NPCs from this, an attack dog type pet following the NPC. Again unaware of the player.

In neither of those cases it makes sense for the monsters to "dodge" out of the players aim.

---

I think this would work better if it worked like this:

-Give monsters two different movement speeds, one for  randomly walking around and for when they are fleeing or chasing something.
-Give an aiming penalty to anything that moves faster than certain speed.
-Then if the monster is moving faster than X speed you can add an extra penalty based on their dodge score.


Either way I think this probably wouldn't make the less accurate weapons any better. It would just reinforce the current status of high accuracy pistols/shotguns as the best firearms in the game.


Offline End Transmission

  • NPC
  • **
  • Posts: 124
  • Final report of the commercial starship Nostromo..
    • View Profile
    • End Transmission Games
Re: Breaking the "more accurate weapons are always better" disfunction.
« Reply #9 on: July 31, 2017, 06:48:33 PM »
Question the first: does a gun with a high 'Aim Speed' or a low 'Aim Speed' aim faster? This is entirely opaque from the player perspective.
Final report of the commercial starship Nostromo, third officer reporting. The other members of the crew - Kane, Lambert, Parker, Brett, Ash, and Captain Dallas - are dead. Cargo and ship destroyed. I should reach the frontier in about six weeks. With a little luck, the network will pick me up.

Offline Alec White

  • NPC
  • **
  • Posts: 215
  • I'm shy
    • View Profile
Re: Breaking the "more accurate weapons are always better" disfunction.
« Reply #10 on: July 31, 2017, 06:52:58 PM »
In neither of those cases it makes sense for the monsters to "dodge" out of the players aim.

It doesn't dodge, it moves, which I think, effectively speaking is the same as dodging.

Unless you want to add an "active dodge" by making that a monster which has detected an enemy has increased dodge or "active" dodge.

Offline John Candlebury

  • Contributor
  • Survivor
  • ****
  • Posts: 3240
    • View Profile
    • My deviantart
Re: Breaking the "more accurate weapons are always better" disfunction.
« Reply #11 on: July 31, 2017, 06:55:10 PM »
In neither of those cases it makes sense for the monsters to "dodge" out of the players aim.

It doesn't dodge, it moves, which I think, effectively speaking is the same as dodging.

Yes if it "moves" out of your aim it makes more sense to attach the penalty to movement speed instead of dodge skill

Offline Litppunk

  • Survivor
  • ***
  • Posts: 4358
  • Laughing at death: the answer to impossible
    • View Profile
Re: Breaking the "more accurate weapons are always better" disfunction.
« Reply #12 on: July 31, 2017, 11:06:51 PM »
Ah, Good. Should have assumed Kevin would have already thought this out

oops, never posted....
Feeds both of grandpas wolves, and but doesn't let them fight; Then saves the car full of cash sells it and starts an orphanage, anti-railroad-tying shenanigans-organization and invests.

Offline Kevin Granade

  • Administrator
  • Survivor
  • *****
  • Posts: 5588
  • I code dead people.
    • View Profile
Re: Breaking the "more accurate weapons are always better" disfunction.
« Reply #13 on: August 01, 2017, 02:36:23 AM »
General clarifications:
Only monsters with a dodge score will be affected by this, if a monster moves in straight lines at a constant speed, they generally won't have a dodge score.

Im not sure if this should be tyied to just dodge skill. Imagine the scenario:
...
In neither of those cases it makes sense for the monsters to "dodge" out of the players aim.
You missed this part.
There's a nuanced additional feature that breaks dodge score into passive and active values.  Most creatures aren't going to be expending effort to move a lot if they aren't aware of any danger.
-Give monsters two different movement speeds, one for  randomly walking around and for when they are fleeing or chasing something.
-Give an aiming penalty to anything that moves faster than certain speed.
-Then if the monster is moving faster than X speed you can add an extra penalty based on their dodge score.
Moving isn't dodging and speed isn't the same as dodge ability.
It's totally reasonable for a creature to dodge without moving to another square, and likewise a moving creature isn't necessarily exerting itself to dodge.
Consider a small, fast creature, it might be great at dodging because it can move very fast for its size and change directions many times within a short time period, but it's overall speed isnt necessarily that high.  Likewise you have fast creatures that can't change direction quickly, they might have very high speed but only ok dodge.
Either way I think this probably wouldn't make the less accurate weapons any better. It would just reinforce the current status of high accuracy pistols/shotguns as the best firearms in the game.
Put another way, this works toward extending the effective range of rifles without making them the ultimate weapon.
Its like a fun family cookout, except your family is burning in flames while trying to eat you. -secretfire
I'm more excited than a survivor on meth and toast'ems. -Nighthawk
The the giant wasp is slammed through the zombie brute!

Offline Coolthulhu

  • Contributor
  • Survivor
  • ****
  • Posts: 3839
    • View Profile
Re: Breaking the "more accurate weapons are always better" disfunction.
« Reply #14 on: August 01, 2017, 03:22:37 AM »
Overall the idea sounds good, but it would also need to involve serious rebalancing of the weaker weapons, not just nerfing rifle aim times.
Current firearms are very high damage, but very unreliable. This is a big part of why rifles are the best: they are high burst damage incarnate.

A good way to refine it would be to not just make monsters increase aim time, but hard low-cap aiming recoil depending on their dodge score.
Hard low cap and not soft one provided by aim time increases, because the problem is huge damage headshots, not reliable good hits.

Also about headshots: they currently have gigantic damage modifiers, while grazes are abysmal. This huge spread of ranged damage potential heavily favors high accuracy, high damage weapons being used at point blank.