Magazines add volume to pistols, like the Berreta Px4 Storm, when the magazine is inside the grip of the gun.
Magazines should not add to the volume of the weapon.
https://cdn.discordapp.com/attachments/598523535169945607/721055229931683970/unknown.png
https://cdn.discordapp.com/attachments/598523535169945607/721055233228144810/unknown.png
A loaded magazine doesn't seem to add to the weight of the gun, just the volume.
Confirmed; separately, the Px4 is 0.51 L, and the magazine 0.34 L:
When loaded, they total to 0.84 L:
That is the issue with every weapon, no matter how it reloads - with magazines or only with bullets. Bullets volume adds to magazine (or straight to the gun, in case of most shotguns and similar guns), than combined volume of bullets and magazine adds to the gun.
Bullets should not change volume of guns (if it not RPG-7, speargun or something), but magazines are difficult case. Pistol magazines fully fits inside gun's handle, but there is extended variants that should partially increase gun's volume. Magazines of most rifles are partially covered by rifle when attached to it, so not all magazine volume should be added to rifle's volume, but to implement how much volume of every magazine should not adds to every gun is pretty big task, in my opinion.
As for bullets and mags, mb it is issue of nested containers and mags should be considered "not rigid" to not increase their volume?
The problem is the pockets not being rigid. I quickly automated them for infrastructure work but they need auditing for content standards. The numbers for mag wells are way out right now.
pockets not being rigid but with an added magazine_well
volume is the intended way to deal with it. should be a json fix, but it'll be a lot of json editing.
To clarify, guns with a MAGAZINE_WELL
pocket ought to define a "magazine_well"
volume for the largest magazine that will fit without sticking out.
For example, to give the Beretta Px4 Storm a magazine well large enough to contain the standard 250 ml magazine, you'd set a "magazine_well" volume in the gun's "MAGAZINE_WELL" pocket:
"id": "px4",
"type": "GUN",
"pocket_data": [
{
"pocket_type": "MAGAZINE_WELL",
"//": "magazines over 250 ml stick out. Only works if rigid is false (default)",
"magazine_well": "250 ml"
}
]
This means that any magazine up to 250 ml will not add to the gun's volume, but magazines larger than that will stick out and increase the volume.
The magazine itself (having a "type" and/or "pocket_type" of "MAGAZINE") can be handled similarly, but I assume it's less likely for magazine volume to be increased by ammo sticking out the end, so those could be modeled by making them "rigid" instead:
"id": "px4mag",
"type": "MAGAZINE",
"volume": "250 ml",
"pocket_data": [
{
"pocket_type": "MAGAZINE",
"//": "this magazine is rigid, so volume is always the same",
"rigid": true
}
]
There may be some exceptions to this; I know very little about guns. The "magazine_well" size probably needs to be evaluated for each gun to give them reasonable values. The pocket data are documented further in JSON_INFO.md.
@KorGgenT @ymber Please correct me if my assumptions or advice are off-base. I wanted to explain things a little more thoroughly, since these kinds of JSON edits are a good opportunity for new contributors.
@wapcaplet You are correct. I attempted to fix this issue in my ex PR that made all magazine wells rigid, which I submitted the same time as #41038. That was "fine" on my end for quite a while and allowed guns to be holstered. However no gun increased in volume with extended magazines.
Once #41123 was merged however the "solution" of making all magazine wells rigid causes the UI to display 20L per every gun in your inventory (since every MAGAZINE_WELL atm is 20L). So that is no longer a viable solution.
The only actual fix is lots of JSON magazine_well/rigid entries, combined with more json for magazine sizes for the system to work as intended.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not \'bump\' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.
This issue has been automatically closed due to lack of activity. This does not mean that we do not value the issue. Feel free to request that it be re-opened if you are going to actively work on it
Most helpful comment
To clarify, guns with a
MAGAZINE_WELL
pocket ought to define a"magazine_well"
volume for the largest magazine that will fit without sticking out.For example, to give the Beretta Px4 Storm a magazine well large enough to contain the standard 250 ml magazine, you'd set a "magazine_well" volume in the gun's "MAGAZINE_WELL" pocket:
This means that any magazine up to 250 ml will not add to the gun's volume, but magazines larger than that will stick out and increase the volume.
The magazine itself (having a "type" and/or "pocket_type" of "MAGAZINE") can be handled similarly, but I assume it's less likely for magazine volume to be increased by ammo sticking out the end, so those could be modeled by making them "rigid" instead:
There may be some exceptions to this; I know very little about guns. The "magazine_well" size probably needs to be evaluated for each gun to give them reasonable values. The pocket data are documented further in JSON_INFO.md.
@KorGgenT @ymber Please correct me if my assumptions or advice are off-base. I wanted to explain things a little more thoroughly, since these kinds of JSON edits are a good opportunity for new contributors.