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

Projects
None yet
10 participants
@kasanryukin
Copy link

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.

kasanryukin added some commits Jan 13, 2018

Update 20x66mm.json
Adding gun ranges
Update 22.json
added ranges
Update 223.json
added ranges
Update 300.json
added ranges
Update 3006.json
added ranges
Update 308.json
added ranges
Update 32.json
added ranges
Update 36paper.json
added range
Update 38.json
added ranges, minor change to the taurus
Update 40.json
added ranges
Update 40mm.json
added ranges
Update 44.json
added ranges
Update 44paper.json
added ranges
Update 45.json
added ranges
Update 454.json
added range
Update 46.json
added ranges
Update 500.json
added ranges
Update 57.json
added ranges
Update 700nx.json
added ranges
Update 762.json
added ranges
Update 762R.json
added ranges
Update 762x25.json
added ranges
Update 8x40mm.json
added ranges, increase range of the RM11B sniper to match other sniper rifles, with RivTech bonus range.
Update 9mm.json
added ranges
Update 9x18.json
added range
Update blunderbuss.json
added range
Update flammable.json
added range
Update metal_rail.json
added range
@BorkBorkGoesTheCode

This comment has been minimized.

Copy link
Contributor

commented Feb 4, 2018

@kasanryukin

This comment has been minimized.

Copy link
Author

commented Feb 6, 2018

In theory I fixed it this time.

@BorkBorkGoesTheCode

This comment has been minimized.

Copy link
Contributor

commented Feb 6, 2018

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
}

This comment has been minimized.

Copy link
@BorkBorkGoesTheCode

BorkBorkGoesTheCode Feb 7, 2018

Contributor

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

@kasanryukin

This comment has been minimized.

Copy link
Author

commented Feb 7, 2018

Ok, looks like that's actually fixed it

@Firestorm01X2

This comment has been minimized.

Copy link
Contributor

commented Feb 19, 2018

And conflicts again.

@BorkBorkGoesTheCode

This comment has been minimized.

Copy link
Contributor

commented Feb 19, 2018

I really dislike GitHub because of this stuff.

@Firestorm01X2

This comment has been minimized.

Copy link
Contributor

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

This comment has been minimized.

Copy link
Member

commented Feb 20, 2018

I really dislike GitHub because of this stuff.

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

@kasanryukin

This comment has been minimized.

Copy link
Author

commented Mar 16, 2018

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

This comment has been minimized.

Copy link
Contributor

commented Mar 16, 2018

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

Rewrites CleverRaven#22756 as json-only mod
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
@kevingranade

This comment has been minimized.

Copy link
Member

commented May 8, 2018

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
You can’t perform that action at this time.