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

Firearms Overhaul V 1.0 - Ranges converted from Real Values to Relative in game values #22756

Closed
wants to merge 76 commits into from

Conversation

kasanryukin
Copy link
Contributor

@kasanryukin kasanryukin commented Jan 14, 2018

Abstract

Current ballistic calculations in game are not conducive to any firearm beyond a range of 14 tiles with any expectation of accuracy with the exception of the RM11B Sniper Rifle (reason unkown at the moment as it's the only gun with accurate fire at low skill beyond 16 tiles). Calculations only take two factors into consideration for range: recoil and dispersion. While both of these are needed numbers in the calculation, effective firing ranges of guns should also be a factor in the calculation before recoil and dispersion are factored in.

Link to Real Data Spreadsheet: https://docs.google.com/spreadsheets/d/1aGH8N2kITxZ_8i1Vyi1G-FIVfQOTL6euvKxZkYOc-FE/edit?usp=sharing

Outline

The goal of the project is an overhaul in firearms to something both viable in game, but not overtly broken like screwing around with dispersion values. Part one of the project is assigning the RANGE value to every firearm as defined in item.cpp. Numbers are based off the values listed near the end of ranged.cpp as Medium (9 tiles) and Short (4 tiles). Most SMGs and Shotguns fall between the two. Assault rifles, some carbines and some battle rifles, are upgraded to a value of Long (+5 over medium), DMRs/Hunting Rifles/Some Carbines/Some Sniper Rifles, are Upgraded to +10 over medium. Some designated sniper rifles are at +15. Launchers and anti-material weapons were largely left untouched as they already had existing values that exceed the scheme defined above.

Currently, the values don't affect actual accuracy at the extended ranges. This will be altered once code changes are committed that add range values to the math equations for calculating accuracy.

This is very much still a WIP as I'm familiarizing myself with the code related to projectile weaponry.

Edit: Secondary aim of project: Adjust dates of leadworks firearms to match game design.

Current Project Stage

Ranges have now been converted from Real Ranges to Relative Ranges. Most pistols will behave similar to each other. Shotguns have some variation on range, SMGs run the range between a pistol and home made rifle. Rifles were converted based around 14 tiles being a central range and 500m being the median range to achieve 14 tiles. Depending on the effective range of the real weapon, rifles range between 10 and 20 tiles. DMRs, Sniper Rifles, and some Lever action Rifles, fall in the 18-25 tile range. RivTech and Anti-material Sniper Systems fall at the range cap of 30 tiles. Laser weapons had ranges adjusted to fit these values. Some guns had dispersion increased or decreased (no more than 20 MoA) based on RL weapon descriptions.

Ranges adjustments are ready for review before being merged. Once the data is part of the branch, Kevin can use the ranges as part of any future changes to the firearms systems.

Adding gun ranges
added ranges
added ranges
added ranges
added ranges
added ranges
added ranges
added range
added ranges, minor change to the taurus
added ranges
added ranges
added ranges
added ranges
added ranges
added range
added ranges
added ranges
added ranges
added ranges
added ranges
added ranges
added ranges
added ranges, increase range of the RM11B sniper to match other sniper rifles, with RivTech bonus range.
added ranges
added range
@BorkBorkGoesTheCode
Copy link
Contributor

@kasanryukin the git is saying that your PR has merge conflicts because it can't cope with both your 308 changes and my 308 changes here: 299105f This is fixable.

@kasanryukin
Copy link
Contributor Author

@BorkBorkGoesTheCode Fixed

@BorkBorkGoesTheCode
Copy link
Contributor

BorkBorkGoesTheCode commented Feb 4, 2018

Do you have a "fix merge conflicts" button in your UI at the bottom of the PR?

https://help.github.com/articles/about-merge-conflicts/

https://help.github.com/articles/resolving-a-merge-conflict-on-github/

@kasanryukin
Copy link
Contributor Author

In theory I fixed it this time.

@BorkBorkGoesTheCode
Copy link
Contributor

In gun/308.json, line 1467 is missing a comma at the end.

@@ -237,7 +237,7 @@
"ammo": "308",
"ranged_damage": -3,
"magazine_well": 1,
"relative": { "range": -3 }
"relative": { "range": -3 },
"magazine_well": 1
}
Copy link
Contributor

@BorkBorkGoesTheCode BorkBorkGoesTheCode Feb 7, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This magazine_well is causing the buildbot to complain about duplicate entries. No idea why I missed it earlier.

@kasanryukin
Copy link
Contributor Author

Ok, looks like that's actually fixed it

@Firestorm01X2
Copy link
Contributor

And conflicts again.

@BorkBorkGoesTheCode
Copy link
Contributor

I really dislike GitHub because of this stuff.

@Firestorm01X2
Copy link
Contributor

Firestorm01X2 commented Feb 20, 2018

After fixing in should be reviewed. Looks like it affects too much json files and definitely will get conflicts again.

Also it is bad to delay editing ranged balance on forever.

@Night-Pryanik
Copy link

I really dislike GitHub because of this stuff.

That's not GitHub stuff at all. That's Git stuff.

@kasanryukin
Copy link
Contributor Author

Conflicting files contain original date descriptions that were changed per Kevin's statement on when the game takes place, so I'm not going to edit them to be non-conflicting with the master branch. Merging won't directly impact firearms in any way until the code itself references any of the changes I made, but it will fix the descriptions to have non-hard set dates on firearm introduction. Marking this as ready to merge.

@kasanryukin kasanryukin changed the title [REVIEW] Firearms Overhaul V 1.0 - Ranges converted from Real Values to Relative in game values. [RDY] Firearms Overhaul V 1.0 - Ranges converted from Real Values to Relative in game values. Mar 16, 2018
@ZhilkinSerg
Copy link
Contributor

Conflicting files contain original date descriptions that were changed per Kevin's statement on when the game takes place, so I'm not going to edit them to be non-conflicting with the master branch. Merging won't directly impact firearms in any way until the code itself references any of the changes I made, but it will fix the descriptions to have non-hard set dates on firearm introduction. Marking this as ready to merge.

Merging won't be possible until all conflicts are resolved. Conflicting cpp/h will prevent successful compilation, conflicting json will cause errors during loading of data during game start.

@illi-kun illi-kun changed the title [RDY] Firearms Overhaul V 1.0 - Ranges converted from Real Values to Relative in game values. Firearms Overhaul V 1.0 - Ranges converted from Real Values to Relative in game values Mar 17, 2018
fungusakafungus added a commit to fungusakafungus/Cataclysm-DDA that referenced this pull request Apr 1, 2018
using a script from
https://gist.github.com/fungusakafungus/eb2bdf39da73c03dcb2325b3350ff24b#file-gen-mod-from-diff-sh

like this:

git checkout kasanryukin/master
git reset c0e3b6f # fork point

./gen-mod-from-diff.sh PR22756
@ZhilkinSerg ZhilkinSerg added Game: Balance Balancing of (existing) in-game features. (P5 - Long-term) Long-term WIP, may stay on the list for a while. [JSON] Changes (can be) made in JSON Mechanics: Aiming Aiming, especially aiming balance labels Apr 2, 2018
@kevingranade
Copy link
Member

The spreadsheet is here for reference, we never had any intention of applying these adjustments this way, so I'm closing to avoid further confusion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Game: Balance Balancing of (existing) in-game features. [JSON] Changes (can be) made in JSON Mechanics: Aiming Aiming, especially aiming balance (P5 - Long-term) Long-term WIP, may stay on the list for a while.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants