Jump to content

Bags within Bag of Holding - random spillage/disappearing

Closed 1.9.3

Somescrub
Somescrub

Posted

I've been getting this report from various players for awhile now... no console error or indicator otherwise as to how or why...

Typically it has been reporting while players are hover-looting custom bags into their backpack (the backpack plugin). When they do and log off they come back to the bags and contents spilled on the ground for no particular reason, or the bag and contents vanish completely. This specifically happens when custom bags are placed within a bag of holding, within the backpack (plugin). I have custom bag quantities set to unlimited, and no limits placed on the backpack plugin.

Additionally, weapons in-particular seem affected - many complain that putting/pulling weapons from the custom bags make them unusable entirely (both shoot and reload).

I know this doesn't give you much, but wanted to get it out there as it has been a thorn in my side for awhile now. I don't have the slightest idea what could be causing it, since it doesn't affect everyone consistently.

BlackLightning

Posted (edited)

Can you paste the exact wording used by the all reports of this issue? Sometimes the player's description of the issue includes nuances that can help with the investigation.

When you say custom bags, do you mean bag profiles that you defined in the config, in addition to the ones provided by default? Note that there is no functional difference between custom bags and the ones provided by default, they all simply operate according to how they are configured, so any correlation here is probably coincidence.

As for items spewing on the ground, that sounds like a capability of the Backpacks plugin, where opening the backpack can spew overflowing items if the backpack capacity has reduced since it was filled. Bag of Holding doesn't do anything like this, so that sounds like something is happening on the Backpacks side. Did players see the contents of the bag spewed out or was the bag itself simply spewed out of the backpack with other items from the backpack? If items spewed out of the bag itself, I don't know what would cause that.

Items being unusable is a known phenomenon in the Rust modding world which happens when the HeldEntity of an item was killed. This doesn't happen in vanilla Rust, but can happen in some modding situations which should be avoidable/fixable.

  • Servers using item cleaner plugins such as Broken Items Cleaner will probably see this often because that plugin aggressively kills HeldEntity instances if it isn't aware of the item that created the HeldEntity,. That plugin isn't coded to find items inside of other items recursively, so it may break items inside of bags.
  • There was a brief issues after a Rust update quite a few months ago where placing a bag on the ground and picking it up would kill any HeldEntity instances associated with items inside the bag. This happened because Rust by default tries to parent the HeldEntity instances to the bag world model entity, so when the world model entity is killed, Rust automatically kills the child entities. This was resolved  in a previous update by preventing the HeldEntity instances from being parented to the dropped bag.
Edited by BlackLightning
Somescrub

Posted

I will circle back around with those who are reporting to get some specifics for you.

Per your other questions:

  • When I refer to custom bags I mean the bag of holding bags - I maintained the vanilla configuration.
  • I do use broken items cleaner, but this issue precedes when I implemented that.
  • Specific to the spewing on the ground - I will get some clear description from the players for you.
  • If the HeldEntity issue was related to the RPC error I reported awhile ago, then no that isn't the same thing that is happening - this was actually happening before the RPC error as well.
Somescrub

Posted (edited)

Here is my first player response on some details. One important detail from this one is that the spillage of items seems to occur while the player is logged out - they discover it when logging back in.

 

Quote

I remember having two XXLarge Bags inside my first BOH in the VB. The first XXLarge bag was in the first slot of the BOH, and the second XXlarge bag was in the second slot. The first bag had was semi-full of things like tags, teas, clones, resources. The second XXLarge bag was mostly full of epic scrap and then not entirely sure but either full or nearly full with the rest being tech trash. At some point before logging off I put my Medium Armor Bag with the S Tier clothing that was in my 3rd BOH into the 1st BOH with the other two XXlarge bags. Then later in the day I logged for a short bit and came back in and found that the 2nd XXLarge bag with the epic scrap and tech trash spilled into the 1st BOH filling it up and then that 2nd xxLarge bag stacking into the 1st XXLarge bag. I had other items in the 1st BOH and I had other items in the 1st BOH and I'm not sure what stayed or what disappeared but the most noticable one that had vanished was the medium bag in the 1st BOH. Both XXLarge bags have been in that first BOH bag since before the spill issue and they never conflicted before so I left them there together. The only two things I can think of that may have made them conflict and then stack was maybe the 2nd bag filled up with tech trash while I was doing monument runs and then started to fill up outside the second XXLarge bag into the BOH inventory and that may have triggered something or somehow putting the 3rd bag (medium bag) in the 1st BOH with the other two XXLarge bags. I have had this happen a couple times before and some things vanished and didn't super care but this is a first with a bag vanishing.

1st BOH below

image.png.fa6275d4f3f19e19c7d06ef6af6e161f.png


 

Edited by Somescrub
Somescrub

Posted

2nd XXLarge bag without the tech trash now

image.png

Somescrub

Posted

I know that explanation is heavy, so apologies. I attached my config file for reference as well for troubleshooting:



 

BagOfHolding.json

Somescrub

Posted

Here is the second player's experience with the BoH issues:

 

Quote

So the only issues I've run into are bags emptying themselves if quick moved and the items becoming "invisible" inside of a bag that is in a BoH. As far as that goes any item that can be on the hot bar and used i.e guns, melee weapons, hammer becomes invisible and unusable unless it's left in a box until restart. This usually takes effect after about an hour inside of a bag that is inside of a BoH. I have noticed recently that sometimes the guns will periodically fix themselves while in the bag just to become invisible again later

 

Somescrub

Posted (edited)

Third player's experience:
 

Quote

When I pulled the bags out of the bag of holding and into the inventory, this happened:



 

image.png

Edited by Somescrub
BlackLightning

Posted (edited)

I parsed through both descriptions, and something occurs to me, especially regarding the second case where trying to take the bag spilled out the contents.

Are you using Stack Modifier? Around the time that Bag of Holding was in beta, an issue was discovered with Stack Modifier where it could empty the contents of any item, including these bags, in order to allow the item to be stacked with another. The way we solved it was by updating Stack Modifier to only apply that behavior to items that appear to have a container in vanilla. However, the Facepunch Backpacks update required some changes to be made in Bag of Holding, which unfortunately have resulted in that logic in Stack Modifier no longer working, so it looks like that issue should have returned.

To reproduce the issue, you can probably do something like the above screenshot. Basically, make two bags with the same skin/capacity, place items into one and place that one in another container, then right-click or hover-loot that bag into your inventory. I'm guessing this will cause it to spill out and possibly stack with the other bag in your inventory.

To mitigate this issue, you should be able to disable stacking of large halloween loot bags, as that will prevent Stack Modifier from trying to stack them.

Note that even if you are not using Stack Modifier, this issue could exist with other stacking plugins.

The proper solution should be for the Stack Modifier maintainer to simply remove this "auto-unpack" logic from the plugin. This is suggested because the developer implemented that logic under the incorrect assumption that any time the CanStackItem hook is called, that the player must be intentionally moving one item onto another, which is not true because the game will automatically test various similar-looking items for stack eligibility when right-clicking/hover-looting, which is inadvertently causing this issue. I suspect this is the same root cause as the issue happening in the Virtual Backpack. In a previous discussion with the Stack Modifier developer, he was hesitant to remove this logic because he believed "people expected it", and "it wasn't causing issues since it hadn't been reported" even though it was made clear to him at the time that the logic was wrong.

Edited by BlackLightning
Somescrub

Posted (edited)

Thanks - somehow I missed this, but you are correct I am using Stack Modifier. This was also happening before I made the switch to a new stack plugin with StackSizeController, to your point.

I will fiddle with the stack sizes for the Halloween bags themselves and see if it solves the problem - and I can tag this over in Stack Modifier Support, just to see if they agree something needs modified within the stack plugin.

Edited by Somescrub
BlackLightning

Posted (edited)

If you get any pushback from the developer, simply emphasize that the user experience is wrong. Moving an item with right-click or hover-loot should not empty its contents. Items should also not be emptied when added to a container by a plugin (i.e., when the virtual backpack is initialized). This is not a plugin compatibility issue, it is a stacking plugin issue, which happens to present a worse experience for plugins that allow players to store large quantities of items inside other items.

The developer may "blame" this issue on there not being a proper hook for their use case, but that should cause them to not try to implement that feature in the first place, rather than degrade user experience by implementing it the wrong way.

The developer has previously insisted that other plugins, such as Bag of Holding, should not use the CanStackItem hook while Stack Modifier is loaded, as SM should handle it correctly. If the developer wants to make that claim, they need to also implement it correctly. If they want to back down from that claim, they can expose a way for other plugins to dictate the behavior of that hook instead, since if BoH tries to use that hook now it will result in a non-deterministic conflict.

Edited by BlackLightning
BlackLightning

Posted

I'll go ahead and close this out since it seems like there isn't anything for Bag of Holding to do differently.

1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

102.1k

Files Sold

Total number of files sold.

2m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.