Cataclysm-dda: Modifying some weapons removes ability to load it afterward

Created on 15 Jul 2020  路  9Comments  路  Source: CleverRaven/Cataclysm-DDA

Describe the bug

Some weapons that have been modified can not be loaded with any ammunition or clips.

Steps To Reproduce

  1. get latest build, compile
  2. new game, spawn mosin rifle, some mods (i've used suppressor)
  3. reload/shoot weapon to check if it works
  4. unload weapon, it shows "Mosin-Nagant 1891/30 (0/5 7.62x54mm)" (proper message)
  5. attach suppressor
  6. weapons shows now: "Mosin-Nagant 1891/30 (7.62x54mm)" (improper message)
  7. weapon can not be loaded neither with clip or loose ammo

Expected behavior

obviously, ability to load weapon after modification

Screenshots

obraz

Versions and configuration

  • OS: Gentoo Linux
  • Game Version: 0.E-4155-g9f82fd3034
  • Graphics version: Terminal
  • Ingame language: English (default)
  • Mods loaded: [ Aftershock, Blaze industries, Disable NPC Needs, CRIT Expansion, Stats through Skills, Fuji's military profession pack, Alternate Map Key, No Fungal monsters ]
<Bug> Gunmod / Toolmod

All 9 comments

Additional info i noticed

Error while reloading broken gun

16:21:49.710 ERROR : src/item_contents.cpp:682 [item& item_contents::first_ammo()] Error: Tried to get first ammo in container not containing ammo

Error while shooting, (not modified gun)

16:16:37.692 ERROR : src/ranged.cpp:797 [int player::fire_gun(const tripoint&, int, item&)] Unexpected shortage of ammo whilst firing Mosin-Nagant 1891/30

Having the same issue reloading an unmodded Mosin 1891/30. Can't load it at all, even though I have the proper clip AND ammo for it.

Maybe it's specifically the Mosin-Nagant 1891/30..?

Your top Mosin, the one that shows ammo count, says "M44 EBR" instead of "1891/30". Is it maybe a different model? Not a gun expert, nor a DDA expert, so if my question's dumb I apologize in advance.

doesn't matter, there are 4 variants of mosin riffle and neither works, i belive i also tried that with remington700 or maybe 24 (also bolt action rifle) but i am not sure

checked it again against most recent build
0.E-4329-ga3e5f32500
it appears only some guns are affected, this was testsed with modified rifle scope instead
obraz

My Mosin doesn't reload, period. Zed dropped guns are always spawning empty. Reloaded items or holsters on the ground spit out errors on load. Seems to be some sort of issue with nested containers.

Correction, zed dropped guns are spawning as such:

  1. If they take ammo directly, like a shotgun, they do sometimes have ammo,
  2. If they take ammo via a mag like an M4, they spawn without mags or ammo

Holsters seem to still spawn with the gun, though. But as usual it's a handgun with a mag and has neither the mag nor ammo in it.

To provide some additional information for this, to maybe help in the bug hunting:

When you reload a weapon experiencing this problem, the ammo from your inventory is consumed, but nothing goes into the gun. Then, after a bit of time or some action (I haven't pinpointed this trigger) the missing ammo spawns on the ground under you. At this point, the gun can be reloaded, and the ammo from the ground picked up, but you have more ammo than you started with. Some or all of the ammo involved in this whole process is duped.

To provide some additional information for this, to maybe help in the bug hunting:

When you reload a weapon experiencing this problem, the ammo from your inventory is consumed, but nothing goes into the gun. Then, after a bit of time or some action (I haven't pinpointed this trigger) the missing ammo spawns on the ground under you. At this point, the gun can be reloaded, and the ammo from the ground picked up, but you have more ammo than you started with. Some or all of the ammo involved in this whole process is duped.

Wait... That's not what happens for me, at all. No ammo goes missing, none respawns, and the gun still can't be reloaded. Did you get any error message(s)?

To provide some additional information for this, to maybe help in the bug hunting:
When you reload a weapon experiencing this problem, the ammo from your inventory is consumed, but nothing goes into the gun. Then, after a bit of time or some action (I haven't pinpointed this trigger) the missing ammo spawns on the ground under you. At this point, the gun can be reloaded, and the ammo from the ground picked up, but you have more ammo than you started with. Some or all of the ammo involved in this whole process is duped.

Wait... That's not what happens for me, at all. No ammo goes missing, none respawns, and the gun still can't be reloaded. Did you get any error message(s)?

Thats was also my experience to this point. weapon after modifying it was unable to hold ammo at all (i.e. look at the screen there is no [5/5] marker). If this is repeatable that may be separate, but related bug.

To provide some additional information for this, to maybe help in the bug hunting:
When you reload a weapon experiencing this problem, the ammo from your inventory is consumed, but nothing goes into the gun. Then, after a bit of time or some action (I haven't pinpointed this trigger) the missing ammo spawns on the ground under you. At this point, the gun can be reloaded, and the ammo from the ground picked up, but you have more ammo than you started with. Some or all of the ammo involved in this whole process is duped.

Wait... That's not what happens for me, at all. No ammo goes missing, none respawns, and the gun still can't be reloaded. Did you get any error message(s)?

Yeah, I get the same "unexpected ammo shortage" error message.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Taberone picture Taberone  路  3Comments

ituluwituluwzev picture ituluwituluwzev  路  3Comments

jeremyshannon picture jeremyshannon  路  3Comments

RogueYun picture RogueYun  路  3Comments

Tsunder picture Tsunder  路  3Comments