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

Gun spawn overhaul #76714

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open

Conversation

Holli-Git
Copy link
Contributor

@Holli-Git Holli-Git commented Sep 28, 2024

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.

@Holli-Git Holli-Git marked this pull request as draft September 28, 2024 19:48
@github-actions github-actions bot added NPC / Factions NPCs, AI, Speech, Factions, Ownership [JSON] Changes (can be) made in JSON Mods Issues related to mods or modding Map / Mapgen Overmap, Mapgen, Map extras, Map display Spawn Creatures, items, vehicles, locations appearing on map Monsters Monsters both friendly and unfriendly. Items: Ammo / Guns Ammunition for all kinds of weapons and these weapons themselves Mods: Magiclysm Anything to do with the Magiclysm mod labels Sep 28, 2024
@github-actions github-actions bot added Mods: No Hope Relating to the mod No Hope Mods: Defense Mode Anything to do with the Defense Mode mod Mods: Innawood 🌲 Anything to do with Innawood mod Mods: Mind Over Matter Mods: Backrooms labels Sep 28, 2024
@github-actions github-actions bot added the astyled astyled PR, label is assigned by github actions label Sep 28, 2024
@github-actions github-actions bot added json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Sep 28, 2024
Copy link
Member

@GuardianDll GuardianDll left a comment

Choose a reason for hiding this comment

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

itemgroups looks okay

@Holli-Git Holli-Git changed the title Gun spawn overhaul Gun spawn overhaul (Don't yet merge) Sep 29, 2024
@Holli-Git Holli-Git marked this pull request as ready for review September 29, 2024 19:43
@github-actions github-actions bot removed the BasicBuildPassed This PR builds correctly, label assigned by github actions label Sep 29, 2024
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Sep 30, 2024
@Holli-Git Holli-Git changed the title Gun spawn overhaul (Don't yet merge) Gun spawn overhaul Sep 30, 2024
@tenehea
Copy link

tenehea commented Sep 30, 2024

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.

This is a very bizarre assertion, unless rifles contains semi-auto pistol caliber rifles.

@Holli-Git
Copy link
Contributor Author

This is a very bizarre assertion, unless rifles contains semi-auto pistol caliber rifles.

Yeah, they do now. Check the changes I've made

@Night-Pryanik
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions Items: Ammo / Guns Ammunition for all kinds of weapons and these weapons themselves [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions Map / Mapgen Overmap, Mapgen, Map extras, Map display Mods: Aftershock Anything to do with the Aftershock mod Mods: Backrooms Mods: Defense Mode Anything to do with the Defense Mode mod Mods: Innawood 🌲 Anything to do with Innawood mod Mods: Magiclysm Anything to do with the Magiclysm mod Mods: Mind Over Matter Mods: No Hope Relating to the mod No Hope Mods Issues related to mods or modding Monsters Monsters both friendly and unfriendly. NPC / Factions NPCs, AI, Speech, Factions, Ownership Spawn Creatures, items, vehicles, locations appearing on map
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants