Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ranged weapon rebalance #23720

Merged
merged 138 commits into from
May 17, 2018
Merged

Ranged weapon rebalance #23720

merged 138 commits into from
May 17, 2018

Conversation

Firestorm01X2
Copy link
Contributor

@Firestorm01X2 Firestorm01X2 commented May 12, 2018

Attempt to do something with this:
#22753

Main ideas of rebalance - increase engagement ranges, make sniping over 30 tiles avalible for average character and give better progression to player accuracy based on skill. At the same time I've tried to use simple approach without reinventing ranged balance.

Features:

  • Now both Marksmanship and Gun Skill have considerable effect on player accuracy.
  • Now Gun Skill (like "Rifles", "SMG") actually important and increases chance to hit not just helps with recoil.
  • Significantly increased effective range for competent shooter. In most cases it was doubled.
  • Reduced minimum gun dispersion to 1. So now weapon stats have almost no cap on how accurate it can be.
  • End game player can snipe over all current "reality bubble" as long as weapon allows it.
  • Increased effect of CBM Targeting.
  • Max weapon range become important part of weapon stats since now experienced player can potentially reach it.
  • Changes covered with unit tests.

Idea initially based on:
https://discourse.cataclysmdda.org/t/experimental-builds-with-improved-gun-accuracy-updated-11-05-2018/15131

Outline:
Look for: #21244 (comment)
to get definition of character types.

Range table:

Character >50% good <10% good
Novice pistol 5 15
Novice SMG 7 20
Novice rifle 9 25
Competent pistol 13 35
Competent SMG 20 55
Competent rifle 30 90
God pistol 20 120
God SMG 30 190
God rifle 60 800

I've intended to keep current max weapon ranges. Because:

  1. Some weapons already have max range sized to "reality bubble".
  2. It helps to keep things balanced against melee weapon.
  3. It helps to differentiate gun types.

Notes:

  • Implementation balanced closer to "average" (competent shooter) character with average skills.
  • "God" character may have godlike accuracy limited only with weapon stats. It is intended.
  • "God" character have <10% chance to hit extended far beyond reality bubble. It is intended since it is endgame character designed to almost always hit if he/she has time to aim. Weapons range still limited with reality bubble. Also note that reaching this accuracy level now require both Marksmanship and weapon skill.

Firestorm01X2 added 30 commits March 16, 2018 21:19
first commit
ranged rebalance
Slightly decreases critcal damage of shots. Since you now you can hit a lot more reliable.
reduces critical damage bonus a little more
reduced good hit damage a little
restoring old LIFT strength requirment
Revert my changes (except accuracy mod)
revert
CBM now game same effect as in original targeting CBM
refactored mod formula
Cap avgSkill at 8
refactoring of scaling forumula. Also capping it
is_fake check to exclude turrets from bonus
is_fake()
Firestorm01X2 added 2 commits May 16, 2018 23:03
fix formatting
fix formatting
@Firestorm01X2
Copy link
Contributor Author

Firestorm01X2 commented May 16, 2018

Why not just add the dispersion to the 00 shot and flechtete shells?
There are I think for types of shotgun ammo in the game, so it shouldn't be much work, and that way remains 100% modable

Done. Looks like it is worked out.
But I have to add +800 dispersion to all shot ammo. This way modding shotguns to increase accuracy will be (almost) useless. But anyway, shotguns dipserson stats are mess. Some shotguns twice as accurate as sniper rifes. Some are not.

This way it is stable. But it was strange. Looks like bebore change shotguns relies on sight dispersion to be innacurate. But once I lower it- problems starts to appear. Good thing that it happened only with shotguns- other guns has normal dispersion stats.

Firestorm01X2 added 2 commits May 16, 2018 23:20
fix formatting
Comments
@Firestorm01X2
Copy link
Contributor Author

I has to end somewhere. I think it is time to stop tweaking.

Ready.

@Firestorm01X2
Copy link
Contributor Author

Firestorm01X2 commented May 17, 2018

Jenkins, rebuild.

@kevingranade
Copy link
Member

I have some feedback, but first I want to say thank you for doing this. I know I'm demanding about this and we've argued a lot about how to do this, but you got it done, and I know this kind of balance tweaking is a huge pain in the ass.

I'm going back and forth in my head about specific gun skills contributing to accuracy. The intent is for per-type skills to contribute in other areas, but your point that it makes total mastery just a little harder to achieve is pretty compelling.

I'm having a lot of trouble following your code in player::get_weapon_dispersion(), part of it can just be simplified, and part of it is just adding things that don't need to happen, i.e. the skill boost for having the targeting CBM doesn't impact the tests and shouldn't be present in this PR.

If the code is going to have that many sub-values and interactions between them, it needs a LOT better documentation of how it works and why it's doing what it's doing.

@Firestorm01X2
Copy link
Contributor Author

Firestorm01X2 commented May 17, 2018

skill boost for having the targeting CBM doesn't impact the tests and shouldn't be present in this PR

That CBM in fact in is part of dispersion calculation. So it has to be taken in account also. It was so even before my changes.

From realisation perspective:
I did it because I wanted to get noticable effect for CBM targeting. Current
dispersion.add_multiplier( 0.75 );
now may give much less effect since overall dispersion are lower.

Additonaly at some point I wanted to remove multiplier compeletely to left only skill boost part (player has CBM not the gun itself). But it make usefeull to install that CBM even if player at max skill already.

From logic (and description) perspective:
This CBM by its description do 2 things:

  1. Control player hands partially
  2. Project some kind of range finder to player sight.

First can be considered as new skill boost part.
Second - as existent overall dispersion reduction by multiplier.

Also it affects only 2 lines of code. Separate PR definitely not worth it.

Also do not forget that "skill boost part" is not "true" skill boost. It affects only dispersion calculation but not the weapon recoil handling or aiming time.

I'm having a lot of trouble following your code in player::get_weapon_dispersion(), part of it can just be simplified, and part of it is just adding things that don't need to happen,

I'll add more comments.

@kevingranade kevingranade merged commit ace1bac into CleverRaven:master May 17, 2018
@Firestorm01X2
Copy link
Contributor Author

Thank you!
Finally rebalance is here.

@BorkBorkGoesTheCode
Copy link
Contributor

I'm going to update the shotgun shells, unless you want to.

@Firestorm01X2
Copy link
Contributor Author

Firestorm01X2 commented May 17, 2018

I'm going to update the shotgun shells, unless you want to.

I've added dispersion already in this PR.

But go ahead if you want to change something. Don't wait me.

@BorkBorkGoesTheCode
Copy link
Contributor

I was talking about the 20x66s .22 ratshots and .410s: they're still have the old dispersion values.

@BorkBorkGoesTheCode
Copy link
Contributor

The WIndows x64 build is marked dirty.

@Firestorm01X2
Copy link
Contributor Author

Firestorm01X2 commented May 17, 2018

I was talking about the 20x66s .22 ratshots and .410s: they're still have the old dispersion values.

Ow I don't touch it. Yes do it.

As I said I've added +800 dispersion.

@narc0tiq
Copy link
Contributor

narc0tiq commented May 17, 2018

@BorkBorkGoesTheCode

The WIndows x64 build is marked dirty.

I think that's from the file src/crafting.cpp that managed to get committed with CRLF line endings (somehow ignoring the .gitattributes, which wants to put it back to normal).

I guess I should PR a fix to that, else everything's going to be marked -dirty forever. Edit: #23746.

BorkBorkGoesTheCode added a commit to BorkBorkGoesTheCode/Cataclysm-DDA that referenced this pull request May 17, 2018
… and buffed 20x66mm slug dispersion

Added 800 dispersion to 20x66mm .410 and .22 rat-shot shotshells as Firestorm01X2 did in CleverRaven#23720 (comment) Buffed 20x66 slug and derivatives dispersion to 80
@BorkBorkGoesTheCode
Copy link
Contributor

Increased shot dispersion by 800 here: #23747

@BorkBorkGoesTheCode
Copy link
Contributor

@Firestorm01X2 why were LIFT requirements changed here 930de0a?

@cainiaowu
Copy link
Contributor

It is reverted in e5b8338.

@Firestorm01X2
Copy link
Contributor Author

@Firestorm01X2 why were LIFT requirements changed here 930de0a?

It is reverted in e5b8338.

@BorkBorkGoesTheCode

Indeed. This PR branch based of my old rebalance fork branch. I did there not only accuracy changes. But it was reverterd, yes.

@vipches
Copy link
Contributor

vipches commented Jul 17, 2018

Hi, Firestorm, I actually have one thing to ask, what about the monster who can shooting too? So far as we know, those monster, like turrets, I don't know why, but they seems can actually shoot any target without miss a single bullet, so does the NPC too, and the robots like W11B10 or something like that, can almost never miss the shot on the target, even in a far distance, I remember when I wear a full power armor going to the base, and those robot just shoot me directly without miss, I try to shoot them in the same distance that they can shoot me, and I found out I can't actually catch up them, they always doing shooting one step before me, and anytime I taking hit(will no damage) I reduce my accuracy, and has to start all over, but due they are faster aiming the target than me, I can't doing anything to shoot back, cause I'm keep taking hit, the same thing happen on the turrets too, and something the NPC can took the shoot first too, and they are keep going and going, make you unable to doing anything about it, So, I want to know, if there is anything that can doing about this situation? al least make those shooter have a chance to miss the target?

@Firestorm01X2
Copy link
Contributor Author

Firestorm01X2 commented Jul 17, 2018

@vipches
Yes You are right.
About robots:

  1. Robots has high skills.
  2. Robots has no encumbrance
  3. Robots don't need to aim.
  4. Most shooting robots are small so it is twice as harder to hit them.

Robots was accurate before. But now they are much more accurate. Just like very experienced player character in most cases.

And looks like it is just like it should be. Look at Kevin's response:
#23720 (comment)

This is the opposite of maintaining balance, afaict this means robots are always going to lose in a shootout with an even average player, that is not how it is intended to work. If I'm wrong and only very high level characters can outshoot robots for some reason, then it's not that big a deal, though I still don't like that it establishes a seperate accuracy curve for players vs non-players.

Initially I've planned to reduce accuracy bonus for non NPC. But idea was declined. Yes robots designed to be very accurate.

What to do? Simple - grab better gun, customize it and raise your skill - and eventually you will outrange most robots. Shoot them before they can shoot you. Starting "fair shootout" with robots is bad idea.

I've done testing. Default military recruit with m4 vs guard bot. Recruit has chance to kill bot with auto fire if he start aim preemptively. But in "fair fight" player likely will be shredded pretty quickly.

NPC at the other hand closer to your character and they must aim. But looks like that NPC programmed to take only reliable shots. So if they shoot you- they likely to hit you.

@kevingranade
Copy link
Member

This pull request has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there:

https://discourse.cataclysmdda.org/t/request-to-developers/22170/1

@kevingranade
Copy link
Member

This pull request has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there:

https://discourse.cataclysmdda.org/t/apologies-to-community/22942/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Game: Balance Balancing of (existing) in-game features. Mechanics: Aiming Aiming, especially aiming balance
Projects
None yet
Development

Successfully merging this pull request may close these issues.