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

Add gun-mounted ammo holders #70858

Closed
wants to merge 8 commits into from

Conversation

worm-girl
Copy link
Contributor

@worm-girl worm-girl commented Jan 12, 2024

Summary

Features "Adds mods for guns, rifles, and bows that create a pocket for extra ammo"

Purpose of change

IRL there are little doodads you can strap to your gun that hold a few shells or cartridges for quick reloading. There are also bow-mounted quivers. Given that reload speed is a major factor for weapons that reload one round at a time, it would be useful to have these in the game.

closes #69943

Describe the solution

Adds a few mods with a pocket that hold a the appropriate ammo type and can be fitted to the weapon. These will have a base item retrieval speed of 25 moves, putting them on par with the shell loops on a tac vest.

  • Leather and plastic varieties for shotguns and hunting rifle calibers
  • A plastic holder that goes to a compound bow
  • A leather holder that goes to a primitive bow, handmade only
  • recipes for all of the above

Describe alternatives you've considered

None yet.

Testing

WIP

Additional context

image
image

@github-actions github-actions bot added [JSON] Changes (can be) made in JSON [C++] Changes (can be) made in C++. Previously named `Code` Items: Ammo / Guns Ammunition for all kinds of weapons and these weapons themselves Items: Containers Things that hold other things <Enhancement / Feature> New features, or enhancements on existing json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Jan 12, 2024
@github-actions github-actions bot added the astyled astyled PR, label is assigned by github actions label Jan 12, 2024
@worm-girl
Copy link
Contributor Author

These are working, but I don't know how to make them dump out their items when detached from the gun, so they delete the shells. Once I figure that out I can add all the other varieties and recipes.

@Hyperseeker
Copy link
Contributor

Do they have to dump the ammo? Shells can stay inside a shell holder just fine on their own. (Same as any such ammo holder, really.) Can the ammo be transferred to the gunmod when it's detached? (And vice versa: can ammo inside a detached gunmod stay in the gunmod when it's attached?)

@worm-girl
Copy link
Contributor Author

Do they have to dump the ammo? Shells can stay inside a shell holder just fine on their own. (Same as any such ammo holder, really.) Can the ammo be transferred to the gunmod when it's detached? (And vice versa: can ammo inside a detached gunmod stay in the gunmod when it's attached?)

They do. The way mod pockets are set up is that the pocket disappears entirely when you take it off the gun. So either the shells need to come out or they get deleted.

"price_postapoc": 50,
"install_time": "30 s",
"material": [ "plastic" ],
"flags": [ "NOT_MAGAZINE", "TARDIS" ],
Copy link
Contributor

Choose a reason for hiding this comment

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

Why does this need TARDIS flag, a magazine well that covers the volume of the shotshell that isn't poking out should suffice 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, either the pocket is rigid and takes up the full space even without contents or it's not rigid and every loaded shell increases the size accordingly. From the images I'd expect the latter.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It doesn't. I had it on there while trying to figure out a way to keep the shells from falling out when a full holder was removed, but it didn't work and I haven't gotten around to fixing it. Note that this PR is marked draft and is not ready for review.

"flags": [ "NOT_MAGAZINE", "TARDIS" ],
"symbol": ":",
"color": "black",
"location": "loading port",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"location": "loading port",
"location": "rail",

Stock-mounted versions also exist https://www.midwayusa.com/product/1014560565?pid=668092
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Isn't the rail on the top of the gun? It wouldn't go up there.

Stock mounted versions are planned. This is a draft.

Copy link
Contributor

Choose a reason for hiding this comment

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

The "rail" rail is on the side. It's where non-underbarrel laser sights go. (There are also underbarrel and top rails, which are referred to in-game as "underbarrel" and "sights" locations.)

On pump-action (and modern automatic) shotguns, the side rail would likely be on the forend (the thing you "pump" after each shot, the thing that goes chuck-chuck). This isn't an adequate position for a shell holder, since a filled holder would interfere with one's ability to grip the forend. See this replacement forend with an underbarrel rail and two side rails:

https://trinitysupply.com/cdn/shop/files/2_042cc13a-522b-42f6-9c74-c1022d30baed.jpg

But since we don't have a "body" location or something, rails would do.

Copy link
Contributor Author

@worm-girl worm-girl Jan 13, 2024

Choose a reason for hiding this comment

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

image

I don't see any that fit on the forend, but I see a bunch that straddle the receiver and add a top rail to the gun. Not sure how we'd represent that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image
I guess there are these, but this doesn't look like something that would fit on any old gun. I think my PR will just add generally-applicable mods and I'll leave the hyper-specifics to others.

Copy link
Contributor

Choose a reason for hiding this comment

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

They don't necessarily go over the top. Looks like they're mostly held by the pins(?) on the shotgun's body, as can be seen in the (poor-quality, but legible) instructions on this product:

https://www.amazon.com/TacStar-6-Shot-Sidesaddle-Black/dp/B001AMZXQI

Which, again, might require a special slot on shotguns, which may or may not be beyond this PR's scope.

@github-actions github-actions bot added <Bugfix> This is a fix for a bug (or closes open issue) and removed json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Jan 13, 2024
@BlizzDA
Copy link
Contributor

BlizzDA commented Jan 14, 2024

I'd like to bring up the existence of magazine pouches for the stock. To hold magazines or stripper clips. Here's an older example.

More details
WW II M1 carbine with a magazine pouch mounted on the stock that held two spare 15-round magazines and 10 .30 Carbine rounds on a stripper clip.

But there's also more modern variants for the M4/M15/M16. Fits regular and collapsible stocks. Holds 1 magazine. Here's a video of one being attached.
https://www.youtube.com/watch?v=OZvNycXuZSA&t
Should be able to be attached to any MOLLE gear as a regular holder IRL.

Don't quite have the time to check how it looks for other calibers/mag types on other guns in detail. But there's also a 2 Mag capacity (10 rounds) for the mini-14.
913-2

@worm-girl
Copy link
Contributor Author

Mag pouches are a good idea.

I also want to do bandolier straps, but it's all waiting on a fix for #70925

@carlarctg
Copy link
Contributor

There's an issue I ran into when adding the Steyr Scout and its hollow stock, selecting two magazines to fit into the stock caused an error. Everything worked perfectly besides that, it still refused to slot two in.

Speaking of, you may want to look into the Scout's hollow stock to adjust its stats since you're more familiar with the code, especially now, than me.

@kevingranade
Copy link
Member

Inactive for 7 months.

@TheShadowFerret TheShadowFerret mentioned this pull request Sep 12, 2024
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 <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` <Enhancement / Feature> New features, or enhancements on existing Items: Ammo / Guns Ammunition for all kinds of weapons and these weapons themselves Items: Containers Things that hold other things [JSON] Changes (can be) made in JSON
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Shell Holders
7 participants