Inventory issues: Disappearing weapons, Inventory shuffling bugs and Crash to desktop

Platform:

PC

Description:

These bugs all seem to be related to the inventory management system so I combined them in one report:

  1. Sometimes, the inventory gets shuffled around when a weapon is picked up.

  2. When weapons are re-arranged manually in the inventory space (drag a weapon on top of another weapon), sometimes the inventory gets partially shuffled around and also sometimes you cannot move a weapon at all (the top left inventory slot is quite prone to this it seems).

    I haven’t found an exact pattern yet but it seems to cycle between 3 weapons when you move the same “slot” to the same other “slot”, over and over again. Also, the dragged weapon seems to be placed in the slot in front of where you drop it.

    Edit: A weapon (obviously) occupies two inventory slots. The weird behaviour occurs when a weapon is dragged from the right half of the weapon. If the weapon is dragged from the left half then everything seems to work as expected.

    Credits to @pegnose for figuring out the cause for this behaviour.

  3. The game does a hard crash to desktop (CTD) if you -drag- a weapon from the Plundra to the inventory when there is not enough free inventory space to hold the weapon (including no free space at all). It does not seem to apply the other way around or to other items (although I haven’t tested every single item).

    Edit: The crash only seems to occur when the weapon inside the Plundra has (any) attachment(s).

    Credits to @pegnose again for figuring out the cause for this.

  4. Sometimes, weapons (or attachments) disappear when taken from a weapon crate (or other container).

Steps To Reproduce:

  1. Have 2 free inventory slots (or more; but -not- horizontally adjacent) and pick up a weapon.

  2. Fill the inventory with (some) weapons and drag them around from and to different spots.

  3. Well … -drag- a weapon from the Plundra to the inventory when there is not enough free inventory space to hold the weapon.

    :warning: Note for eager testers: Make a backup copy of the save file before attempting this!

  4. This one is quite a bit more elaborate (again :grimacing:): see below.

Images / Videos:

See below.

Host or Client:

Both? (Solo)

Players in your game:

1

Specifications:

CPU: Ryzen 7 1700
Motherboard: Asus ROG Crosshair VI
RAM: 16GB, G.Skill FlareX, 3200MT/s, CL14
Graphics: MSI Radeon R9 380 Gaming 4GB
PSU: Corsair HX750i, 750W


Disappearing weapons

1. Steps to reproduce

:warning: Note for eager testers again: Make a backup copy of the save file before attempting this!

1.1 A simple example

Here is one (of many possible) example(s):

  • Find a chest with two weapons (or drop two clean weapons on the floor yourself).
  • Make sure you have only two (or three) free inventory slots (and make sure all your weapon equipment slots are occupied, obviously).
  • Select the -second- weapon in the chest (or backpack, if you dropped them).
  • Select “Take ALL” (not just “Take”).

The first weapon from the chest goes into the inventory and the second weapon (the selected one) disappears into “nothingness”.
So, “gone is your weapon”.

1.2 More elaborate - “truth tables”

The above is a simplified example. Reality is a bit more complicated and it’s a little bit difficult to explain in similar words. So, here is a “truth table” with the results of a bunch of test runs.

Explanation of symbols:

Ax = Attachment number x
Wx = Weapon number x
- = Nothing / No error message
Error = Error message: "Inventory is full"

1.2.1 Full “truth table” - 2 items in chest

Free Slots Chest Item 1 Chest Item 2 Selected Item(s) Select Item(s) Result Take All Result In Inventory Gone
1 A1 A2 A1 - - A1 A2
1 A1 A2 A2 - - A1 A2
1 A1 A2 A1+A2 Error - - -
1 A1 W1 A1 - Error - -
1 A1 W1 W1 Error - - -
1 A1 W1 A1+W1 Error - - -
1 W1 A1 W1 Error - - -
1 W1 A1 A1 - Error - -
1 W1 A1 W1+A1 Error - - -
1 W1 W2 W1 Error - - -
1 W1 W2 W2 Error - - -
1 W1 W2 W1+W2 Error - - -
2 A1 A2 A1 - - A1+A2 -
2 A1 A2 A2 - - A1+A2 -
2 A1 A2 A1+A2 - - A1+A2 -
2 A1 W1 A1 - - A1 W1
2 A1 W1 W1 - - A1 W1
2 A1 W1 A1+W1 Error - - -
2 W1 A1 W1 - - W1 A1
2 W1 A1 A1 - - W1 A1
2 W1 A1 W1+A1 Error - - -
2 W1 W2 W1 - - W1 W2
2 W1 W2 W2 - - W1 W2
2 W1 W2 W1+W2 Error - - -

1.2.2 Very partial “truth table” - 3 items in chest

Free Slots Chest Item 1 Chest Item 2 Chest Item 3 Selected Item(s) Select Item(s) Result Take All Result In Inventory Gone
1 W1 A1 A2 W1 Error - - -
1 W1 A1 A2 A1 - Error - -
1 W1 A1 A2 A2 - Error - -
2 W1 A1 A2 W1 - - W1 A1+A2
2 W1 A1 A2 A1 - Error - -
2 W1 A1 A2 A2 - Error - -
2 W1 A1 A2 A1+A2 - - W1 A1+A2
3 W1 A1 A2 W1 - - W1+A1 A2
3 W1 A1 A2 A1 - - W1+A1 A2
3 W1 A1 A2 A2 - - W1+A1 A2

2. Conclusion

So, here is what seems to happen:

  • When you select an item (or more) in the container, the “inventory manager” checks if there are enough free inventory slots for the SELECTED items in the container.

    If not: an error message is displayed and the operation is aborted.

  • When you choose “Take All”, the “inventory manager” checks if there are enough free inventory slots for the NON-selected items in the container.

    If not: an error message is displayed and the operation is aborted.

  • If there are no errors: The items are sequentially moved from the container to the inventory, starting with the first one in the container.

    If there is no room for the next item in the list, it is moved to a “black hole”.

    Note: I haven’t tested this (it happened once by accident) but if the current item is a weapon and the next item can fit, it seems an attempt is made to attach existing ammo to that weapon first before moving the next in the list to the inventory. So you might end up with one more item than can be expected from the tables.

Also: as a follow-up to my previous “thoughts” in my other bug report: the disappeared weapon (or attachment(s)) did not attach to another weapon in the inventory.

3. Videos

3.1 Shuffled inventory when a weapon is picked up

3.2 Shuffled / refusing inventory when re-arranging weapons manually

3.3 Disappearing weapon - In chest: 2 weapons.

3.4 Disappearing weapon - In chest: 1 attachment + 1 weapon

3.5 Double (Long) Demo - Disappearing attachments - In chest: 2 attachments and 1 weapon + 2 attachments

3 Likes

The inventory re-arranges itself in order to make space. Other games do this as well. Sucks sometimes, we should be able to turn this off. Not a bug though to my mind.

Huh, never noticed!

It took me a while to understand, that you have to drag the left/first slot of 2-slot items (weapons). Do you mean that?

From the top of my head, I cannot remember this happening to me.

Other than that, tremendous job on the disappearing part! :heart:

It will be thanks to people like you when the game will finally be a smooth and stable experience.

1 Like

Of course, I understand that. Maybe I should have explained it better. I probably should have posted a more clear video of that happening with ammo and other stuff in the inventory (the impact is not so obvious with only golden weapons).

I don’t mind it doing some re-arranging. However, as it is now, it -completely- “randomises” the entire inventory. I would just like it to be more intelligent about it and save the current algorithm as a last resort.

Something like this (just a quick thought; in “pseudo code”):

// Assuming there are 2 free slots to begin with.
Inventory::ReOrganiseInventoryForTwoAdjacentSlots()
{
    source_slot = GetLastFreeSlot();
    source_slot_neighbour = GetSingleItemNeighbour(source_slot);
    target_slot = GetPreviousFreeSlot(source_slot);
  
    if(source_slot_neighbour){        
        MoveItem(source_slot_neighbour, target_slot);
        return;
    }

    target_slot_neighbour = GetSingleItemNeighbour(target_slot);

    if(target_slot_neighbour){
        MoveItem(target_slot_neighbour, source_slot);
        return;
    }
  
    // Try some other smart stuff here.

    // Absolutely nothing convenient worked so NOW go screw up massively ... =]
    delete this;    
}

I don’t think it applies to normal items but only to weapons. Which is probably why you have never noticed. I’ve had some sporadic quirky behaviour in the inventory with weapons but I didn’t think too much of it. Until I tried to organise my inventory full of weapons for the test runs and the demo videos. :slight_smile:

Nope. That left/first slot argument doesn’t hold. I even try that the first couple of times in the video. Maybe it holds the first time (in the first slot) but after moving other stuff around things get more and more obscure. As if the operation checks are done on a “shadow copy” of the item array.

Well, blow me down! You’re right! :slight_smile:

I should read more carefully. I “understood”: “drag the leftmost item of the two if they’re 2-slot items”. But dragging the weapon from its left half it is. Good stuff!

Weird mechanic nonetheless!

Why don’t you give it a shot? :grin:

Thanks man. But it’s too much credit, I think. The devs definitely know about the inventory problems and I would be quite surprised if they don’t already have a pretty good (if not complete) idea of what the causes are. But, you never know. And if it helps then I’m happy. :slight_smile:

Besides, if I can make other players understand what’s going on, then they benefit from it as well. It’s a lot more fun for everyone if losing stuff can be prevented until the inventory system is actually “idiot-proof”.

Please don’t feel offended by “idiot-proof”. Being an “idiot” myself is what triggered my interest in this bug in the first place :smile:

2 Likes

That would be great, tbh.

Same for me. How often did I think “WTF, am I STUPID or what?!” :smile:

I am seriously worried about messing up my save file. I have so little issues so far and I would like to keep it like that.

Not sure about that. Depending on how stuff is coded, it is really hard to foresee these kinds of side effects. Plus I know from my own experience, that devs (like all of us) often tend to test in a limited number of ways (the way stuff is “intended” to be done, even if it is only the most encountered situations) and come up with the conclusion that everything works just fine. There are many borderline cases and it is hard to have them all in mind.

I am sure your work is tremendously helpful.

No worries, we are speaking the same language. :slight_smile:

1 Like

I can conform that. It happened to me not only once. But fortunatelly there was no damage in my save file.
Edit: I’m playing solo on PC.

1 Like

Make a manual backup? =]

I have tried that Plundra crash several times. I also have ALT-F4’d my game so many times, I completely lost count. Also the game crashed a hundred times because of RTSS when stopping a (second) recording (I suspect the cause is slow disk access because of a bit full disk). And then there is the (fortunately for me) very exceptional random crash.

Never have I had a corrupted save and restoring the backup save (which I have done a hundred plus times by now) has always completely restored the game state. No issues whatsoever. :smile:

I might try it, no promises.

There are threads here in the forum claiming that your game’s state is saved at least in three different locations on your disk. I am actually afraid.

Interesting. The only files I found that have a changed date after game exit are in the Documents folder (GenZ/saves and GenZ/cache). Maybe the cache could screw up but since it’s cache you should be able to delete it anyway.

1 Like

At the moment, the cache holds the wrapper background image and the DLC advert. The released_default folder has made a return, but it’s empty.

I haven’t seen any evidence that the game state is saved anywhere apart from the saves folder you mention and the steam cloud or equivalent, if using that kind of thing is your bag.

1 Like

To bad it re-downloads it when you remove or change it. It’s not a biggy but since I -have- the DLC I’d prefer the game to not display the advertisement for it.

1 Like

I can confirm this one now. But ONLY if my gun has attachments on.

This post made me try it:

1 Like

Affirmative! Good stuff! :slight_smile:

I’ll edit the bug report accordingly.