Backpacks keep food cold even without permission

Hi,
I have only 3 permissions granted for the backpack (oxide.show user):
backpacks.size.12, backpacks.gather, backpacks.use,

I don't have nofoodspoil permission. However food is still being frozen/kept cold when added to it. I think this is a bug?

I don't see a config option to it in general config file

There is no known bug which causes this. One possibility that comes to mind is that the location of the backpack containers (far below the center of the map) could possibly be considered to be in the arctic biome on your particular map. If you see this issue only one specific maps, then that root cause is plausible. Otherwise, the only possibility is something going on with permissions, since the plugin doesn't have any functionality related to this outside of permissions.

It's worth mentioning that a future version of this plugin will make it so the backpack refrigerates food while the player is in the arctic biome, as requested by some users. This functionality is already available in the version of the plugin on GitHub, so if you installed that version already for some reason, that could be the cause of what you are seeing, but that would only explain it if you are seeing this behavior in the arctic biome.

If the issue is caused by the location of the backpack containers, there is a Vector3 somewhere in the cs file which you can edit to experimentally change this. I dont have the line of code off hand, but if you use AI, it should be able to easily locate it. Don't change the height, just the X and Z coordinates. If changing the location resolves the issue, that will be strong evidence of the issue, so that I can implement a solution for it in a future update.

Thank you, chaging the vector3 position fixed the issue. Backpack container was in arctic zone.
var storageEntity = GameManager.server.CreateEntity(CoffinPrefab, new Vector3(300, -500, 0));

Hi WhiteThunder,

Thank you as always for your work on the Backpacks plugin.

I wanted to follow up regarding the issue where food inside backpacks was being kept cold / frozen even for players who do not have the backpacks.nofoodspoiling permission.

As you suggested in a previous reply, I tested changing the storage container position in the CS file.

The original line was:

var storageEntity = GameManager.server.CreateEntity(CoffinPrefab, new Vector3(0, -500, 0));

I changed only the X and Z coordinates, without changing the height:

var storageEntity = GameManager.server.CreateEntity(CoffinPrefab, new Vector3(300, -500, 1000));

After making this change, food inside the backpack started spoiling normally.

So it seems that, on my current map, the original backpack storage container position was being treated as a cold / arctic biome location, causing the food to be refrigerated even without the nofoodspoiling permission.

Would it be possible to add a config option for the hidden backpack storage container position, or to adjust the plugin so the internal storage containers are placed in a location that will not be affected by biome temperature?

Also, if there are any risks or side effects from using this temporary workaround, please let me know.

Thank you very much.

I looked into the issue and there isn't a good way to fix it without moving the backpack container location. I am planning to make an update which will sample various locations around the map to one that is outside of the Arctic biome. Hopefully that will be sufficient but it's hard to say without testing it on every map. I suppose if there is a map which is entirely Arctic biome then it would be OK for food to not spoil in that case anyway.

Yes, this workaround is totally safe, no side effects.

Thank you very much for looking into this.

I’m glad to hear that the workaround is safe and has no side effects.

I understand that moving the hidden backpack container location is currently the best solution, and I appreciate that you are planning to improve this in a future update by checking multiple locations and selecting one outside the Arctic biome.

I’ll continue using the current workaround for now.

Thank you again for your support and for maintaining this great plugin.

Merged post

I found one more issue after applying the workaround.

Changing the hidden backpack storage container position fixed the issue where food was being kept cold/frozen.

However, I noticed that food spoilage time does not seem to progress normally while the item remains inside the plugin backpack.

When I take the food out of the backpack, the spoilage time appears to update all at once.

In the past, food inside the plugin backpack used to spoil over time while it remained inside the backpack.

So this seems different from the previous behavior.

To clarify:

  • The Arctic/cold biome issue appears to be fixed by changing the hidden storage container position.

  • But food spoilage does not seem to update in real time while the food remains inside the backpack.

  • When the food is removed from the backpack, the elapsed spoilage time is applied all at once.

Is this the intended behavior in the current version, or could this be a regression/change in how food spoilage is handled inside backpacks?

Thank you very much.

I didn't follow your explanation of symptoms exactly, so I will just explain how it's supposed to work and then we can go from there.

When a player enters the arctic biome, there is a delay of up to 10 seconds before the items in their backpack become chilled (snowflake icon). Once an item in the backpack becomes chilled, its stops spoiling immediately (timer stops updating). When the player leaves the arctic biome, there is again a delay of up to 10 seconds before the item thaws and resumes ticking. This is expected as the result of performance optimizations. I could speed it up but there isn't much reason to. The only issue I can imagine is that a player might be confused if they have food in both their inventory and their backpack visible at once and notice they are not in sync, but that is just an issue of confusion.

There are some edge cases I could get into around backpacks being fully unloaded from memory (backed up to disk only), since the timer can't actually tick in that case, so the plugin has to track timestamps and deduct time later on when the backpack is loaded back into memory. I only mention this in passing since it is probably not coming into play in what you are witnessing.