Backpacks Beta 3.5.0

Backpacks 3.5.0 is intended to be fully backwards compatible with previous 3.x versions, but due to the number of users subscribed to the plugin, and the number of changes in this batch, we're releasing a beta to let the community test it out to ensure we didn't break anything before releasing to the broader audience. Thank you for participating!

Download: https://umod.org/plugins/Backpacks.cs?version=3.5.0&branch=beta

Documentation: https://github.com/LaserHydra/Backpacks/tree/develop

New features
  • Added config option "Softcore" -> "Reclaim Fraction" which determines how much of your backpack inventory will be sent to the reclaim terminal for safe keeping when your backpack is dropped (from dying or via another plugin causing it to drop). Only applies to the Softcore game mode. - First suggested by Philoludos
  • Added server command backpack.erase <id> which erases a player's backpack by Steam ID. - Requested by Kaucsenta
Improvements
  • The backpack now opens more quickly, especially for the /backpack chat command. - Suggested by Ts3hosting
  • Blacklisting items that are already present in player backpacks will no longer cause them to be erased. Instead, when the owner opens their backpack, the blacklisted items will be added to their inventory, or else dropped if they have insufficient space. - Requested by Mattdokn
Bug fixes
  • Fixed several cases of NullReferenceException caused by invalid or corrupt data files. The plugin will now simply create a new data file in these cases. - Reported by BlackJackFW95, plus LAIKALIZZARD and Heartlesswolve
  • Hopefully fixed backpacks occasionally getting stuck unable to be opened. - Reported by Skillz
  • Fixed errors when a player tries to open their backpack if it contained items with other items inside them. This improves compatibility with various plugins. - Requested by Ts3hosting
For Developers
  • The CanBackpackAcceptItem hook is now called even when blacklisting is disabled. - Requested by Ts3hosting
  • Added API_GetExistingBackpacks() method so that other plugins can get a reference to existing backpack containers. This allows item cleaner plugins to ignore items in backpacks to prevent breaking them. - Implemented by Vlad-00003
  • Added API_EraseBackpack(id) method to erase the contents of a specific player's backpack. - Requested by Kaucsenta

Just installed it (after backing up all old files) Seems to be working good so far , all my backpack contents were in place, will inform you of any problems (if any). still using bound key and also gui "button" (for those players who want it) ,

Items in Bagpacks still remain for players who slept in Outpost even after getting killed.

Tested it.

Put items in bag packs > afk/offline in outpost > get kills by NPC cause offline too long in outpost > respawn > items still remain in bag packs.

It acts like a bank now. XD

rustkoyak

Items in Bagpacks still remain for players who slept in Outpost even after getting killed.

Tested it.

Put items in bag packs > afk/offline in outpost > get kills by NPC cause offline too long in outpost > respawn > items still remain in bag packs.

It acts like a bank now. XD


That bug does not appear to be specific to the beta release, as explained in the separate thread that you created for it.
https://umod.org/community/backpacks/30783-backpack-opening-issue

I've fixed that on the develop branch of the GitHub repository. The uMod website doesn't let me upload a new version without updating the version number again which I don't want to do since it's a beta release, but you can download it off the GitHub directly.

Actually with this latest update i have found that if i am killed (while online) i retain my backpack contents instead of it being left beside my body.  I am going to do a bit of config change testing to see if i can get it back to *old version where i had to go and collect the corpse/backpack contents.

sTekDtiVm03U86K.jpg WhiteThunder

That bug does not appear to be specific to the beta release, as explained in the separate thread that you created for it.
https://umod.org/community/backpacks/30783-backpack-opening-issue

I've fixed that on the develop branch of the GitHub repository. The uMod website doesn't let me upload a new version without updating the version number again which I don't want to do since it's a beta release, but you can download it off the GitHub directly.
Meaning to say that your 3.5.0 Beta has fixed the issue. If yes, great! Love your work!
P8e0VtvXWz4CrPw.jpg pookins

Actually with this latest update i have found that if i am killed (while online) i retain my backpack contents instead of it being left beside my body.  I am going to do a bit of config change testing to see if i can get it back to *old version where i had to go and collect the corpse/backpack contents.

*update,
Even with drop on death set to true i am still in posssession of the backpack(contents) when i respawn.

otnN7eqSIxSSK0l.jpg pookins

*update,
Even with drop on death set to true i am still in posssession of the backpack(contents) when i respawn.

Any chance you granted yourself the keepondeath permission?
22zY2YLRjUbevUX.jpg WhiteThunder
Any chance you granted yourself the keepondeath permission?

No, I use permissions manager and checked all groups and revoked on them all,  Tried it out and still got backpack when i returned to corpse only the normal loot bag was there instead of both.

BBCR8qPLBSB4D6D.jpg pookins

No, I use permissions manager and checked all groups and revoked on them all,  Tried it out and still got backpack when i returned to corpse only the normal loot bag was there instead of both.

Weird since I'm not able to reproduce that. Can you downgrade to the v3.5.0 from the download link in this thread and see if it goes away? Want to make sure it's an issue with the latest code on the GitHub develop branch. I did reorganize the code of the method but it's functionally equivalent to before and works correctly in my testing.
TNgq0TEmLz8AelT.jpg WhiteThunder
Weird since I'm not able to reproduce that. Can you downgrade to the v3.5.0 from the download link in this thread and see if it goes away? Want to make sure it's an issue with the latest code on the GitHub develop branch. I did reorganize the code of the method but it's functionally equivalent to before and works correctly in my testing.

I found no (complete) .cs file there to download only a patch , i cannot find where i am to (re)place the code in the original .cs file .

8Wwi5YGV1FEIYMc.jpg pookins

I found no (complete) .cs file there to download only a patch , i cannot find where i am to (re)place the code in the original .cs file .

I was just linking to the diff for reference. When you earlier said "Actually with the latest update..." where did you get that update?

I learned that I can delete the branch and recreate it on the uMod site so the original link has the latest code. Next time I'll probably just increment the patch version to avoid confusion (though that creates confusion for people as well when they see version skipped).

https://umod.org/plugins/Backpacks.cs?version=3.5.0&branch=beta
fhy18tgpBdk0qNp.jpg WhiteThunder
I was just linking to the diff for reference. When you earlier said "Actually with the latest update..." where did you get that update?

I learned that I can delete the branch and recreate it on the uMod site so the original link has the latest code. Next time I'll probably just increment the patch version to avoid confusion (though that creates confusion for people as well when they see version skipped).

https://umod.org/plugins/Backpacks.cs?version=3.5.0&branch=beta

I used the link you supplied on the top of the page

5oeqI6CIPJWwV6I.jpg pookins

I used the link you supplied on the top of the page

That contents of that link hadn't changed at that time; they were still the same as when I originally posted the thread, so redownloading that shouldn't have caused the issue with backpacks not dropping. The contents of that link have changed now, though, so redownloading it will provide the fix for backpacks dropping in safe zones when dying while asleep.

7oSLn7Cof5Wttd1.jpg WhiteThunder

That contents of that link hadn't changed at that time; they were still the same as when I originally posted the thread, so redownloading that shouldn't have caused the issue with backpacks not dropping. The contents of that link have changed now, though, so redownloading it will provide the fix for backpacks dropping in safe zones when dying while asleep.

I didnt redownload that link. the previous version i was talking about was the one before your one 3.4.0 , I have just updated to this *patched version and it is back to  normal, killed myself a couple of times and backpack (on me) was empty and backpack/*corpse and loot were both on the ground.
Thanks for the update.

Locked