-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Gun spawn overhaul #76714
Gun spawn overhaul #76714
Conversation
Replaces it with a much cleaner and easier solution, just adds a magazine to display guns
They were a mess and a hassle to try and implement into the newer system, as because they spawned with all the barrel lengths you'd end up with "commonly owned" rifles that were illegal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
itemgroups looks okay
ac444fd
to
26a6a30
Compare
This is a very bizarre assertion, unless rifles contains semi-auto pistol caliber rifles. |
Yeah, they do now. Check the changes I've made |
data/json/itemgroups/Weapons_Mods_Ammo/conversions/nested_conversion_guns.json
Outdated
Show resolved
Hide resolved
data/json/itemgroups/Weapons_Mods_Ammo/conversions/nested_conversion_guns.json
Outdated
Show resolved
Hide resolved
…ersion_guns.json Co-authored-by: TheShadowFerret <[email protected]>
…ersion_guns.json Co-authored-by: TheShadowFerret <[email protected]>
…aclysm-DDA into gun_spawn_overhaul
This is a big chunk of changes. It's really hard to review it properly (for me, at least). May I suggest splitting this PR into a smaller pieces, for example first one for pistols, second one for shotguns etc? |
That would've been fairly harder to do, as since they cover a lot of the same areas it would introduce a lot of merge conflicts. Guns are also pretty interconnected, and I'm unsure if I could sort them into pistol/shotgun/rifle. Though I do understand where you're coming from, and am thankful for the review, so in the future I'll split it up into different PRs. |
Ran my demographics test on top of this to see if anything skewed badly. tl;dr nothing horrific, rifles vs pistols is kind of out of whack, but my source for that is pretty sketchy to start with, and I don't know if this PR did it or if it was already there. I'll rerun on before-this-change to check, but it takes 8h to run so I'll have results tomorrow (EDIT: if I remember to start it, which I did not).
|
Belated rerun from before this PR:
In short, it was already skewed this direction, though this PR might have contributed a bit. |
Summary
Content "Overhaul gun spawning"
Purpose of change
Gun spawns are all over the place. There's not much rhyme or reason why a gun would spawn in its quantity besides guesswork. This PR aims to bring gun spawns in-line with real-world numbers, so there's less of a headache when adding new guns. This information was based mostly on gunbroker results, and #37571.
Describe the solution
Uses gunbroker and #37571 to gauge how often a caliber should spawn, and how often a gun should spawn. This is by no means perfect and has lots of flaws, but currently its the best solution due to a lack of any other information.
Removes itemgroups like rare/obscure guns and smg groups. This is because before, "rare guns" had a fixed chance to spawn somewhere, despite rarity not really working like that. Instead, guns now have to get a good dice roll to spawn somewhere, instead of it being fixed. SMG spawns were removed as a civilian can't really own an actual SMG, and so it was better split into either pistols or rifles.
Adjusts some behavior of conversion gun spawns, as they could spawn in guns you could not easily legally own.
Describe alternatives you've considered
Not doing this, it was a whole lot of work.
Testing
Loaded up a world before changes, loaded into the same one after without any errors. Tested a few itemgroups in game, such as the display ones to make sure no ammo spawned with it, etc.
Additional context
Caused by #75925. Also requires a lot of reworking of guns, and ammo spawns. Yay.